Skip to content

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:

http
GET /v1/tasks/{task_id}

Compatible entry:

http
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:

http
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 ​

bash
curl https://moonnexai.com/v1/tasks/task_01HX... \
  -H "Authorization: Bearer <MOONNEXAI_API_KEY>"

Example response ​

json
{
  "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 ​

StatusAnnotationsRecommendations
pendingMoonNexAI is accepted, awaiting submission or systematic preparation.Further queries will be made later.
submittedSubmitted to generate task, pending processing.Further queries will be made later.
runningGenerating.Continue waiting; avoid frequent polling.
succeededAchieved.Reads the result URL and saves it.
failedtask failed.View error, trace_id and original request.
cancelledtask cancelled.Stops the query.

Result field ​

Please judge status, read the URL:

  • When status is succeeded, task is successful and the result URL is read.
  • Do not read a result URL for pending, submitted, running, failed or cancelled. Incomplete or failed responses may omit output and result URLs. For failed, read error, trace_id and request_id.
  • /v1/videos/{task_id}/content only recommends task after success. This compatible download portal may return 302 jump, 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.

fieldAnnotations
output[].urlSuggests a read-out video result URL.
urlPartially compatible with the result URL in response.
video_urlThe result of the result in part response is URL.
result_urlPart 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.

bash
curl -L https://moonnexai.com/v1/videos/task_01HX.../content \
  -H "Authorization: Bearer <MOONNEXAI_API_KEY>" \
  -o result.mp4

Recommendation 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.

Relevant Pages ​