Queue endpoints
Base URL:https://api.runcomfy.net
| Endpoint | Method | Description |
|---|---|---|
/prod/v1/deployments/{deployment_id}/inference | POST | Run workflow |
/prod/v1/deployments/{deployment_id}/requests/{request_id}/status | GET | Check job status |
/prod/v1/deployments/{deployment_id}/requests/{request_id}/result | GET | Get job result |
/prod/v1/deployments/{deployment_id}/requests/{request_id}/cancel | POST | Cancel job |
Common Path Parameters
-
deployment_id: String (required). This is the unique ID for your deployed workflow. You get it when you create a deployment. It tells the server which workflow to use. -
request_id: String (required for non‑submit endpoints). This is the unique ID for a specific job, given back when you submit a request.
Submit a Request
workflow_api.json as the base configuration for that deployment. By default, each POST to this endpoint runs that cloud-saved workflow and lets you tweak inputs via overrides. For advanced cases, you can instead include a complete different workflow_api.json inline and skip the cloud-saved workflow entirely.
Use Cloud-Saved Workflow
In this mode, the server uses the deployment’s cloud-saved workflow’sworkflow_api.json and applies any per-request changes you send in overrides. Unspecified values fall back to the saved defaults. overrides reference the workflow_api.json, target specific nodes (by ID) and updates only their inputs. For guidance on valid ranges, types, and defaults, refer to the object_info.json.
Read more about workflow_api.json and object_info.json here.
The following snippet shows two nodes from a sample flux_workflow_api.json file, illustrating typical structure with inputs like text prompts and seeds. View the complete example here: runcomfy-flux-workflow-api.json.
Request Example - Basic
For example, this request overrides theseed in KSampler (ID 31) and the text in CLIPTextEncode (ID 6) from flux_kontext_workflow_api.json.
- Keys: Node IDs as strings (e.g.,
31), matching your workflow’s API JSON exactly. - Values: Objects with an
inputsfield containing input names and updated values (e.g.,{ "inputs": { "seed": 987654321 } }). - Behavior & validation: Only the provided inputs are changed (others stay as defined); keys, input names, and value types must conform to your workflow’s API JSON schema.
Request Example - Image/Video
You can provide image/video in two ways: via URL or via Base64 data URI. Via URL: Overrides the image/video input with a public URL. Recommended limits: images ≤50MB (around 4K); videos ≤100MB (about 2–5 minutes at 720p).Request Example - API Nodes
If your workflow uses ComfyUI API Nodes that require an API key, include it in the request body asextra_data.api_key_comfy_org. The key is passed to the node at runtime, used only for the duration of the request, and discarded upon completion.
Note: extra_data and overrides are top-level sibling fields in the JSON payload, keep them side by side.
Response Example
request_id(string): Unique identifier for the job.status_url(string): URL to poll for job progress.result_url(string): URL to fetch outputs once the job completes.cancel_url(string): URL to cancel the job.
Send Dynamic Workflow or Any workflow Json
If you need to run a different workflow than the one you cloud saved, provide a different ComfyUI Workflow API JSON in the top-levelworkflow_api_json field and omit overrides. In this mode, the underlying ComfyUI instance executes the inline workflow and ignores the cloud-saved one for that request. This allows you to send any workflow to your deployment endpoint, for instance, one that dynamically inserts an upscaler node based on user input. The only requirement is that the deployed machine template already contains the nodes, models, and ComfyUI version needed by the new workflow.
Request Example
Response Example
The response format is identical to the cloud-saved workflow mode:Monitor Request Status
Request Example
Response Example
status(string): Current state (e.g.,in_queue,in_progress,completed, orcancelled).- For
in_queue:queue_position(integer): Your position in the queue.result_url(string): URL where results will be available.
- For
in_progress,completed, orcancelled:result_url(string): The URL to get the final outputs (available only whencompletedorcancelled).instance_id(string): Identifier of the live instance processing/that processed this job. Use it with the Instance Proxy to call ComfyUI native endpoints. See Instance Proxy Endpoints.
Retrieve Request Results
completed.
Note: Output media are retained for 7 days; after that they are no longer available.
Request Example
Response Example
status(string): Outcome (e.g.,succeeded,failed,in_queue,in_progress,cancelled).- For
succeeded:outputs(array): Generated files, each with:url(string): Direct link to the output file (e.g.,https://example.com/outputs/ComfyUI_00001_.png).filename(string): Name of the output file.
created_at(string): When the request was created.finished_at(string): When the request completed.
- For
failed:error: Details on why the job failed.created_at(string): When the request was created.finished_at: When the request failed or was cancelled.
- For
in_queue,in_progress, orcancelled:created_at(string): When the request was created.finished_at(string, only forcancelled): When the request was cancelled.
Cancel a Request
Request Example
Response Example
outcome(string): Outcome (e.g.,cancelledif accepted,not_cancellableif the job is completed or otherwise cannot be cancelled).
