Query video tasks
Video task is submitted with a search for API reading status, progress, result URL and failure information. Even if Webhook is configured, it is recommended that active search capabilities be retained.
Method and Path
Suggested uniform query entry:
GET /v1/tasks/{task_id}Compatible entry:
GET /v1/videos/{task_id}
GET /v1/video/generations/{task_id}
GET /v1/videos/{task_id}/content
GET /api/v3/contents/generations/tasks/{task_id}Compatible path also supports the listing and cancellation of task by official shape:
GET /api/v3/contents/generations/tasks
DELETE /api/v3/contents/generations/tasks/{task_id}content.video_url, content.last_frame_url and other field in response compatible path may be only task After success, you will be able to find out which entry you want to use. Check status and error first, then read the result address.
Standard request
curl https://moonnexai.com/v1/tasks/task_01HX... \
-H "Authorization: Bearer <MOONNEXAI_API_KEY>"Example response
{
"id": "task_01HX...",
"object": "task",
"trace_id": "2026060301010100000000000000000000",
"request_id": "2026060301010100000000000000000000",
"status": "succeeded",
"model": "your-video-model",
"created_at": 1710000000,
"output": [
{
"type": "video",
"url": "https://example.com/result.mp4"
}
],
"error": null
}Status statement
| Status | Annotations | Recommendations |
|---|---|---|
pending | MoonNexAI is accepted, awaiting submission or systematic preparation. | Further queries will be made later. |
submitted | Submitted to generate task, pending processing. | Further queries will be made later. |
running | Generating. | Continue waiting; avoid frequent polling. |
succeeded | Achieved. | Reads the result URL and saves it. |
failed | task failed. | View error, trace_id and original request. |
cancelled | task cancelled. | Stops the query. |
Result field
Please judge status, read the URL:
- When
statusissucceeded, task is successful and the result URL is read. - Do not read a result URL for
pending,submitted,running,failedorcancelled. Incomplete or failed responses may omitoutputand result URLs. Forfailed, readerror,trace_idandrequest_id. /v1/videos/{task_id}/contentonly recommends task after success. This compatible download portal may return302jump, so HTTP client will follow the direction.
The results of successful task may appear in the following field. The response structure of the different compatible entry points may differ, and please refer to API for actual return.
| field | Annotations |
|---|---|
output[].url | Suggests a read-out video result URL. |
url | Partially compatible with the result URL in response. |
video_url | The result of the result in part response is URL. |
result_url | Part task-chain response result URL. |
Result URL Policy
Successful task may return to the media URL approved by the MoonNexAI policy or to the media URL managed by MoonNexAI. Both are available to clients; use the full address that API actually returns, not to judge whether task is successful by domain name, and not to force the downloading of content.
Please follow:
- Do not extrapolate model capabilities or select other downloads from the result URL.
- Do not spell or rewrite the URL.
- Saves the complete URL returned by API, including possible signature query parameters; the absence or rewriting of parameters may result in download failure.
- If the operation requires long-term filing, secondary distribution or removal of ad hoc signature dependence, save it for the operation side download.
Content Download Entry
GET /v1/videos/{task_id}/content is a compatible download fallback. Use it after succeeded when the task response provides no usable result URL. It may return a 302 redirect or a video stream. Use curl -L or enable redirects in your SDK.
curl -L https://moonnexai.com/v1/videos/task_01HX.../content \
-H "Authorization: Bearer <MOONNEXAI_API_KEY>" \
-o result.mp4Recommendation polling
- The first 30 seconds can be checked every 3 to 5 seconds.
- Long task suggests gradually pacing, e.g. 10 seconds, 20 seconds, 30 seconds.
- task stops polling after it has been successfully, unsuccessfully or cancelled. Do not judge task success by the presence of URL field in response.
- Save final URLs and original response in the operations system for subsequent checking.