Skip to content

Cancel Job

POST
/api/jobs/{prompt_id}/cancel
curl --request POST \
--url https://example.com/api/jobs/example/cancel \
--header 'Authorization: Bearer <token>'

Take an unfinished job off its node and mark it failed with error “Cancelled”.

A queued job is deleted from the node’s queue. A running one is interrupted only when the node reports it as the job on the GPU, since an untargeted /interrupt stops whatever is running, and older ComfyUI builds ignore the prompt_id it is sent with. If the node doesn’t answer, the job is closed in Studio only.

prompt_id
required
Prompt Id
string

Successful Response

Media typeapplication/json
Response Cancel Job Api Jobs Prompt Id Cancel Post
object
key
additional properties
any
Examplegenerated
{}

Validation Error

Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationError
object
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
Examplegenerated
{
"detail": [
{
"loc": [
"example"
],
"msg": "example",
"type": "example"
}
]
}