Skip to main content
GET
Query Task Status
The core query endpoint for asynchronous tasks. After submitting a task (POST /v1/tasks) and receiving a task_id, poll this endpoint until status: completed to retrieve the final result.

Example Request

Example Responses (By Stage)

Response Fields

string
Unique task ID (returned at submission)
string
Task status:
  • queued — Submitted, waiting to be processed
  • processing — In progress; the progress field indicates progress (0–100)
  • completed — Done; result contains the generated output
  • failed — Failed; error contains the error details
  • cancelled — Cancelled (only queued tasks can be cancelled)
string
Action type, identical to the value submitted (generate / edit / image2video, etc.)
string
Model ID used (group_name)
integer
Progress as an integer 0–100. 0 for queued / failed / cancelled, 100 for completed
integer
Creation time (Unix millisecond timestamp)
integer
Completion time (Unix millisecond timestamp). Only present in completed / failed / cancelled states
integer
Actual quota charged for the task. Only present in terminal states (completed / failed / cancelled). Success = settled amount; failed/cancelled with automatic refund = 0. Use this field for reconciliation.
object
Error details. Only present in the failed state:
  • message — Error description
  • code — structured error code. Common values: upstream_unavailable (retryable), upstream_bad_request (rejected by upstream), upstream_rate_limited, task_failed (other failures)
object
Generation result. Only present in the completed state. Depending on the task’s media type, the key is images / videos / audios (an array). Each item contains:
  • urlstring[] array (always an array, even with a single element)
  • expires_at — Unix timestamp; link expiration (default 3 days)
object
Convenience action links so clients don’t have to assemble URLs:
  • get — Current query endpoint
  • cancel — Cancel-task endpoint

Polling Recommendations

  • Polling interval: every 2–5 seconds
  • Maximum wait time: 5-minute timeout recommended (videos may take longer)
  • Display progress to show real-time progress to users
  • Prefer Webhooks: set callback_url at submission to receive a push on completion and skip polling
See Task System for the full workflow.
Generated result links are valid for 24 hours to 3 days (see the expires_at field). Download and persist them to your own storage promptly. After expiration the links become invalid and you’ll need to resubmit the task.

Error Codes