Skip to main content

Task Lifecycle

Task States

Submit a Task

Poll for Status

In-Request Waiting (Prefer: wait)

If you’d rather not poll manually, submit with a Prefer: wait=N header (N ≤ 60 seconds):
  • Task completes within the window → the full terminal result is returned directly (including result and cost)
  • Window exceeded → the current state is returned; continue polling GET /v1/tasks/{task_id}

Billing & Refunds

Models without a configured price are rejected at submission (HTTP 500, code: price_not_configured) — a task is never accepted and then mis-billed.

Webhook Callbacks

Set callback_url when submitting a task and QWave API will push the result to your endpoint when the task finishes:

Cancel a Task

Only queued tasks can be cancelled. Cancellation automatically refunds the quota:
Image and video URLs in task results have a limited lifetime — download and store them promptly.