Blue Whale APIBlue Whale API
Video Generation API

Query a Task

Poll the task status to track generation progress

GET /v1/video/generations/{task_id}

Query the current status of a given task. Video generation is asynchronous — polling every 5–10 seconds is recommended.

Path Parameters

FieldTypeDescription
task_idstringThe task ID returned when the task was submitted

Example

BASE_URL="https://yunjizi.cn"   # Domestic; overseas use https://api.yunjizi.cn

curl "$BASE_URL/v1/video/generations/task_9f3a2b7c" \
  -H "Authorization: Bearer sk-YOUR-KEY"

Task State Machine

statusMeaningDescription
SUBMITTED / QUEUEDQueuedTask accepted, waiting to be scheduled
IN_PROGRESSProcessingGeneration is running; keep polling
SUCCESSCompletedReady to download the video
FAILUREFailedInspect fail_reason for the cause
UNKNOWNUnknownRetry the query; contact support if it persists

State flow: submitted → QUEUED → IN_PROGRESS → SUCCESS / FAILURE.

Response

{
  "code": "success",
  "message": "",
  "data": {
    "task_id": "task_9f3a2b7c",
    "status": "SUCCESS",
    "fail_reason": "",
    "result_url": "https://...",
    "submit_time": 1786344639,
    "start_time": 1786344645,
    "finish_time": 1786344768,
    "progress": "100%",
    "usage": {
      "completion_tokens": 108900,
      "total_tokens": 108900
    }
  }
}

usage reflects the actual token consumption after the task completes. Only upstreams that report real tokens (e.g. doubao / seedance) include this field on completed tasks; kling, ali and other channels do not. Tokens relate to gateway billing (quota) but are a different unit — convert for display on your side.

Once the status is SUCCESS, call Download the Video to fetch the final video, or use result_url from the response directly (the URL form and validity period are subject to official confirmation).

Ark-Compatible Mode (Volcengine Native Protocol)

Tasks created through the Ark-compatible submit endpoint must be queried on the native path:

GET /api/v3/contents/generations/tasks/{id}

BASE_URL="https://api.yunjizi.cn"

curl "$BASE_URL/api/v3/contents/generations/tasks/task_9f3a2b7c" \
  -H "Authorization: Bearer sk-YOUR-KEY"

Response

{
  "id": "task_9f3a2b7c",
  "model": "dreamina-seedance-2-0-fast-260128",
  "status": "succeeded",
  "content": { "video_url": "https://.../result.mp4?X-Tos-Signature=..." },
  "usage": { "completion_tokens": 49761, "total_tokens": 49761 },
  "created_at": 1792841408,
  "updated_at": 1792841873,
  "resolution": "480p",
  "duration": 5
}
FieldTypeDescription
idstringGateway task id (the id returned at create time)
modelstringModel used for the task
statusstringqueued / running / succeeded / failed
content.video_urlstringResult video URL; present on succeeded tasks
usageobjectcompletion_tokens / total_tokens; only upstreams that report real tokens include it
resolutionstringOutput resolution
durationnumberOutput duration in seconds
created_at / updated_atnumberUnix timestamps (seconds)
errorobjectcode / message, present on failed tasks

Status flow: queued → running → succeeded / failed.

  • The body is the task object itself — there is no code / message / data wrapper.
  • The native path only serves the native channel; /v1/videos never routes to it, and vice versa.
  • Errors use the Ark envelope: {"error":{"code","message","param","type"}} — see Errors.