Skip to main content
Experimental API: This API is experimental and subject to change. Endpoints, request/response formats, and behavior may be modified without notice.

Comfy Cloud API

The Comfy Cloud API provides programmatic access to run workflows on Comfy Cloud infrastructure. The API is compatible with local ComfyUI’s API, making it easy to migrate existing integrations.
Subscription Required: Running workflows via the API requires an active Comfy Cloud subscription. See pricing plans for details.

Base URL

https://cloud.comfy.org

Authentication

All API requests require an API key passed via the X-API-Key header.

Getting an API Key

1

Visit https://platform.comfy.org/login and Log In

Please visit https://platform.comfy.org/login and log in with the corresponding accountVisit Platform Login Page
2

Click `+ New` in API Keys to Create an API Key

Click + New in API Keys to create an API KeyCreate API Key
3

Enter API Key Name

Enter API Key Name
  1. (Required) Enter the API Key name,
  2. Click Generate to create
4

Save the Obtained API Key

Obtain API Key
Since the API Key is only visible upon first creation, please save it immediately after creation. It cannot be viewed later, so please keep it safe. Please note that you should not share your API Key with others. Once it leaked, you can delete it and create a new one.
Keep your API key secure. Never commit it to version control or share it publicly.

Using the API Key

Pass your API key in the X-API-Key header with every request:
curl -X GET "https://cloud.comfy.org/api/user" \
  -H "X-API-Key: $COMFY_CLOUD_API_KEY"

Core Concepts

Workflows

ComfyUI workflows are JSON objects describing a graph of nodes. The API accepts workflows in the “API format” (node IDs as keys with class_type, inputs, etc.) as produced by the ComfyUI frontend’s “Save (API Format)” option.

Jobs

When you submit a workflow, a job is created. Jobs are executed asynchronously:
  1. Submit workflow via POST /api/prompt
  2. Receive a prompt_id (job ID)
  3. Monitor progress via WebSocket or poll for status
  4. Retrieve outputs when complete

Outputs

Generated content (images, videos, audio) is stored in cloud storage. Output files can be downloaded via the /api/view endpoint or through signed URLs.

Quick Start

Here’s a minimal example to run a workflow:
curl -X POST "https://cloud.comfy.org/api/prompt" \
  -H "X-API-Key: $COMFY_CLOUD_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"prompt": '"$(cat workflow_api.json)"'}'

Available Endpoints

CategoryDescription
WorkflowsSubmit workflows, check status
JobsMonitor job status and queue
InputsUpload images, masks, and other inputs
OutputsDownload generated content
WebSocketReal-time progress updates
Object InfoAvailable nodes and their definitions

Next Steps