API reference · Account
Start a render plan
POST/api/studio/projects/{id}/plansSigned in session
The quoted total is held whole in one conditional step, so either the whole batch is held and the plan starts or nothing is held or made (402 plan_unfunded when the balance falls short). Each shot then runs as its own job whose hold moves out of the plan's, a few at a time per account, the rest waiting for a slot; what is left of the plan's hold is released when it closes. A balance only, never the free allowance; a freeze and the monthly cap apply, checked again as each shot starts. A 404 while video and sound jobs are switched off. The signed in account; same origin only.
Parameters
| Field | Type | What it is |
|---|---|---|
| id (path)required | string | The project's id, stp_ followed by hex. |
Request body
application/json, required
| Field | Type | What it is |
|---|---|---|
| shotsrequired | array of object | |
| shots[] | string | A clip, a sound, or a still: a picture for a shot to start from. One of "video", "sound", "still". |
| shots[] | string | |
| shots[] | string | |
| shots[] | number | |
| shots[] | string | |
| shots[] | string | |
| shots[] | boolean | |
| shots[] | 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. |
| shots[] | 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. |
| shots[] | 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. |
| shots[] | string | The last frame, for a model whose endFrame is true: a picture as references takes one. |
| shots[] | string | |
| shots[] | integer | |
| shots[] | string | |
| shots[] | 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. |
| shots[] | string | |
| pictures | array of string | Starting pictures as data:image URLs, sent once: a shot's image may say picture:<index> to name one. |
Example
{
"shots": [
{
"kind": "video",
"model": "antimatter/auto",
"prompt": "Say hello in five words."
}
],
"pictures": [
"string"
]
}Answer 201
The plan, running.
| Field | Type | What it is |
|---|---|---|
| id | string | |
| object | string | One of "studio.plan". |
| project_id | string | |
| status | string | One of "running", "completed", "cancelled". |
| quote_micros | integer | The total the balance was checked against. |
| micros | integer | Settled shots' charges plus running shots' holds. |
| counts | object | |
| shots | array of object | |
| shots[] | string | |
| shots[] | string | One of "studio.shot". |
| shots[] | integer | |
| shots[] | string or null | |
| shots[] | string | |
| shots[] | string | One of "waiting", "starting", "running", "completed", "failed", "cancelled". |
| shots[] | integer | The quote while it waits, the job's hold while it runs, the charge once done. |
| shots[] | string or null | |
| shots[] | object or null | The shot's job, as /api/studio/jobs answers it. |
| shots[] | object or null | |
| shots[] | string | |
| shots[] | string | |
| shots[] | integer | |
| shots[] | integer or null | |
| shots[] | integer or null | |
| created_at | integer | |
| finished_at | integer or null |
Errors
- 400OpenAI shaped error.
- 401OpenAI shaped error.
- 402OpenAI shaped error.
- 403OpenAI shaped error.
- 404OpenAI shaped error.
- 429OpenAI 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.