Tutorial

Using the QingYuan Simulator API

QingYuan ·

Step-by-step guide: obtain a token and call the growth simulation and 3D model endpoints.

1. Obtain a token

POST /api/token/pair

{
    "username": "your_username",
    "password": "your_password"
}

The response contains username, access and refresh.

2. Refresh the token

POST /api/token/refresh

{
    "refresh": "your_refresh_token"
}

3. Call endpoints with the token

Authorization: Bearer <access token>

4. Available endpoints

  • GET /api/qingyuan/supported_plants — plants available to the current account
  • POST /api/qingyuan/simulate — run a growth simulation and return crop snapshots per cycle
  • POST /api/qingyuan/build_three_d_model — generate a glTF 3D model

Full parameter reference: interactive API docs.