Sandbox
Overview
The anonymous sandbox lets anyone execute code without an API key or account. It supports TypeScript, JavaScript, and Python. Rate limited to 10 executions per day per IP address.
This is available on r.sandbox.
For project-scoped sandboxes (with persistent filesystem, databases, and storage), see Projects & Deploy. This page covers the anonymous/free sandbox only.
Quick start
Method
r.sandbox.execute(input)
Execute code in an isolated sandbox environment.
Input:
Returns: SandboxResponse
Anonymous mode
The sandbox is designed for anonymous access. Pass anonymous: true to the constructor to skip API key validation:
When anonymous is true, the SDK does not require or send an API key. Only the r.sandbox.execute() method is available in this mode — all other resources require authentication.
Supported languages
TypeScript
JavaScript
Python
Rate limits
The anonymous sandbox is rate limited to 10 executions per day per IP address. The meta.remaining_executions field tells you how many you have left.
When the limit is reached, the SDK throws a RateLimitError:
Error handling
Use cases
The anonymous sandbox is ideal for:
- Try-before-you-buy: Let users experiment with the platform without creating an account.
- Code playgrounds: Embed a code editor on your website that executes code via the API.
- AI agent tools: Give LLMs the ability to run code without provisioning infrastructure.
- Quick prototyping: Test ideas without setting up a full project.
For production workloads, use project sandboxes with r.projects.executeCode() which have no daily limits and access to databases, storage, and a persistent filesystem.