Comfy API: deploy your ComfyUI workflow as an API

Last updated: September 29, 2026

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 its models, custom nodes, and settings.

  • 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.

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. 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. Paste in 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.

💡 The SDKs and Comfy API v2 are in beta, so some details may still change.

👉 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 only pay for what you use, and charges come out of your workspace's credits.

  • GPU time: billed per second for each running worker. The rate depends on the GPU: RTX PRO 6000, H100, H200, or B200.

  • 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: each worker has a 50 GB disk, billed only while that worker is running.

  • Builds and releases are free to create and keep. 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 it can't be undone. Your Build and releases are kept. Storage billing ends shortly after you delete the last deployment of that Build in that region.

comfy deploy delete --deployment <deployment-id>

Q. Why am I still being charged?

Check these, most common first:

  1. 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 costs the same as a ready one. List every deployment in your workspace with comfy deploy ls --workspace.

  2. Your minimum workers are above 0. Minimum workers are billed even with no traffic. Lower the minimum with comfy deploy scale --deployment <deployment-id> --min 0 --max <max-workers>.

  3. 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.

  4. A stopped deployment still has storage. Stopping ends GPU billing, but model storage is billed until the deployment is deleted.

  5. 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 compute and 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.

  • Workspace limits. Each workspace has a limit on active deployments and workers. Stop or scale down another deployment, then try again.

  • The CLI lost track of it. If the command stops following the deployment, the deployment may still be coming up. Check it with comfy deploy status --watch instead of deploying again.

Q. My workflow was rejected or failed. What do I do?

  • Wrong format: deployments only accept workflows in API format. In ComfyUI, use File → Export (API), 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 in as input files.

  • Missing node or model: your Build doesn't include something the workflow uses. Add it to the Build and deploy a new release (see below).

  • Deployment not ready: jobs only run once the deployment's status is ready.

💡 Run comfy skills show comfy-deploy-failures to see 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 requires your API key, so it won't open in a browser or for your users. Use the signed download URL instead, for example from getDownloadUrl() in the SDKs. Signed URLs expire after a few hours, and the response says exactly when. If you need to keep outputs, copy them to your own storage.

Q. How do I add custom nodes or models to my deployment?

A deployment always runs one release, so any change to its environment needs a new release:

  1. Update your Build with the new custom nodes or models.

  2. Push the Build and create a new release.

  3. Deploy the new release. This creates a new deployment with a new endpoint URL.

  4. 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. Where can I get help?