API Reference

Programmatically create, manage and monitor sandbox environments.

POST /api/auth/token

Request (Headers)

Authorization: Basic <base64>

Response (200 OK)

{ "token": "jwt_token" }
POST /api/v1/sandboxes

Request Body

{ "engine": "firecracker", "cpu": 2, "memory": "4GB" }

Response (201 Created)

{ "sandbox_id": "sbx_123456", "status": "created" }
POST /api/v1/execute

Request Body

{ "sandbox_id": "sbx_123456", "file": "sample.py" }

Response (202 Accepted)

{ "execution_id": "exec_987", "status": "running" }
GET /api/v1/logs/{sandbox_id}
// Returns text/plain stream of sandbox stdout/stderr
DELETE /api/v1/sandboxes/{sandbox_id}
// Returns 204 No Content

Error Codes

Status Code Description
401 UnauthorizedInvalid or missing authentication token.
403 ForbiddenInsufficient permissions for this action.
404 Not FoundThe requested sandbox or resource does not exist.
429 Rate LimitedToo many requests. Back off and retry.
500 Internal ErrorAn unexpected orchestration failure occurred.