青峰智影青峰智影
API ReferenceMirava
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

ParameterTypeRequiredDescription
task_idstringYesThe 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

statusDescription
queuedQueued, waiting to be scheduled
runningGenerating
succeededGeneration succeeded, video_url is available
failedGeneration failed, the error field contains the reason
cancelledCancelled

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_url after succeeded; video_url is empty while generating.
  • If return_last_frame is enabled, an additional last_frame_url is 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
done

Do 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
FieldTypeDescription
task_idstringVideo 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?