Persistent VMs are now available.Learn more

Turn ComfyUI workflows into production APIs

Export your ComfyUI workflow as JSON and Beam serves it as an API endpoint on cloud GPUs.

ComfyUI in production

Run Comfy on managed cloud GPUs, as an autoscaling API or the full interface.


From workflow to API in minutes

  1. Build ComfyUI into an image

    Install ComfyUI with comfy-cli, add your custom nodes, and bake model weights into the image or a volume.

  2. Export your workflow as JSON

    Use ComfyUI's export menu to save workflow_api.json.

  3. Deploy it as an API

    Wrap the workflow in an endpoint, deploy, and generate images over HTTP.

terminal
# Wrap an exported workflow in an API (api.py)
workflow = json.loads(WORKFLOW_FILE.read_text())
workflow["6"]["inputs"]["text"] = item["prompt"]

subprocess.run(
    f"comfy run --workflow {workflow_file} --wait",
    shell=True, check=True,
)

output = Output(path=latest_image)
output.save()
return {"output_url": output.public_url()}

# Deploy it
$ beam deploy api.py:handler

# Generate images over HTTP
$ curl -X POST https://comfy-xyz.app.beam.cloud/generate \
    -H 'Authorization: Bearer YOUR_TOKEN' \
    -d '{"prompt": "A cat in a spacesuit"}'

Frequently asked questions

Can I use custom nodes?

Yes. Install node packs with comfy node install as part of your image build. The same nodes you use locally work in the cloud.

How do model weights get loaded?

Bake them into the container image with huggingface-cli download, or store them on a persistent volume shared across containers.

Can I run the ComfyUI interface itself?

Yes. A Pod hosts the full web UI behind an SSL-terminated URL, backed by whatever GPU you pick.

Which GPU do I need for my model?

SD 1.5 and SDXL run comfortably on 24Gi cards like the A10G or RTX 4090. Flux-scale checkpoints want an H100 with 80Gi.

How fast does a workflow start generating?

Once your image is built, containers boot in seconds with weights already cached, so you don't initialize a template or install models by hand through the UI.

Pay as you go
billed by the second

Give your agents their own machines

Sign up, install the CLI, and launch a sandbox, VM, or GPU from your terminal or your coding agent.