sessionId you can pass on the next call to reuse the same box. The box is paused between runs so it has no hard TTL.
Endpoint
Pass config and secrets through optional
env as { name, value?, secret? }. Each item needs a value or a secret. Logs store env names only. The sandbox allows outbound network so live vendor API calls can run. JavaScript and TypeScript (runtime: node) use the Bun runtime to add packages and run files. Pass sessionId from a previous result to reuse the same sandbox. The box is paused between runs and has no hard TTL.Request body
Query parameter
format is json (default) or toon, same as the other tools endpoints.
Example request
Response
A failed snippet is still HTTP 200 with
ok: false. HTTP 422 is invalid input. HTTP 503 means the sandbox provider is unavailable. HTTP 429 is the dedicated 5 requests/minute limiter.
Typical workflow
- Call
GET /tools/search. - Call
GET /tools/context/:slugfor install and usage context. - Write a small program from that context.
- Call
POST /tools/testwithruntime,packages, andfiles.