Skip to main content
Long-running model and workflow invocations can opt into async mode by appending ?async=true to the run endpoint. The submit returns in under 500ms with an executionId; you then either poll GET /api/executions/:id or receive a webhook callback when the run completes. This page documents the async lifecycle. For webhook-based delivery, see Webhooks.

When to use async

  • Video generation — Seedance runs can take 30–90 seconds. Async lets your client return a job id immediately and poll/listen.
  • Audio generation — Suno V5 typically takes 30–60s for two tracks.
  • Image generation with long pipelines — gpt-image-2 with high quality settings.
  • CI / cron — submit dozens of jobs in parallel, poll/wait at the end.

Compatibility

?async=true is only supported on HTTP+polling defs (Seedance variants, Suno V5, gpt-image-2). Other providers reject the query parameter: Use sync mode (omit ?async=true) for unsupported providers.

Submit an async run

Response (returns in under 500ms):
boolean
Always true — sentinel telling clients “this is an async submit, not a sync result”.
string
Knouds-generated UUID. Use this to poll status or to dedupe webhook deliveries.
string
Provider-side request id (Kie.ai’s taskId, Suno’s id, etc.) — useful for cross-referencing in provider logs.
string
processing immediately after submit. Transitions to completed, failed, cancelled, or cancel_requested over time.
object
{configured: true, url: '...'} if your key has a webhook configured; otherwise {configured: false}.
string
Convenience path you can hit to check status (same as /api/executions/{executionId}).
The same shape applies to POST /api/workflows/:slug/run?async=true.

Poll an execution

Auth: capability execution:read (in every tier’s session AND api-key ceiling — even Free users can poll their own canvas async runs). Response:
Status transitions:
  • processing → completed (success — result populated)
  • processing → failed (provider error — error.code populated)
  • processing → cancel_requested → cancelled (you called cancel; provider may have already finished, in which case result is also populated)

Cancel an in-flight execution

Auth: capability execution:cancel (every tier).
Response:
Sub-100ms latency in the normal case (in-memory abort signal). Falls back to a database flag for crash recovery — server restarts after submit but before completion still honor the cancel on the next polling tick.
Always-charge policy. Provider compute is consumed when you submit, so cancelling mid-flight does NOT refund credits. Trial grants also consume the slot. This applies to both sync and async runs.
If the execution has already finalized, you’ll get one of:
For event-driven flows (no polling), configure a webhook on your key and skip the poll loop. See Webhooks.

Errors