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-generationsRequest Body
| Field | Type | Required | Description |
|---|---|---|---|
model | string | No | Media model identifier. When omitted, routing uses the configured default provider behavior. |
prompt | string | Yes | Description of the desired output. |
n | integer | No | Image count from 1 through 10; defaults to 1. |
seed | integer | No | Non-negative deterministic seed when supported. |
| Additional fields | object | No | Provider-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
- Submit an image, video, or music generation request.
- Store the returned task ID.
- Poll
GET /v1/async-tasks/{task_id}until the task completes. - 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.