ScalixScalix Docs
Sign up

Sandboxes API

Ephemeral microVM sandboxes for agent code execution

REST API endpoints for Sandboxes. 9 operations.

List your sandboxes

plaintext
GET /v1/sandboxes

Auth: Bearer API key

Responses

StatusDescription
200{sandboxes: [...], total}
401Missing or invalid API key

operationId: sandboxList

Create an ephemeral sandbox

plaintext
POST /v1/sandboxes

Boots an isolated microVM. Ephemeral sandboxes are disposable: they stop at their idle or hard timeout and nothing on the rootfs persists past stop. Compute is billed per vCPU-hour and GB-hour of allocation while running.

Auth: Bearer API key

Request body

application/json (required) — schema SandboxCreateRequest.

Responses

StatusDescription
201Sandbox created (initially PROVISIONING)
401Missing or invalid API key
402Credit exhausted or plan limit reached
503No capacity for the requested resources

operationId: sandboxCreate

Delete a sandbox and tear down its microVM

plaintext
DELETE /v1/sandboxes/{id}

Auth: Bearer API key

Parameters

NameInTypeRequiredDescription
idpathstringYesSandbox id

Responses

StatusDescription
204Deleted
404Not found

operationId: sandboxDelete

Get a sandbox by id

plaintext
GET /v1/sandboxes/{id}

Auth: Bearer API key

Parameters

NameInTypeRequiredDescription
idpathstringYesSandbox id

Responses

StatusDescription
200Sandbox details
404Not found

operationId: sandboxGet

Run a command inside a running sandbox (synchronous)

plaintext
POST /v1/sandboxes/{id}/commands

Auth: Bearer API key

Parameters

NameInTypeRequiredDescription
idpathstringYesSandbox id

Request body

application/json (required) — schema SandboxCommandRequest.

Responses

StatusDescription
200Command result
400Sandbox is not running
404Not found

operationId: sandboxRunCommand

Extend a sandbox's hard deadline

plaintext
POST /v1/sandboxes/{id}/extend

Auth: Bearer API key

Parameters

NameInTypeRequiredDescription
idpathstringYesSandbox id

Request body

application/json (required) — schema SandboxExtendRequest.

Responses

StatusDescription
200Updated sandbox
404Not found

operationId: sandboxExtend

Write files into a sandbox

plaintext
POST /v1/sandboxes/{id}/files

Auth: Bearer API key

Parameters

NameInTypeRequiredDescription
idpathstringYesSandbox id

Request body

application/json (required) — schema SandboxWriteFilesRequest.

Responses

StatusDescription
204Files written
404Not found
502Path outside the allowed guest roots

operationId: sandboxWriteFiles

Read a file from a sandbox. The guest path follows /files/

plaintext
GET /v1/sandboxes/{id}/files/{path}

Auth: Bearer API key

Parameters

NameInTypeRequiredDescription
idpathstringYesSandbox id
pathpathstringYesGuest file path, e.g. app/output.json

Responses

StatusDescription
200File content (application/octet-stream)
404File or sandbox not found

operationId: sandboxReadFile

Snapshot a sandbox - not available

plaintext
POST /v1/sandboxes/{id}/snapshot

Ephemeral sandboxes are disposable; state does not persist past stop. This endpoint returns 501 until snapshots ship (demand-gated).

Auth: Bearer API key

Parameters

NameInTypeRequiredDescription
idpathstringYesSandbox id

Responses

StatusDescription
501Snapshots are not available for ephemeral sandboxes

operationId: sandboxSnapshot