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 |
deployment_id
: string (required)request_id
: string (required, except for submission)POST /prod/v1/deployments/{deployment_id}/inference
to start a new inference job. The API automatically loads the workflow you’ve already deployed for {deployment_id}
, so you only need to include overrides for the parts you want to change. Any parts you leave out will use the workflow’s default values. This makes it easy to tweak specific node inputs without having to upload the entire workflow JSON each time.
When setting overrides, make sure the node IDs, input keys, and value formats match your workflow’s API JSON exactly. If they don’t, the overrides won’t work. For media inputs like images or videos, you can provide a URL or a Base64 data URI inside the inputs
object.
For reference, here’s a sample file you can check: runcomfy-flux-kontext-workflow-api.json
seed
in KSampler
(ID "31"
) and the text
in CLIPTextEncode
(ID "6"
) from runcomfy-flux-kontext-workflow-api.json
.
image
in LoadImage
(ID "189"
) from runcomfy-flux-kontext-workflow-api.json
with a URL.
image
in LoadImage
(ID "189"
) from runcomfy-flux-kontext-workflow-api.json
with a Base64 data URI.
"31"
), matching your workflow’s API JSON exactly.inputs
field containing input names and updated values (e.g., { "inputs": { "seed": 987654321 } }
)."image": "https://example.com/new-image.jpg"
) or Base64 data URI (e.g., "image": "data:image/jpeg;base64,/9j/..."
) in the inputs
object.inputs
object as either Base64 data URIs or public URLs.
Via Base64 (Data URI)inputs
object (for example: "image": "data:image/jpeg;base64,/9j/..."
). Large files may slow down requests. Recommended limits: images ≤256KB (around 512x512); videos ≤1MB for short clips (around 480p).
Via URL (Public file link)inputs
object (for example: "image": "https://example.com/image.jpg"
). Keep in mind that some hosts may block requests. Recommended limits: images ≤50MB (around 4K); videos ≤100MB (about 2–5 minutes at 720p).
GET /prod/v1/deployments/{deployment_id}/requests/{request_id}/status
to check the current state of a queued or running job. Poll this endpoint periodically for updates on progress.
"in_queue"
, "in_progress"
, "completed"
, or "canceled"
)."in_queue"
:
"in_progress"
, "completed"
, or "canceled"
:
"completed"
or "canceled"
).GET /prod/v1/deployments/{deployment_id}/requests/{request_id}/result
to fetch outputs once the job status is "completed"
.
"succeeded"
, "failed"
, "in_queue"
, "in_progress"
, "canceled"
)."succeeded"
:
"https://example.com/outputs/ComfyUI_00001_.png"
)."failed"
:
"in_queue"
, "in_progress"
, or "canceled"
:
"canceled"
): When the request was canceled.POST /prod/v1/deployments/{deployment_id}/requests/{request_id}/cancel
to attempt to cancel a queued or running job.
"cancellation_requested"
if accepted, "not_cancellable"
if the job is completed or otherwise cannot be canceled).