Skip to main content

Overview

Use this endpoint for unified async polling across task types such as video, image, music, and 3D generation. If a create response includes poll_url, call that exact path. Some image models may return task-based responses under either an image-specific status path or /v1/tasks/{id}.

Path Parameters

string
required
The task ID returned by the create request.

Response

string
Canonical async task identifier.
string
Async task identifier alias.
string
Preferred polling URL when the create response supplies one.
string
Task status such as pending, processing, completed, or failed. Cancelled tasks are represented as failed with cancelled: true.
boolean
true when a queued async task was cancelled before execution.
string
Cancellation marker. Present as cancelled when cancellation succeeds.
array
For completed image tasks, generated image results are returned here. Image tasks return URLs in data[].url.
number
Optional progress value. Returned only when a real progress value is available; use status to determine completion.
string
Result asset URL when the task completes and produces a video.
object
Single video payload with url, duration, width, and height when available.
array
Multiple video payloads when more than one output is available.
string
Error message when the task fails.
integer
Creation timestamp when available.
integer
Last update timestamp when available.
string
Model used by the task when available.

Error Behavior

If the task no longer exists, has expired, or is no longer available in the public task record, AI Sonar returns:

Examples

Python
JavaScript