Get generation status

GET /generations/{id}/status

返回指定题目生成任务的状态,可用于轮询。

Path parameters

  • id string Required

    Format should match the following pattern: ^gen-.

Responses

  • 200 application/json

    generation found

    Hide response attributes Show response attributes object
    • id string

      Format should match the following pattern: ^gen-.

    • object string

      Value is generation.

    • created_at string(date-time)
    • finished_at string(date-time) | null
    • status string

      Values are queued, generating, succeeded, failed, or cancelled.

  • 404 application/json

    generation not found

GET /generations/{id}/status
curl \
 -X GET https://v5.jinshuju.net/exam/api/generations/{id}/status
Response examples (200)
{
  "id": "gen-6757a420e88e5d8d2a0bbcd0",
  "object": "generation",
  "status": "generating",
  "created_at": "2024-12-10T10:14:56.102+08:00",
  "finished_at": null
}
Response examples (404)
{
  "error": {
    "type": "invalid_request_error",
    "message": "No such Generation object: invalid"
  }
}