AI Model APIVideosSeedance Format
Query Task Status
GET /v1/video/generations/{task_id} — poll task progress and get the video download URL.
Endpoint
GET https://qfzyapi.qfzy.art/v1/video/generations/{task_id}
Authorization: Bearer {api_key}OpenAI Video compatible alias: GET /v1/videos/{task_id}.
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
task_id | string | Yes | The task ID returned when creating the task |
Request Example
curl -X GET "https://qfzyapi.qfzy.art/v1/video/generations/task_xxxxxxxx" \
-H "Authorization: Bearer sk-xxxxxxxx"Response
{
"id": "task_xxxxxxxx",
"task_id": "task_xxxxxxxx",
"status": "succeeded",
"model": "doubao-seedance-2-0-260128",
"progress": 100,
"video_url": "https://cdn.example.com/output/xxxx.mp4",
"last_frame_url": "https://cdn.example.com/output/xxxx_last.png",
"usage": {
"total_tokens": 123456
},
"created_at": 1735660800,
"completed_at": 1735660920
}Status Reference
| status | Description |
|---|---|
queued | Queued, waiting to be scheduled |
running | Generating |
succeeded | Generation succeeded, video_url is available |
failed | Generation failed, the error field contains the reason |
cancelled | Cancelled |
Polling Recommendations
- A polling interval of 3–5 seconds is recommended; estimate the maximum wait from
duration(generally no more than 10 minutes). - Only read
video_urlaftersucceeded;video_urlis empty while generating. - If
return_last_frameis enabled, an additionallast_frame_urlis returned on success.
while true; do
resp=$(curl -s -X GET "https://qfzyapi.qfzy.art/v1/video/generations/task_xxxxxxxx" \
-H "Authorization: Bearer sk-xxxxxxxx")
status=$(echo "$resp" | grep -o '"status":"[^"]*"' | cut -d'"' -f4)
echo "status=$status"
[ "$status" = "succeeded" ] && echo "$resp" && break
[ "$status" = "failed" ] && echo "$resp" && break
sleep 5
doneDo not poll at a high frequency. Excessively dense query requests may be rate limited. Poll at a fixed interval and apply backoff retries on failure.
Moderation Result Query
In some scenarios a task must pass content moderation. Query the moderation result with the following endpoint:
POST https://qfzyapi.qfzy.art/api/generation/video/moderation-result
Authorization: Bearer {api_key}
Content-Type: application/json| Field | Type | Description |
|---|---|---|
task_id | string | Video task ID |
The response contains the moderation status and, if rejected, the reason. Use it to inform the user or resubmit.
How is this guide?