Sandbox APIs agree on almost nothing
We read 70 API specs from 33 sandbox providers. They share the shape of a REST API and very little else. Every adapter you write by hand is a new dialect to learn, test and keep up with.
| to say | providers use | carton uses |
|---|---|---|
| the resource | sandboxes · devboxes · vms · box · browsers | sandboxes |
| a lifetime | seconds · minutes · milliseconds · "1h" | max_lifetime_seconds |
| tear down | DELETE · POST /shutdown · terminate · kill | DELETE → 204 |
| an error | a different body for every provider | { "error": { code, message, retryable } } |
| auth | Bearer · X-API-Key · X-Access-Token · two-header pairs | Authorization: Bearer |
| a safe retry | Idempotency-Key, declared by 2 of 33 | Idempotency-Key on every POST |
Counted from each provider's published API spec. carton absorbs the differences in adapters, so your code only ever sees the right-hand column.
The whole API fits on one screen
Sandboxes, executions, files, ports and snapshots. Plain REST, cursor pagination, the same error object everywhere.
GET /v1/sandboxes list POST /v1/sandboxes create, on any provider GET /v1/sandboxes/{id} read, by id or name POST /v1/sandboxes/{id}/{verb} pause · resume · fork DELETE /v1/sandboxes/{id} destroy POST /v1/sandboxes/{id}/executions run a command GET …/executions/{exec}/logs stream output POST …/executions/{exec}/stdin write input PUT /v1/sandboxes/{id}/files/{path} write a file POST /v1/sandboxes/{id}/ports expose a port POST /v1/sandboxes/{id}/snapshots snapshot
GET /v1/sandboxes POST /v1/sandboxes GET /v1/sandboxes/{id} POST /v1/sandboxes/{id}/{verb} DELETE /v1/sandboxes/{id} POST …/{id}/executions GET …/executions/{exec}/logs POST …/executions/{exec}/stdin PUT …/{id}/files/{path} POST …/{id}/ports POST …/{id}/snapshots
The TypeScript SDK and the CLI use the same nouns and verbs, so what you learn once works everywhere. An MCP server for agents will follow the same shape. Planned