ScenebrewDevelopers
API referenceOperations

Cancel Operation

POST
/v1/operations/{operation_id}/cancel

Ask the worker to stop: 202 with the operation in canceling; it ends canceled at the worker's next boundary. A turn keeps its partial reply and pays for the calls it made; a flat-priced step pays nothing. Cancel on a terminal operation is a no-op 200. Asset generation cannot be stopped once started (409 not_cancelable). Requires the write scope.

AuthorizationBearer <token>

First-party API key (sbk_live_…), presented as a Bearer token.

In: header

Path Parameters

operation_id*Operation Id
Formatuuid

Response Body

application/json

application/json

application/problem+json

curl -X POST "https://example.com/v1/operations/497f6eca-6276-4993-bfeb-53cbbbba6f08/cancel"
{  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "kind": "scene_step",  "status": "queued",  "target": {    "type": "scene",    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08"  },  "input": {},  "progress": {},  "result": {},  "error": {    "code": "string",    "message": "string",    "retryable": false  },  "credits_charged": 0,  "model": {    "id": "string",    "hosting": "scenebrew",    "billing": "credits"  },  "created_by": "ee824cad-d7a6-4f48-87dc-e8461a9201c4",  "created_at": "2019-08-24T14:15:22Z",  "started_at": "2019-08-24T14:15:22Z",  "finished_at": "2019-08-24T14:15:22Z",  "cancel_requested_at": "2019-08-24T14:15:22Z"}