Skip to content

query_generation_task

Poll the status of an asynchronous generation task created by generate_video. When the task reaches Success, the server automatically retrieves the download URL for the generated video.

ParameterTypeRequiredDefaultDescription
task_idstringTask ID returned by generate_video
apistringautoWhich API the task was created with: v1 (V1 models), v2 (MiniMax-H3), or auto (default) — tries V2 first and falls back to V1 when the task is not found.
StatusMeaningWhat to do
PreparingTask is being preparedWait and poll again
QueueingTask is queuedWait and poll again
ProcessingVideo is being generatedWait and poll again
SuccessVideo is readyDownload URL is provided in response
FailGeneration failedTry again with a different prompt

Check status:

“Check the status of video generation task 106916112212032.”

Poll until ready:

“Is my video ready? The task ID is 176843862716480.”

Step 1: generate_video(prompt="A golden retriever playing fetch on a beach")
→ { task_id: "106916112212032" }
Step 2 (repeat until Success):
query_generation_task(task_id="106916112212032")
→ { status: "Processing" } ← wait 30–60 seconds and retry
→ { status: "Success", downloadUrl: "https://..." }

Returns a text part with:

  • Task ID — the task being polled
  • Status — current task status
  • API — the API version used (v1 or v2)
  • Download URL — the URL to access the generated video (on Success only)
  • Resolution — video dimensions (on Success only)
  • Error — the underlying error message (on Fail only)
  • Video generation typically takes 1–5 minutes. Poll every 30–60 seconds.
  • With the default api: 'auto', V2 (MiniMax-H3) tasks are queried first, with automatic fallback to V1 when the task is not found — you don’t need to track which API created the task.
  • If you know the task came from a V1 model, you can pass api: 'v1' to skip the V2 attempt.
  • The download URL is retrieved automatically when the status is Success — no separate download step is needed.
  • On Fail, retry generate_video with a revised prompt or different model.