jobs
Request cancellation
Changed onRequests cancellation and returns the current job object — canceling (interruption takes effect at node/step boundaries) or already-terminal. Idempotent: canceling a finished job is a no-op returning the terminal state. On serverless, GPU seconds consumed before the interrupt takes effect are still billed.
post/api/v2/jobs/{id}/cancel
Request
- Base URL: http://127.0.0.1:8189
- URL: http://127.0.0.1:8189/api/v2/jobs/{id}/cancel
- Auth: one of:
- HTTP bearer
- none
Path parameters
idstring required
Response
Current job state.
Example response
{
"id": "7f3d2c1b-9a8e-4d6f-b012-3c4d5e6f7a8b",
"progress": {
"value": 0.42,
"nodes_done": 11,
"nodes_total": 31,
"current_node": "12",
"current_node_class": "KSampler",
"step": 21,
"steps": 50,
"message": "KSampler 21/50"
},
"outputs": [
{
"node_id": "9",
"name": "ComfyUI_00001_.png",
"content_type": "image/png",
"size_bytes": 1848320,
"id": "9f8a1c0d-2b3e-4f56-..."
}
],
"error": {
"code": "node_execution_error"
},
"metrics": {
"queue_ms": 9000,
"execution_ms": 42000
}
}Changes
- info
added the optional property
/to the response with the status
- info
- info
added the optional property
//to the response with the status
- info