API reference

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

Request body fields
FieldTypeWhat it is
kindrequiredstringA clip, a sound, or a still: a picture for a shot to start from. One of "video", "sound", "still".
modelrequiredstring
promptrequiredstring
secondsnumber
resolutionstring
aspect_ratiostring
audioboolean
imagestringThe 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_assetstringA 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.
referencesarray of stringReference 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_imagestringThe last frame, for a model whose endFrame is true: a picture as references takes one.
project_idstringThe 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_assetstringFor 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_assetstringFor a lip sync or a talking still: the stored voice line (sa_ followed by hex), read and measured on the server.
clone_assetstringFor a speech model that clones a voice: a stored recording (sa_ followed by hex) of the caller's own voice. Needs own_voice.
voicestringFor a speech model: one of the voices it publishes (GET /api/studio/models).
own_voicebooleanSays the clone_asset recording is the caller's own voice. A clone is refused without it. One of true.
mask_assetstringFor 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_promptstring
seedinteger
lyricsstring
camerastring or nullA 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_shotobject
free_shot.stillrequiredstringOne of "coast", "fashion", "product".
free_shot.camerarequiredstringOne 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.

Fields of the 200 answer
FieldTypeWhat it is
freebooleanPresent when this preset would be the account's first shot on us. One of true.
free_unavailablestringWith 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".
microsinteger
worst_microsintegerThe most the job could be held at, should the cheapest provider fail at submit and a dearer one of the same model take it.
modelstring
heldobjectFor 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.secondsnumber
held.charsinteger
held.megapixelsnumber

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.

Antimatter