AI Sandboxes
Disposable computers for your AI agents.
One API call gives your agent its own Linux machine. It runs the code your model wrote, a whole program, or a browser, then deletes it. A clean machine for every job, and you pay only for the seconds it runs.Create one per job · from €0.052 an hour, billed by the second · European cloud region
Create It, Use It, Throw It Away
Three calls to the public REST API: create a sandbox, run your code or a whole program in it, then delete it. Use curl, any HTTP library, or the rarecloud CLI.
Create a sandbox
POST /v1/sandboxesPick a template and a size. Python is the default, with the data stack already installed.
Run the code
POST /v1/sandboxes/ID/run_codeSend the code your model wrote and get back stdout, stderr and the exit code. Shell commands and files work the same way.
Delete it
DELETE /v1/sandboxes/IDRead out the files you want to keep, then delete the sandbox. Its billing stops when it is gone.
# 1. create a python sandbox
curl -X POST https://api.rarecloud.io/v1/sandboxes \
-H "Authorization: Bearer rc_pat_YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"template": "python"}'
# 2. run the model's code in it
curl -X POST https://api.rarecloud.io/v1/sandboxes/SANDBOX_ID/run_code \
-H "Authorization: Bearer rc_pat_YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"language": "python", "code": "import pandas as pd; print(pd.__version__)"}'
# 3. delete it
curl -X DELETE https://api.rarecloud.io/v1/sandboxes/SANDBOX_ID \
-H "Authorization: Bearer rc_pat_YOUR_TOKEN"What people run in a sandbox
Code a model just wrote
A calculation, an analysis of an uploaded file, a chart saved as an image and read back.
A whole program, start to finish
Give it your own image and a command: a scraper, a build, a render. It runs, returns its exit code, and cleans itself up.
Browser and computer use
Open a browser in a machine of its own, let the agent click and type, then throw the whole machine away.
Many at once, then gone
Spin up a fleet, one per job, run them in parallel, and delete them when the work is done.
Pick a Size
Any template or your own image runs in any size. Billed by the second.
| Size | vCPU | RAM | Disk | Default for | Hourly | Create |
|---|---|---|---|---|---|---|
Extra small xs | 1 | 1 GB | 3 GB | base | €0.052/h | Create |
Small s | 1 | 2 GB | 3 GB | python, node | €0.064/h | Create |
Medium m | 1 | 4 GB | 3 GB | €0.088/h | Create | |
Large l | 2 | 8 GB | 3 GB | €0.176/h | Create | |
Extra large xl | 4 | 16 GB | 3 GB | €0.352/h | Create | |
2x large 2xl | 8 | 32 GB | 3 GB | €0.704/h | Create |
Billed by the second at €0.04 per vCPU-hour plus €0.012 per GB of memory, from the moment the sandbox starts running until you delete it. Through the API you can also set your own shape, 1 to 8 vCPU and 1 to 32 GB, at the same rate. Beta prices, excluding VAT.
Works With Your Agent
Add the RareCloud MCP server and your coding agent creates and uses sandboxes itself. Anything else that can make an HTTP request or run a shell command drives them through the REST API or the CLI.
MCP server
@rarecloudio/mcp-serverGives Claude Code, Claude Desktop and Cursor sandbox tools: create a sandbox, run code and shell commands in it, read and write its files, delete it.
REST API
https://api.rarecloud.io/v1/sandboxesFrom any language that can send an HTTP request, with an API token that has services:read and services:write.
rarecloud CLI
rarecloud sandbox create --template pythonThen run, exec, files and rm. It exits with an error when the code inside fails, so it fits scripts and agents that work in a shell.
# Add the RareCloud MCP server to Claude Code
claude mcp add rarecloud -e RARECLOUD_API_TOKEN=rc_pat_... -- npx -y @rarecloudio/mcp-server
# Then ask: "Put sales.csv in a sandbox, plot revenue by month
# and give me the chart as a PNG"
# The agent calls create_sandbox, write_sandbox_file, run_sandbox_code,
# read_sandbox_file and delete_sandbox. Creating and deleting run
# only after you confirm.Included With Every Sandbox
A real Linux userland with the tools agents reach for, kept apart from everything else you run.
AI Sandbox or Cloud VM
Both live in the same account and on the same monthly invoice. Pick by how long the work runs and how much you trust the code.
Use an AI Sandbox for
- Short jobs, one per task: model-written code, a program that runs and exits, a browser, one-off analysis.
- A lifetime you set, 5 minutes by default and up to 1 hour.
- Billed by the second, from when it starts running until it is deleted.
Use a Cloud VM for
- Anything that runs for a long time.
- SSH, a public IP and its own disk.
- Billed by the hour up to the monthly price, from €3.99 a month.
The Rest of the Cloud
Servers, your private registry, buckets and clusters are in the same account and console, and on the same monthly invoice as your sandboxes, paid from your account credit by card, PayPal, Alipay, crypto or bank transfer.
Cloud VM
Servers with NVMe storage and a public IPv4, billed by the hour up to the monthly price.
From €3.99/mo
Container Registry
Private images under your own handle. Push one and start sandboxes from it.
Free tier with 10 GB
Object Storage
Buckets for backups, media and build artifacts, used with the S3 tools you already know.
€10/mo with 1 TB
Kubernetes
Managed Kubernetes with the control plane included. Worker nodes cost the same as Cloud VMs.
Workers from €7.99/mo
Frequently Asked Questions
What is an AI sandbox for?
How are sandboxes isolated?
How is it billed?
What can I run inside?
Can I use my own image?
How long does a sandbox live?
Which tools can my agent use?
Where do sandboxes run?
Give Your Agent a Sandbox
Create an API token in the console and run your first sandbox in a few lines of code.