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. If you are working in Python or TypeScript, use the Comfy SDKs. They wrap this API and are the shortest path to running a workflow. This page covers what is specific to Comfy Cloud: your API key, credits, and concurrency limits. Everything else is in the Cloud API Reference.Subscription required: API access is available on the Standard, Creator and Pro tiers. The Free tier does not include API access. See pricing plans for details.
Credits and Usage
API requests draw from the same monthly credit allocation as the Comfy Cloud web UI. There is no separate API credit pool. Each tier’s included credits, top-up options, and per-workflow runtime caps apply to API jobs in exactly the same way as UI jobs. See the pricing page for the monthly credit amounts on the Standard, Creator and Pro tiers. If you run out of credits mid-month, top-ups can be purchased from your account dashboard.Base URL
COMFY_BASE_URL. See Choosing a base URL.
Authentication
All API requests require an API key. Over raw HTTP you pass it in theX-API-Key header. With the SDKs you hand it to the client once and the client authenticates every request for you.
Getting an API Key
See Getting an API Key for instructions on creating and managing your Cloud API key.Using the API Key
401, which the SDKs raise as Unauthorized. A key on an inactive subscription returns 429.
The same key is used for Partner Nodes. Over HTTP you pass it again in extra_data.api_key_comfy_org. The SDKs do it for you when you pass api_key to submit().
Running Workflows
Workflows are submitted in API format, the JSON produced by the ComfyUI frontend’s “Export Workflow (API)” option. You submit a workflow, the job executes asynchronously, and you download the outputs when it finishes.Comfy SDKs
Install, submit a workflow, follow live progress, and save the outputs, in Python or TypeScript. Start here.
Parallel Execution (Concurrent Jobs)
API users can submit multiple workflows concurrently without waiting for previous jobs to complete. Submission returns as soon as the job is accepted, so you can keep several in flight. The dispatcher will run them in parallel up to your subscription tier’s limit.
Jobs submitted beyond your concurrency limit will queue normally and execute automatically as slots free up. If the queue itself is full, the SDKs retry for you within a bounded budget before raising
QueueFull.
Parallel execution is currently available via the API only. See pricing plans for subscription details.
What the SDKs Don’t Cover Yet
The SDKs do one thing: run a workflow and get the results back. The rest of the Cloud surface is reachable over HTTP only, so call these endpoints directly even if you use an SDK for execution.
Canceling a job is covered by both: the SDKs cancel a job you hold a handle to, and
POST /api/queue cancels by ID.
Available Endpoints
Error Handling
REST endpoints return standard HTTP status codes:
The SDKs raise these as typed exceptions instead, including
Unauthorized, InvalidWorkflow, InsufficientCredits, QueueFull, and JobFailed, all extending ComfyError.
Execution failures are separate from HTTP errors. See Error Handling for the exception_type values delivered during execution.
Next Steps
Comfy SDKs
Run workflows from Python or TypeScript. Assets, live events, and typed errors.
Cloud API Reference
Complete endpoint documentation with curl, Python, and TypeScript examples.
Comfy API v2 Reference
The versioned HTTP API underneath both SDKs. Use it from any language.
OpenAPI Specification
Machine-readable API spec for code generation.