Comfy API: deploy your ComfyUI workflow as an API
How to deploy a ComfyUI workflow as an autoscaling API with Comfy API, how billing works, and how to fix common deployment issues.
Q. What is Comfy API?
Comfy API turns your ComfyUI workflow into a production API. It packages your custom nodes, models, LoRAs, and Python dependencies into an endpoint. The endpoint runs on managed GPUs and scales up and down with demand.
There are three parts:
Build: your ComfyUI environment, including public or private custom nodes, public or private models, pinned Python dependencies, and the ComfyUI version. Builds are immutable and versioned, so the same Build always gives you the same environment.
Release: a version of your Build that's ready to deploy.
Deployment: a release running as an endpoint, on the GPU and region you choose.
You can call the endpoint from an app, an internal tool, a website, or an automated pipeline. Comfy API is part of the Comfy Developer Platform at platform.comfy.org, and it's available on all paid Comfy plans.
Q. How is Comfy API different from Comfy Cloud and Comfy Router?
Comfy Cloud is ComfyUI in your browser, ready to use with no setup. It's best for building and running workflows yourself.
Comfy API deploys your own ComfyUI environment as a dedicated endpoint. It's best when an app or pipeline needs to run your workflow.
Comfy Router is one API for hosted image and video models, billed per request. It's best for calling a model directly, without a workflow.
👉 See Comfy Docs – Deploying ComfyUI
Q. Which plan do I need?
Comfy API is available on all paid Comfy plans, starting with Standard. It isn't available on the Free plan.
Each plan has its own limits on how many deployments and releases you can have, and how many workers each deployment can run. Higher plans have higher limits.
To see Builds that teammates create in your workspace, you need a Team or Enterprise plan.
Enterprise plans can also share Builds with their team through Comfy Desktop, control which models, partner nodes, and custom nodes the team can use, and lock pipelines so nothing changes in production. Contact sales to learn more.
👉 See Comfy pricing
Q. How do I get started?
Sign in at platform.comfy.org, then choose how to start:
With a coding agent (recommended): Open your coding agent in the folder of the ComfyUI install you want to deploy, and paste the prompt from the Comfy API Quickstart. The agent installs comfy-cli, packages your install, and asks for your approval before it deploys anything.
With the Build Wizard: Open the Build Wizard and import a workflow JSON file or a Comfy Desktop snapshot.
From ComfyUI: Open your workflow, open the graph menu, and choose Deploy to Comfy API. If you don't see this option yet, use the Build Wizard.
Whichever path you choose, review the models and custom nodes in your Build before you create a release, and add anything that's missing.
To use the command line, you need Python 3.10 or newer and comfy-cli (pip install -U comfy-cli). Sign in with comfy cloud login, or set a workspace API key in COMFY_CLOUD_API_KEY.
👉 See Comfy Docs – Comfy API Quickstart
👉 See Comfy Docs – Other ways to create a Build
Q. How do I call my deployment from my app?
Each deployment gets its own endpoint URL, such as https://<deployment>.run.comfy.app.
Authenticate with your Comfy API key:
Authorization: Bearer <your-api-key>Send workflows in API format. In ComfyUI, use File → Export (API).
Use the official Python and TypeScript SDKs, or call Comfy API v2 over HTTP from any language.
To test from your terminal, run comfy deploy run --workflow workflow_api.json --deployment <deployment-id>. It runs the workflow and downloads the outputs.
👉 See Comfy Docs – Comfy SDKs
👉 See Comfy Docs – Comfy API v2
👉 See How to generate a Comfy API key
Q. How am I billed?
You need a paid Comfy plan. On top of your plan, you only pay for what you use, charged from your workspace's credits:
GPU time: every second a worker is up for your deployment, including startup, jobs, and warm workers you keep running. Each GPU (RTX PRO 6000, H100, H200, or B200) has one per-second rate, the same in every region.
Storage: your models are staged on storage that the deployment's workers share. It's billed per GB-month while any deployment of that Build exists in that region, including stopped deployments.
Container disk is included in the GPU price, so it isn't billed separately.
Builds and releases are free to create and keep. Usage billing starts when you deploy.
Each deployment has a minimum and a maximum number of workers:
Minimum workers are always on, so requests never wait for a cold start. They're billed the whole time, even when idle.
Extra workers start when requests come in, up to your maximum. They're billed from startup, including model loading, until about 30 seconds after they go idle.
A minimum of 0 lets the deployment scale to zero. You pay no GPU time while it's idle, but the next request waits for a cold start.
👉 See Comfy pricing for current rates
Q. How do I stop or delete a deployment?
Stop pauses the deployment and keeps its endpoint URL and models, so you can start it again later. GPU billing stops, but storage is still billed.
comfy deploy stop --deployment <deployment-id>
comfy deploy start --deployment <deployment-id>Delete removes the endpoint and can't be undone. Your Build and releases are kept, and storage billing ends shortly after you delete the last deployment of that Build in that region.
comfy deploy delete --deployment <deployment-id>You can also delete Builds and deployments from your developer console at platform.comfy.org.
Q. Why am I still being charged?
Check these, most common first:
A deployment is still running. Deployments are billed while they're queued, provisioning, starting, ready, or unhealthy. An unhealthy deployment isn't serving requests but still costs the same. List everything in your workspace with
comfy deploy ls --workspace.Your minimum workers are above 0. They're billed even with no traffic. Lower it with
comfy deploy scale --deployment <deployment-id> --min 0 --max <max-workers>.A new release created a second deployment. Deploying a new release doesn't update your existing deployment. It creates a new one with a new endpoint URL, and the old one keeps running until you stop it.
A stopped deployment still has storage. Stopping ends GPU billing, but model storage is billed until the deployment is deleted.
A stop didn't go through. If the status shows
stop_failed, run the stop command again.
Q. What happens if my workspace runs out of credits?
Your deployments stop automatically, and comfy deploy status shows the stop reason as credits. Retrying won't help until you add credits. Add credits to your workspace at platform.comfy.org, then restart with comfy deploy start --deployment <deployment-id>.
Q. My deployment is stuck or won't start. What do I do?
Check its status, events, and logs:
comfy deploy status --deployment <deployment-id> --watch
comfy deploy events --deployment <deployment-id>
comfy deploy logs --deployment <deployment-id>Common causes:
No GPU capacity in that region. Availability changes often. Run
comfy deploy refs computeand choose another GPU and region.Large models. Models are copied to the deployment's storage before it starts, so large Builds take longer to come up.
Plan limits. Your plan sets how many deployments you can have and how many workers each one can run. Stop or scale down another deployment, or upgrade your plan.
The CLI lost track of it. If the command stops following the deployment, it may still be coming up. Check it with
comfy deploy status --watchinstead of deploying again.
Q. My workflow was rejected or failed. What do I do?
Wrong format: deployments only accept workflows in API format. Use File → Export (API) in ComfyUI, not a regular save.
Too large: a job can be up to 10 MB. Move embedded images or long text out of the workflow and pass them as input files instead.
Missing node or model: your Build doesn't include something the workflow uses. Add it and deploy a new release (see below).
Deployment not ready: jobs only run once the deployment's status is
ready.
💡 comfy skills show comfy-deploy-failures explains every deployment error code and how to fix it.
Q. Why does my output link return a 401 error?
The url on a job's output needs your API key, so it won't open in a browser or for your users. Use the signed download URL instead, for example getDownloadUrl() in the SDKs. Signed URLs expire after a few hours, and the response tells you when.
Inputs and outputs are deleted from our servers after 24 hours, so copy anything you want to keep to your own storage.
Q. How do I add custom nodes or models to my deployment?
A deployment always runs one release, so changes to its environment need a new release:
Update your Build with the new custom nodes or models.
Push the Build and create a new release.
Deploy the new release. This creates a new deployment with a new endpoint URL.
Point your app to the new URL, then stop or delete the old deployment so it stops billing.
👉 See Comfy Docs – Comfy API Deployment Guide
Q. Are my private nodes and models safe? Is my data kept?
Your custom nodes, models, and code are kept in your Builds and deployments until you delete them. You can delete them from your developer console at platform.comfy.org.
Inputs and outputs sent through Comfy API are kept on our servers for 24 hours, then deleted.
We only keep uploaded inputs longer when the law requires it, for example if we detect illegal content.
Q. I was in the limited beta. What happens to my deployments?
Nothing changes. Your deployments keep working as normal.
Q. Does Comfy API support webhooks?
Not yet. Webhooks, metrics, and scoped API keys are planned for a later release. For now, check the job for results, or use the SDKs, which wait for the job to finish for you.
Q. Where can I get help?
Docs: the Quickstart and Deployment Guide cover setup, scaling, and billing in detail.
Community: ask in
#developer-platformon our Discord.Support: use Report a Bug for deployment issues or Billing / Refund Issue for charges. Include your Build, release, and deployment IDs so we can look into it quickly.