API reference · Account
The billed price of exactly this job
POST/api/studio/quoteSigned in session
What the job would be held at, markup on; nothing is made or held. With free_shot, an account that may take the first shot on us is answered free: true at nothing, on the free shot's own model. 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. |
| free_shot | object | |
| free_shot. | string | One of "coast", "fashion", "product". |
| free_shot. | string | One of "push-in", "pull-out", "orbit", "crane-up", "dolly-zoom", "tracking", "handheld", "drone", "whip-pan", "static". |
Example
{
"kind": "video",
"model": "antimatter/auto",
"prompt": "Say hello in five words."
}Answer 200
The price.
| Field | Type | What it is |
|---|---|---|
| free | boolean | Present when this preset would be the account's first shot on us. One of true. |
| free_unavailable | string | With free_shot, present when the first shot on us is not offered because the abuse rules marked the account; the price is the job's own. One of "flagged". |
| micros | integer | |
| worst_micros | integer | The most the job could be held at, should the cheapest provider fail at submit and a dearer one of the same model take it. |
| model | string | |
| held | object | For a task model: what the price was held from, the whole seconds of output measured from its files, the characters read, or a picture's megapixels to a tenth (the output's for an upscale, the still's for a fill). |
| held. | number | |
| held. | integer | |
| held. | number |
Errors
- 400OpenAI shaped error.
- 401OpenAI shaped error.
- 404OpenAI 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.