API reference

API reference · API

Stop a render plan

POST/v1/studio/plans/{id}/cancelAPI key

Waiting shots are dropped; running ones are cancelled at their provider and cost nothing when never made, or are billed as made. With {shots: [shot ids]} only those shots stop, their share of the plan's hold given back, and the plan runs on. A 404 while video and sound jobs are switched off. An API key with the chat scope (a write or a spend). Rate limited per key at the key's own requests a minute, in a window of its own. An agent's key is refused (403 policy_violation). Every /v1/studio door is a 404 while video and sound jobs are switched off.

Parameters

Path and query parameters
FieldTypeWhat it is
id (path)requiredstringThe plan's id, spl_ followed by hex.

Request body

application/json, required

Request body fields
FieldTypeWhat it is
shotsarray of string

Example

{
  "shots": [
    "string"
  ]
}

Answer 200

The plan, cancelled.

Fields of the 200 answer
FieldTypeWhat it is
idstring
objectstringOne of "studio.plan".
project_idstring
statusstringOne of "running", "completed", "cancelled".
quote_microsintegerThe total the balance was checked against.
microsintegerSettled shots' charges plus running shots' holds.
countsobject
shotsarray of object
shots[].idstring
shots[].objectstringOne of "studio.shot".
shots[].indexinteger
shots[].titlestring or null
shots[].modelstring
shots[].statusstringOne of "waiting", "starting", "running", "completed", "failed", "cancelled".
shots[].microsintegerThe quote while it waits, the job's hold while it runs, the charge once done.
shots[].job_idstring or null
shots[].jobobject or nullThe shot's job, as /api/studio/jobs answers it.
shots[].errorobject or null
shots[].error.codestring
shots[].error.messagestring
shots[].created_atinteger
shots[].started_atinteger or null
shots[].finished_atinteger or null
created_atinteger
finished_atinteger or null

Errors

  • 401OpenAI 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.

Antimatter