Skip to main content
GET
/
sandboxes
/
{sandbox_id}
Get Sandbox
curl --request GET \
  --url https://api.declaw.ai/sandboxes/{sandbox_id} \
  --header 'X-API-Key: <api-key>'
{
  "sandbox_id": "<string>",
  "template_id": "<string>",
  "name": "<string>",
  "state": "<string>",
  "timeout": 123,
  "metadata": {},
  "envs": {},
  "network": {},
  "resources": {},
  "envd_access_token": "<string>",
  "traffic_access_token": "<string>",
  "guest_ip": "<string>",
  "envd_port": 123,
  "started_at": "<string>",
  "end_at": {}
}
Returns the complete sandbox object including state, configuration, resource allocation, and connection details.

Path Parameters

sandbox_id
string
required
The sandbox identifier. Format: sbx-<8 chars>.Example: sbx-a1b2c3d4

Response

sandbox_id
string
Unique sandbox identifier.
template_id
string
Template the sandbox was created from.
name
string
Human-readable name derived from the template.
state
string
Current lifecycle state: creating, running, paused, or killed.
timeout
integer
Auto-kill timeout in seconds. 0 means no timeout is set.
metadata
object
Key-value metadata attached at creation time.
envs
object
Environment variables injected into the sandbox.
network
object
Network access configuration (if specified at creation).
resources
object
CPU and memory allocation (vcpus, memory_mb).
envd_access_token
string
Bearer token for envd daemon access.
traffic_access_token
string
Bearer token for the security/traffic proxy.
guest_ip
string
Internal IP address of the Firecracker VM.
envd_port
integer
Port on which envd listens inside the VM.
started_at
string
UTC timestamp of sandbox creation.
end_at
string | null
UTC timestamp when the sandbox will be or was killed. null if no timeout.

Example

curl https://api.declaw.ai/sandboxes/sbx-a1b2c3d4 \
  -H "X-API-Key: YOUR_API_KEY"
Response
{
  "sandbox_id": "sbx-a1b2c3d4",
  "template_id": "tpl-base",
  "name": "base",
  "state": "running",
  "timeout": 300,
  "metadata": { "project": "my-agent" },
  "resources": { "vcpus": 1, "memory_mb": 512 },
  "envd_access_token": "envd-ab12cd34",
  "sandbox_domain": "declaw.dev",
  "traffic_access_token": "traffic-ef56gh78",
  "guest_ip": "172.16.0.5",
  "envd_port": 49983,
  "started_at": "2024-01-15T10:30:00Z",
  "end_at": "2024-01-15T10:35:00Z"
}

Error Responses

StatusCause
401Missing or invalid API key
404Sandbox not found