Persistent VMs are now available. Learn more
Beam

Serverless inference for any model

Turn a Python function into a production endpoint with one command. Containers boot in seconds and autoscale from zero to thousands of GPUs.

llama-inference · endpoint
@endpoint(gpu="RTX4090", autoscaler=QueueDepthAutoscaler(max_containers=6))

Serve models in production

Endpoints boot fast, autoscale to zero, and only charge while your containers run. You configure all of it in Python.


Deploy in three steps

  1. Write a Python function

    Wrap your inference logic in an @endpoint decorator and declare the GPU, image, and autoscaling config inline.

  2. Deploy with one command

    Run beam deploy to ship your endpoint to serverless GPUs. Beam builds the image from your Python config, so you don't write a Dockerfile.

  3. Call your endpoint

    Call your endpoint over HTTP. Auth, autoscaling, and telemetry are built in.

terminal
# 1. Define your endpoint in Python (inference.py)
from beam import endpoint, Image

@endpoint(
    name="llama-inference",
    gpu="RTX4090",
    image=Image().add_python_packages(["transformers", "torch"]),
)
def generate(prompt: str):
    return {"output": run_model(prompt)}

# 2. Deploy it to a serverless GPU
$ beam deploy inference.py:generate
  => Deployed 🎉
  => https://app.beam.cloud/endpoint/llama-inference

# 3. Call it over HTTP
$ curl -X POST https://app.beam.cloud/endpoint/llama-inference \
    -H "Authorization: Bearer <TOKEN>" \
    -H "Content-Type: application/json" \
    -d '{"prompt": "The future of AI is"}'

Frequently asked questions

What kinds of models can I deploy?

Any model you can run in Python. That includes open-source LLMs via vLLM, custom PyTorch and TensorFlow models, diffusion models, embeddings, and your own fine-tuned weights.

Which GPUs are available?

Serverless endpoints run on RTX 4090 GPUs on every plan and RTX 5090 GPUs with a committed-spend agreement. To switch, change the gpu argument on your endpoint. Larger GPUs such as H100 and B200 run as dedicated on-demand machines. See serverless GPU pricing for per-second rates.

How fast are cold starts?

Containers boot in seconds. Loading a large model adds time, so cache the weights in a Volume and load them once in on_start. For supported workloads, checkpoint restore saves that initialized state so later boots can skip the load.

How does pricing work?

You're billed while your endpoint's containers run, metered by the millisecond. That includes on_start and the keep-warm window, 180 seconds by default, after the last request. Once the endpoint scales to zero, billing stops. Usage is deducted from your prepaid credits.

How quickly can I go from code to a live endpoint?

Seconds. Wrap your inference logic in an @endpoint decorator, run beam deploy, and you get a live HTTP endpoint with auth, autoscaling, and telemetry. You can sign up and deploy without talking to sales.

Can I run this on my own infrastructure?

Yes. Beam's runtime, beta9, is open source under AGPL-3.0, so you can run it on your own cluster, though it doesn't include every Beam Cloud feature. You can also bring your own cloud account on AWS, GCP, or Azure and let Beam run the control plane.

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.