Generate Async Media

Create image, video, or music jobs and retrieve their artifacts asynchronously.

Submit long-running media generation work without keeping an inference request open.

POST/v1/async-tasks/image-generations

Request Body

FieldTypeRequiredDescription
modelstringNoMedia model identifier. When omitted, routing uses the configured default provider behavior.
promptstringYesDescription of the desired output.
nintegerNoImage count from 1 through 10; defaults to 1.
seedintegerNoNon-negative deterministic seed when supported.
Additional fieldsobjectNoProvider-supported dimensions and generation controls. Unknown top-level fields are rejected; provider-specific options belong under provider_options or parameters.

Video requests accept a positive duration_seconds up to 300 and a positive integer fps up to 120. Music requests accept duration_seconds up to 1,200 and require at least one of prompt, lyrics, or title.

Task Lifecycle

  1. Submit an image, video, or music generation request.
  2. Store the returned task ID.
  3. Poll GET /v1/async-tasks/{task_id} until the task completes.
  4. Download output through the signed artifact URL.

Artifact URLs are time limited. Persist the final asset in your own storage when long-term retention is required.

Compatibility Aliases

Existing integrations may use /v1/images/generations, /v1/videos/generations, and /v1/music/generations. New integrations should use the explicit /v1/async-tasks/*-generations routes above.