DISPOSABLE SANDBOXES FOR AI AGENTSBETA

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.

  1. Create a sandbox

    POST /v1/sandboxes

    Pick a template and a size. Python is the default, with the data stack already installed.

  2. Run the code

    POST /v1/sandboxes/ID/run_code

    Send the code your model wrote and get back stdout, stderr and the exit code. Shell commands and files work the same way.

  3. Delete it

    DELETE /v1/sandboxes/ID

    Read 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"

Read the API referenceInstall the CLI

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.

AI Sandbox sizes
SizevCPURAMDiskDefault forHourlyCreate
Extra small
xs
11 GB3 GBbase€0.052/hCreate
Small
s
12 GB3 GBpython, node€0.064/hCreate
Medium
m
14 GB3 GB€0.088/hCreate
Large
l
28 GB3 GB€0.176/hCreate
Extra large
xl
416 GB3 GB€0.352/hCreate
2x large
2xl
832 GB3 GB€0.704/hCreate

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-server

    Gives 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/sandboxes

    From 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 python

    Then 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.

Set up the MCP serverRead the sandbox docs

Included With Every Sandbox

A real Linux userland with the tools agents reach for, kept apart from everything else you run.

Isolated From the Host
Safe to run code you did not write: each sandbox runs under a user-space kernel, on servers that run only sandboxes, sealed off from your account and everything else you run.
Python Data Stack
Python 3.12 with numpy, pandas, matplotlib, scipy, scikit-learn, requests, pillow and openpyxl ready to import. pip install adds the rest.
Node and Shell
A Node.js 22 template for JavaScript, and a small Debian 12 template for shell commands and files.
Files In and Out
Write a file into the sandbox, let the code work on it, then read the result back by path.
Outbound Internet
Fetch packages and call any API from inside: pip and npm installs and outbound HTTP requests work out of the box.
Your Own Image
Start from a public container image, or a private one from your own RareCloud Container Registry, instead of a template, in any size.

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.

See Cloud VM

Frequently Asked Questions

What is an AI sandbox for?
Running code you did not write yourself, usually code an AI model just produced: a calculation, a data analysis on an uploaded file, a chart, a test run, a package your agent wants to try. The code runs in its own Linux sandbox instead of on your machine or your servers.
How are sandboxes isolated?
Each sandbox runs under a user-space kernel that sits between the code and the host, on servers that run only sandboxes. Inside, the code runs as a non-root user with read-only system files, no added privileges and no cloud credentials. Each account's sandboxes live in their own namespace, nothing from outside can connect in, and the code cannot reach private networks or the cloud metadata service.
How is it billed?
By the second, for the vCPU and memory of the size you picked, from the moment the sandbox starts running until you delete it or its lifetime ends. Usage is added to your monthly cloud invoice, and the credit on your account pays it. Prices exclude VAT and may change while the product is in beta.
What can I run inside?
Python and Node code through run_code, and any shell command through commands. Install packages with pip or npm, read and write files, and make outbound requests. You can also hand the sandbox your own image and a command at creation (run mode): it starts the program itself and ends when the program exits. Your home directory and /tmp are writable.
Can I use my own image?
Yes. Pass any public container image when you create the sandbox. It runs as a non-root user with a read-only system disk, so the image has to work that way. A private image from your own RareCloud Container Registry works too: registry.rarestack.net/<your handle>/<repository> with a tag or a sha256 digest. Only images under your own handle are accepted; other private registries are not supported.
How long does a sandbox live?
Sandboxes are meant for one job: create one, run the work, read out what you need, delete it. You set its lifetime when you create it, 5 minutes by default and up to 1 hour, and it is deleted automatically when that runs out. Billing runs while a sandbox runs, so delete it when the job is done.
Which tools can my agent use?
The REST API with a scoped token, from any language, and the rarecloud CLI. Any agent that can make an HTTP request or run a shell command can drive a sandbox. Through the RareCloud MCP server (0.4.0 and later), your agent can also create and run sandboxes itself.
Where do sandboxes run?
In our European cloud region, the first we have opened, in Bucharest, Romania. Invoices come from Rare Mood Agency SRL (RareCloud) with EU VAT, in EUR or USD.

Give Your Agent a Sandbox

Create an API token in the console and run your first sandbox in a few lines of code.