API reference

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

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.

Example

{
  "kind": "video",
  "model": "antimatter/auto",
  "prompt": "Say hello in five words."
}

Answer 200

The job, queued.

Fields of the 200 answer
FieldTypeWhat it is
idstring
kindstringOne of "video", "sound", "still".
modelstring
statusstringOne of "queued", "in_progress", "completed", "failed", "cancelled".
progressinteger or null
microsintegerThe hold while running, the charge once settled.
created_atinteger
completed_atinteger or null
expires_atinteger or null
errorobject or null
error.codestring
error.messagestring
failoverobjectPresent 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.triedinteger
failover.reasonsarray of string
failover.first_hold_microsinteger
failover.dearerboolean
storedobject or nullOn GET /api/studio/jobs where stored media is on: the stored copy of the output and where it stands.
stored.asset_idstring
stored.statusstringOne of "ready", "awaiting", "failed".
queueobjectOn 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.stagestringOne of "queued", "running".
queue.aheadinteger or null
queue.typical_secondsinteger 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.

Antimatter