Endpoint
Request Body
object
required
The workflow definition containing all nodes and their configurations. Each key is a node ID, and the value contains the node’s class type and inputs.
string
Optional custom identifier for the prompt. If not provided, a UUID will be generated automatically.
string
Optional client identifier for tracking execution via WebSocket. Automatically added to
extra_data if provided.number
Optional queue position number. If not provided, the prompt is added to the end of the queue.
boolean
When
true, adds the prompt to the front of the queue (high priority). Only works when number is not specified.object
Additional metadata to store with the prompt execution.
array
Optional array of node IDs to execute. When provided, only these nodes and their dependencies will be executed.
Response
string
Unique identifier for the queued prompt. Use this to track execution status and retrieve results.
number
Queue position number assigned to this prompt.
object
Object containing any validation errors for specific nodes. Empty if validation passed.
Error Response
object
Error information when prompt validation fails.
object
Validation errors for specific nodes in the workflow.
Example Request
Example Response (Success)
Example Response (Error)
Python Example
JavaScript Example
Notes
The
prompt object structure depends on your workflow. Export it from ComfyUI using “File → Export (API)” to get the correct format.See Also
- GET /history - Retrieve execution results
- GET /queue - View current queue status