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.
@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.
Cold starts in seconds
Cached images, model weights stored in a Volume, and checkpoint restore for supported workloads keep cold starts short.
Explore docsScale to zero on Beam, burst to thousands
Endpoints add containers as soon as traffic spikes and scale to zero once the keep-warm window passes.
Explore docsRun open and custom models on serverless GPUs
Bring your own weights or open-source models and run them on RTX 4090 and RTX 5090 GPUs. Switching between them is a one-line change in Python.
Explore docsMultiple workers per container
Load your model once with on_start, then scale vertically by running multiple workers on the same container to maximize GPU utilization.
Explore docsStreaming & async responses
Stream tokens back as they're generated, or return responses asynchronously with task callbacks for long-running inference.
Explore docsPay only while containers run
Usage is metered by the millisecond, including the keep-warm window after the last request, and billing stops once the endpoint scales to zero. You don't reserve capacity.
Explore docsDeploy in three steps
Write a Python function
Wrap your inference logic in an @endpoint decorator and declare the GPU, image, and autoscaling config inline.
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.
Call your endpoint
Call your endpoint over HTTP. Auth, autoscaling, and telemetry are built in.
# 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.
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.