Skip to main content
Get detailed information about a sandbox, including its current status, resources, and configuration.

Endpoint

GET /v1/sandboxes/:id

Request

Headers

Authorization: Bearer $HOPX_API_KEY

Path Parameters

ParameterTypeDescription
idstringSandbox ID

Example Request

curl https://api.hopx.dev/v1/sandboxes/sandbox_abc123xyz \
  -H "Authorization: Bearer $HOPX_API_KEY"

Response

Success (200 OK)

{
  "id": "sandbox_abc123xyz",
  "object": "sandbox",
  "status": "running",
  "public_host": "https://sandbox_abc123xyz.hopx.dev",
  "direct_url": "https://sandbox_abc123xyz.hopx.dev",
  "template_id": "73",
  "template_name": "code-interpreter",
  "organization_id": 123,
  "node_id": "node_xyz789",
  "region": "us-east",
  "resources": {
    "vcpu": 2,
    "memory_mb": 4096,
    "disk_mb": 10240
  },
  "internet_access": true,
  "timeout_seconds": 3600,
  "expires_at": "2025-01-29T00:00:00Z",
  "created_at": "2025-01-28T00:00:00Z"
}

Response Fields

FieldTypeDescription
idstringSandbox ID
statusstringCurrent status (running, stopped, paused, creating)
public_hoststringVM Agent API base URL
template_idstringTemplate ID used to create sandbox
resourcesobjectAllocated resources (vcpu, memory_mb, disk_mb)
timeout_secondsintegerAuto-kill timeout in seconds
expires_atstringISO 8601 timestamp when sandbox expires

Status Codes

CodeDescription
200Success
401Authentication required
404Sandbox not found

Errors

Sandbox Not Found (404)

{
  "error": "Sandbox not found",
  "code": "RESOURCE_NOT_FOUND",
  "request_id": "req_abc123"
}
Cause: The sandbox ID doesn’t exist or belongs to another organization. Fix: Verify the sandbox ID is correct. List your sandboxes using GET /v1/sandboxes to find valid IDs.

Use Cases

Check Sandbox Status

Monitor sandbox status before executing code:
curl https://api.hopx.dev/v1/sandboxes/sandbox_abc123xyz \
  -H "Authorization: Bearer $HOPX_API_KEY" | jq '.status'

Verify Resources

Confirm allocated resources match expectations:
curl https://api.hopx.dev/v1/sandboxes/sandbox_abc123xyz \
  -H "Authorization: Bearer $HOPX_API_KEY" | jq '.resources'

Next Steps