API reference · Account
Make a video or sound job on the signed in account
POST/api/studio/jobsSigned in session
Billed to the signed in account's own balance with no key, through the same job pipeline as /v1/videos and /v1/sounds: a balance only, never the free allowance, held at the worst case, settled at the provider's price with the media job markup; a freeze and the monthly cap apply. Same origin only. While video and sound jobs are switched off this door answers the unknown endpoint 404 (code unknown_endpoint).
Request body
application/json, required
| Field | Type | What it is |
|---|---|---|
| kindrequired | string | A clip, a sound, or a still: a picture for a shot to start from. One of "video", "sound", "still". |
| modelrequired | string | |
| promptrequired | string | |
| seconds | number | |
| resolution | string | |
| aspect_ratio | string | |
| audio | boolean | |
| image | string | The starting picture for a model whose input is image: an https URL, or a data:image/png, jpeg or webp base64 URL of at most 5242880 bytes decoded. |
| image_asset | string | A picture the account stored (sa_ followed by hex) to start from instead of image; sent to the provider as a data URL, never as a link to the store. For a talking still, a motion control, an upscale of a picture (enlarge) or a fill (inpaint), the still it starts from, which the provider fetches through a signed link on this origin that lapses after 30 minutes; an upscale or a fill is held from the still's own size, read from the file on the server. |
| references | array of string | Reference pictures a model keeps a subject from (a character's), or a still is made from, as many as the model takes (its references in the model list): each an https URL, a data:image URL, or a stored picture (sa_ followed by hex) sent as a data URL. |
| end_image | string | The last frame, for a model whose endFrame is true: a picture as references takes one. |
| project_id | string | The project (stp_ followed by hex) the clip belongs to: where stored media is on its output is copied into the store with the project, and the project's progress stream reports it. |
| video_asset | string | For a task model (lip sync, restyle, extend, upscale, motion control): the stored clip (sa_ followed by hex) it starts from, for a motion control the clip whose movement is copied. Read and measured on the server; the job is held from its measured length and the provider fetches it through a signed link on this origin that lapses after 30 minutes. |
| audio_asset | string | For a lip sync or a talking still: the stored voice line (sa_ followed by hex), read and measured on the server. |
| clone_asset | string | For a speech model that clones a voice: a stored recording (sa_ followed by hex) of the caller's own voice. Needs own_voice. |
| voice | string | For a speech model: one of the voices it publishes (GET /api/studio/models). |
| own_voice | boolean | Says the clone_asset recording is the caller's own voice. A clone is refused without it. One of true. |
| mask_asset | string | For a fill (task inpaint): a stored PNG (sa_ followed by hex) of the still's own size, white over the part to fill and black over what stays. Both frames are read from the files on the server; a mask of another size, or not a PNG, is refused naming mask_asset. The provider fetches it through a signed link on this origin that lapses after 30 minutes. |
| negative_prompt | string | |
| seed | integer | |
| lyrics | string | |
| camera | string or null | A camera move phrased into a video's prompt on the server. One of "push-in", "pull-out", "orbit", "crane-up", "dolly-zoom", "tracking", "handheld", "drone", "whip-pan", "static", null. |
Example
{
"kind": "video",
"model": "antimatter/auto",
"prompt": "Say hello in five words."
}Answer 200
The job, queued.
| Field | Type | What it is |
|---|---|---|
| id | string | |
| kind | string | One of "video", "sound", "still". |
| model | string | |
| status | string | One of "queued", "in_progress", "completed", "failed", "cancelled". |
| progress | integer or null | |
| micros | integer | The hold while running, the charge once settled. |
| created_at | integer | |
| completed_at | integer or null | |
| expires_at | integer or null | |
| error | object or null | |
| error. | string | |
| error. | string | |
| failover | object | Present only when the cheapest provider was unreachable or answered a server error at submit and the job went to the next provider of the same model: how many were tried, why, the first hold, and whether the job is now held dearer. No provider is named. |
| failover. | integer | |
| failover. | array of string | |
| failover. | integer | |
| failover. | boolean | |
| stored | object or null | On GET /api/studio/jobs where stored media is on: the stored copy of the output and where it stands. |
| stored. | string | |
| stored. | string | One of "ready", "awaiting", "failed". |
| queue | object | On GET /api/studio/jobs while the job is queued or running: queued at its provider (with how many requests are ahead of it where the provider's status says one) or being made, and the median seconds this model's takes took from submit to landing over the last 7 days, from at least 5 of them (null with fewer). Nothing is estimated without them. |
| queue. | string | One of "queued", "running". |
| queue. | integer or null | |
| queue. | integer or null |
Errors
- 400OpenAI shaped error.
- 401OpenAI shaped error.
- 402OpenAI shaped error.
- 403OpenAI shaped error.
- 404OpenAI shaped error.
- 429OpenAI shaped error.
- 502OpenAI shaped error.
Every error answers in one shape, with its type, code and the field it names. The whole list is in the docs' Errors section.