Persistent VMs are now available.Learn more

Run Stable Diffusion and Flux as an API

Host SDXL, Flux, or any diffusion checkpoint behind a cloud API.

Fast inference for image generation

Serve generative models behind an autoscaling API on managed GPUs.

Switching to Beam has been really helpful. It has addressed all the pain points we had with Replicate, enabling us to provide a better, more reliable service to our customers.

Simon Brami, Founder, Gepetto

Read the case study

5x

faster cold boots than their previous provider

$1,000s

saved monthly

>99.9%

production uptime


Ship an image API in three steps

  1. Load the pipeline once

    Load your checkpoint when the container boots, so requests reuse the warm pipeline instead of reloading weights.

  2. Deploy the endpoint

    beam deploy gives you an authenticated HTTPS URL backed by autoscaling GPUs.

  3. Generate over HTTP

    POST a prompt and get back a hosted image URL. Beam handles queuing, scaling, and auth.

terminal
$ beam deploy app.py:generate
=> Deployed 🎉
=> https://sdxl-abc123.app.beam.cloud

$ curl -X POST https://sdxl-abc123.app.beam.cloud \
    -H 'Authorization: Bearer YOUR_TOKEN' \
    -d '{"prompt": "isometric voxel city at dusk"}'

{"url": "https://app.beam.cloud/output/id/8b0d..."}

Frequently asked questions

Which models can I host?

Anything diffusers can load: SDXL, SD 1.5, Flux, plus your own fine-tuned checkpoints and LoRAs.

How does this compare to per-image APIs like Replicate or fal?

Per-image platforms charge a markup on every generation, and your model options are limited to their catalog. On Beam you deploy your own checkpoints and LoRAs, pay per-second for the GPU while it's generating, and your code stays private.

How are images returned?

Save them with Output and return a hosted public URL, or base64-encode them into the JSON response.

What about cold starts with large checkpoints?

Keep weights on a volume so containers skip the download, and use on_start so each container loads the pipeline exactly once.

Can I keep an endpoint warm?

Yes. Set keep_warm_seconds to hold containers hot for latency-sensitive apps, and let everything else scale to zero.

Do I need to manage queues for burst traffic?

No. Autoscaling is managed by Beam. Set your scaling policy and containers are added as request volume grows.

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.