Deploy any Hugging Face model as an API
Go from a Hugging Face model ID to a live, autoscaling endpoint with one Python file. Beam builds the container, manages the GPUs, and caches your weights between requests.
From the Hub to production
Declare your dependencies in Python and Beam builds the container. You don't write a Dockerfile or stand up a serving framework.
One file, no Dockerfiles
Declare Python packages and base images inline. Beam builds and caches the container for you.
Explore docsLoad once, serve many
on_start runs when the container boots, so models load once and every request hits warm weights.
Explore docsWeights cached on volumes
Snapshot a model into a persistent volume once and skip the Hub download on every boot. Storage is not billed yet. Planned: $0.0001 per GB-hour of data stored, with no free allowance.
Explore docsGated & private models
Store your Hugging Face token with Beam's secrets manager and pull gated repos like Llama securely.
Explore docsLive-reload development
beam serve runs your endpoint in the cloud while you edit locally, in the same environment you'll ship to production.
Explore docsAutoscaling built in
Endpoints scale with request volume and back to zero when idle, so you don't plan capacity.
Explore docsShip a model in three steps
Pick a model
Reference any Hub model ID from transformers, diffusers, or sentence-transformers, or bring your own weights.
Wrap it in an endpoint
Add the @endpoint decorator with your GPU and image. Load the model in on_start so it stays warm.
Serve, then deploy
Iterate with beam serve's live reload, then beam deploy gives you a production HTTPS endpoint.
# Develop against the cloud with live reload
$ beam serve app.py:predict
=> Watching for changes...
# Deploy to production
$ beam deploy app.py:predict
=> Deployed 🎉
=> https://hf-inference-abc123.app.beam.cloud
$ curl -X POST https://hf-inference-abc123.app.beam.cloud \
-H 'Authorization: Bearer YOUR_TOKEN' \
-d '{"prompt": "Explain serverless GPUs"}'Frequently asked questions
Which libraries are supported?
Anything pip-installable: transformers, diffusers, sentence-transformers, ultralytics, or your own packages. You define the image in Python and Beam builds it.
Can I deploy gated or private models?
Yes. Save your Hugging Face token with beam secret create HF_TOKEN and the container authenticates to the Hub securely.
Do weights re-download on every cold start?
Not if you cache them. Download weights to a persistent volume once, and every container loads from disk instead of the Hub.
How do I pick the right GPU?
Start small (a T4 handles many models under a few billion parameters) and watch real-time GPU utilization in the Beam dashboard to right-size from there.
What about chat models with an OpenAI-style API?
Use Beam's vLLM integration: it serves any compatible Hub model behind an OpenAI-compatible API, so existing clients work unchanged.
Related use cases
Deploy open-source LLMs
Serve open-source LLMs behind an autoscaling, OpenAI-compatible API.
InferenceRun Whisper transcription behind your own API
On-demand Whisper transcription behind an autoscaling API.
InferenceDeploy computer vision models at scale
Detection, segmentation, and classification behind managed APIs.
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.