Deployment management
list_deployments
List all Serverless API deployments in your account.
Backs: GET /prod/v2/deployments
| Parameter | Type | Required | Description |
|---|---|---|---|
ids | string[] | No | Filter to specific deployment IDs |
include_payload | boolean | No | Include workflow_api_json, overrides, and object_info_url |
include_readme | boolean | No | Include the deployment’s README markdown |
get_deployment
Get one deployment by ID, optionally including its full workflow graph.
Backs: GET /prod/v2/deployments/{deployment_id}
| Parameter | Type | Required | Description |
|---|---|---|---|
deployment_id | string | Yes | The deployment’s UUID |
include_payload | boolean | No | Include workflow_api_json and node schemas — use this to discover node IDs for submit_request |
include_readme | boolean | No | Include the deployment’s README |
Tip: Call withExample arguments:include_payload=trueto see every node’s ID and input names. Use those to build theoverridesobject forsubmit_request.
create_deployment
Create a new Serverless API (ComfyUI) deployment from a cloud-saved workflow.
Backs: POST /prod/v2/deployments
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
name | string | Yes | — | Human-readable name |
workflow_id | string | Yes | — | UUID of the ComfyUI workflow |
workflow_version | string | Yes | — | Version label (e.g., "v1") |
hardware | string | No | "AMPERE_48" | GPU SKU (see hardware table below) |
min_instances | integer | No | 0 | Warm instance floor (0–30). Billable if > 0. |
max_instances | integer | No | 1 | Concurrency ceiling (1–60) |
queue_size | integer | No | 1 | Pending requests per instance before scaling |
keep_warm_duration_in_seconds | integer | No | 60 | Idle timeout before scale-down |
For LoRA deployments, create via the RunComfy UI (Trainer > LoRA Assets > Deploy), then uselist_deploymentsto get thedeployment_id.
update_deployment
Partially update a deployment. Only pass the fields you want to change.
Backs: PATCH /prod/v2/deployments/{deployment_id}
| Parameter | Type | Required | Description |
|---|---|---|---|
deployment_id | string | Yes | The deployment’s UUID |
name | string | No | New name |
workflow_version | string | No | New version label |
hardware | string | No | New GPU SKU |
min_instances | integer | No | New warm floor |
max_instances | integer | No | New concurrency ceiling |
queue_size | integer | No | New queue threshold |
keep_warm_duration_in_seconds | integer | No | New idle timeout |
is_enabled | boolean | No | false to pause, true to resume |
delete_deployment
Permanently delete a deployment. This cannot be undone.
Backs: DELETE /prod/v2/deployments/{deployment_id}
| Parameter | Type | Required | Description |
|---|---|---|---|
deployment_id | string | Yes | The deployment’s UUID |
Considerupdate_deploymentwithis_enabled=falseto pause instead of deleting.
Inference
submit_request
Submit an async inference request to a deployment.
Backs: POST /prod/v1/deployments/{deployment_id}/inference
| Parameter | Type | Required | Description |
|---|---|---|---|
deployment_id | string | Yes | Target deployment |
overrides | object | No | Partial workflow graph keyed by node ID (see example below) |
workflow_api_json | object | No | Advanced: run a different workflow inline without updating the deployment |
extra_data | object | No | E.g., {"api_key_comfy_org": "comfyui-..."} for ComfyUI Core API nodes |
webhook_url | string | No | URL for push-based status updates |
webhook_intermediate_status | boolean | No | Fire webhooks on every status change, not just terminal |
wait_for_completion | boolean | No | If true, poll until done and return the result inline |
timeout_seconds | integer | No | Max wait (default 300) when wait_for_completion=true |
Useget_deploymentwithinclude_payload=trueto discover the node IDs and input names for your workflow.
get_request_status
Poll a request’s current status.
Backs: GET /prod/v1/deployments/{deployment_id}/requests/{request_id}/status
| Parameter | Type | Required | Description |
|---|---|---|---|
deployment_id | string | Yes | The deployment that owns this request |
request_id | string | Yes | The request ID returned by submit_request |
in_queue > in_progress > completed (or cancelled).
Example response:
get_request_result
Fetch the final outputs of a completed request.
Backs: GET /prod/v1/deployments/{deployment_id}/requests/{request_id}/result
| Parameter | Type | Required | Description |
|---|---|---|---|
deployment_id | string | Yes | The deployment that owns this request |
request_id | string | Yes | The request ID |
cancel_request
Cancel a queued or running request.
Backs: POST /prod/v1/deployments/{deployment_id}/requests/{request_id}/cancel
| Parameter | Type | Required | Description |
|---|---|---|---|
deployment_id | string | Yes | The deployment that owns this request |
request_id | string | Yes | The request ID |
cancelled if accepted, or not_cancellable if the request has already completed.
Example response:
Advanced
call_instance_proxy
Call a ComfyUI backend endpoint on a live instance.
Backs: POST /prod/v2/deployments/{deployment_id}/instances/{instance_id}/proxy/{comfy_backend_path}
| Parameter | Type | Required | Description |
|---|---|---|---|
deployment_id | string | Yes | The deployment |
instance_id | string | Yes | The running instance (from get_request_status when status is in_progress) |
comfy_backend_path | string | Yes | The ComfyUI backend route, e.g., api/free |
request_body | object | No | JSON body to send to the ComfyUI endpoint |
Instance IDs are ephemeral — they are only valid while the instance is running. If the instance shuts down, submit a new request to get a fresh instance.
