Skip to main content
POST
https://api.comfycontrol.app
/
v1
/
workflow
/
{id}
/
cancel
Cancel Workflow
curl --request POST \
  --url https://api.comfycontrol.app/v1/workflow/{id}/cancel \
  --header 'Authorization: Bearer <token>'
{
  "400": {},
  "401": {},
  "404": {},
  "500": {}
}

Overview

Cancel a workflow that is currently queued or running. This gracefully stops the workflow execution and updates its status to cancelled.
Only workflows in queued or running status can be cancelled. Completed, failed, or already cancelled workflows cannot be cancelled again.

Path Parameters

id
string
required
The unique identifier (UUID) of the workflow to cancel.

Response

Returns a 200 OK status with no body on successful cancellation.

Example Response

Status: 200 OK

Error Responses

400
error
Bad request - workflow cannot be cancelled.Common causes:
  • Workflow is already in a terminal state (completed, failed, cancelled)
  • Workflow status is accepted or uploaded (not yet queued)
401
error
Unauthorized - invalid or missing authentication token.
404
error
Not Found - workflow with the specified ID does not exist or does not belong to your account.
500
error
Internal Server Error - unable to communicate with the runner to cancel the workflow.

Notes

  • Cancellation is a graceful operation that signals the runner to stop execution
  • The workflow status will be updated to cancelled after successful cancellation
  • Any partially generated outputs may or may not be saved depending on when cancellation occurs
  • Use this to stop long-running or stuck workflows
  • Cancellation may take a few seconds to complete as the runner processes the signal
  • If the workflow completes before the cancellation signal is processed, it will remain in completed status
  • Cancelled workflows count toward your workflow history