sandbox Paste a key from the dashboard — it stays in your browser only.

The whole API, runnable.

Every endpoint below has a Run button that hits the live API from your browser. Paste an API key (or click Use my login), create a sandbox, and the returned id auto-fills every {id} endpoint on the page. Nothing leaves your browser except the request itself.

Authentication. Every /v1 request needs Authorization: Bearer <key>. Create keys in the dashboard or via POST /v1/keys below. New accounts get $5 free credits.
# 60-second quickstart — create, exec, destroy
curl -X POST $BASE/v1/sandboxes -H "Authorization: Bearer $KEY" \
  -d '{"template":"python-3.11","timeout":600}'
# → {"id":"sb_…","status":"running",…}

curl -X POST $BASE/v1/sandboxes/sb_…/exec -H "Authorization: Bearer $KEY" \
  -d '{"cmd":"python3 -c \"print(2+2)\""}'
# → {"stdout":"4\n","exit_code":0}

curl -X DELETE $BASE/v1/sandboxes/sb_… -H "Authorization: Bearer $KEY"

[PREVIEW] Preview URLs

Create a sandbox with "start" and "port" and the response includes app_url — an HTTPS URL proxying straight to your process. It works in an iframe, a new tab, or a computer-use agent's browser. Same-host path form: /preview/{id}/{port}/.

Previews are private by default — the URL requires the token returned as viewer_url / cdp_token in the create response. Pass "public": true (CLI: --public) to make a sandbox's preview reachable without a token — a shareable link. Use it only for previews you intend to share.

[SDKS] SDKs & CLI

Everything on this page is wrapped by the SDKs and CLI — pip install pilldrops, npm i @pilldrops/sdk, or the pilldrops CLI. Install the CLI with one line: curl -fsSL https://pilldrops.com/install.sh | sh (or npm i -g @pilldrops/cli). Credentials resolve from PILLDROPS_API_KEY (E2B_API_KEY works too). The machine-readable spec lives at /openapi.json.

Full SDK documentation lives at /sdk — installation, authentication, every Sandbox method with Python/JS examples, preview URLs, custom images, error handling, and the complete CLI reference.

[MCP] MCP server — sandboxes as agent tools

PillDrops ships a Model Context Protocol server so AI agents drive sandboxes as native tools — no glue code. Tool discovery is public; running anything (create, exec, destroy) requires auth. 70+ tools, including create_sandbox, run_command, write_file/read_file, get_logs, get_metrics, start_server, pause/resume/destroy_sandbox, list_sandboxes, list_templates, get_usage.

Hosted · OAuth

Zero install. The first tool call opens PillDrops sign-in in the browser (auto-approved if you're already signed in), and the token flows back automatically.

claude mcp add --transport http \
  pilldrops https://pilldrops.com/mcp
Local · CLI

Uses your stored pilldrops login; auto-opens the browser sign-in if you're logged out.

claude mcp add pilldrops \
  -- pilldrops mcp

CI / headless: skip OAuth with an API-key header — --header "Authorization: Bearer <api-key>". Works with any MCP client (Claude, Cursor, …). OAuth details: dynamic client registration + S256 PKCE, discovery at /.well-known/oauth-authorization-server.

[AGENTS] Built for AI agents

Agent-native by design. Point any coding agent at /llms.txt — the machine-readable guide to the API, SDKs, CLI, and MCP. From the CLI, pilldrops ai prints the full agent catalog (every command, the JSON output contract, copy-paste workflows, and an error→fix table); add --json for a structured version. Every command takes --json, errors carry an actionable hint, and pilldrops doctor self-diagnoses auth + connectivity.