Skip to main content
GET
/
sandboxes
List Sandboxes
curl --request GET \
  --url https://api.declaw.ai/sandboxes \
  --header 'X-API-Key: <api-key>'
{
  "sandboxes": [
    {}
  ],
  "next_token": {}
}
Returns all sandboxes owned by the authenticated API key. Killed sandboxes are hidden by default — pass ?state=all to include them. Results are wrapped in a sandboxes array with a next_token pagination cursor.

Query Parameters

limit
integer
default:"100"
Maximum number of sandboxes to return. Capped at 1000.
offset
integer
default:"0"
Zero-based offset for pagination.
state
string
Pass "all" to include killed sandboxes in the results. Any other value (or omission) filters them out.

Response

sandboxes
Sandbox[]
Array of Sandbox objects. May be empty.
next_token
string | null
Pagination cursor for the next page of results. Currently always null — full pagination is coming in a future release.

Example

curl https://api.declaw.ai/sandboxes \
  -H "X-API-Key: YOUR_API_KEY"
Response
{
  "sandboxes": [
    {
      "sandbox_id": "sbx-a1b2c3d4",
      "template_id": "tpl-base",
      "name": "base",
      "state": "running",
      "timeout": 300,
      "started_at": "2024-01-15T10:30:00Z"
    },
    {
      "sandbox_id": "sbx-e5f6g7h8",
      "template_id": "tpl-base",
      "name": "base",
      "state": "paused",
      "timeout": 0,
      "started_at": "2024-01-15T09:00:00Z"
    }
  ],
  "next_token": null
}

Error Responses

StatusCause
401Missing or invalid API key
500Internal error listing sandboxes