curl --request POST \
--url 'https://api.sandbox.stateset.app/api/v1/sandbox/create' \
--header "Authorization: Bearer $STATESET_SANDBOX_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"session_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"cpus": "string",
"memory": "string",
"isolation": "container",
"timeout_seconds": 250,
"env": {},
"gpu": {
"count": 2,
"type": "standard",
"memory_gb": 1
},
"image": "https://cdn.example.com/products/tent-2p.jpg",
"desktop_os": "linux"
}'
{
"sandbox_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"org_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"session_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"status": "creating",
"pod_ip": "string",
"sandbox_epoch": 1,
"allocated_vcpu": 1.5,
"allocated_memory_gib": 1.5,
"created_at": "2026-08-31T14:22:05Z",
"expires_at": "2026-08-31T14:22:05Z",
"max_expires_at": "2026-08-31T14:22:05Z",
"max_lifetime_seconds": 250,
"remaining_extend_seconds": 250,
"lifetime_used_seconds": 250,
"lifetime_used_percent": 7.5,
"startup_metrics": {
"total_ms": 250,
"pod_creation_ms": 250,
"pod_ready_ms": 250,
"phases": [
{
"name": null,
"durationMs": null
}
]
}
}
Create a new sandbox
Sandbox created successfully
POST
/
api
/
v1
/
sandbox
/
create
curl --request POST \
--url 'https://api.sandbox.stateset.app/api/v1/sandbox/create' \
--header "Authorization: Bearer $STATESET_SANDBOX_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"session_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"cpus": "string",
"memory": "string",
"isolation": "container",
"timeout_seconds": 250,
"env": {},
"gpu": {
"count": 2,
"type": "standard",
"memory_gb": 1
},
"image": "https://cdn.example.com/products/tent-2p.jpg",
"desktop_os": "linux"
}'
{
"sandbox_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"org_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"session_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"status": "creating",
"pod_ip": "string",
"sandbox_epoch": 1,
"allocated_vcpu": 1.5,
"allocated_memory_gib": 1.5,
"created_at": "2026-08-31T14:22:05Z",
"expires_at": "2026-08-31T14:22:05Z",
"max_expires_at": "2026-08-31T14:22:05Z",
"max_lifetime_seconds": 250,
"remaining_extend_seconds": 250,
"lifetime_used_seconds": 250,
"lifetime_used_percent": 7.5,
"startup_metrics": {
"total_ms": 250,
"pod_creation_ms": 250,
"pod_ready_ms": 250,
"phases": [
{
"name": null,
"durationMs": null
}
]
}
}
Request body
CreateSandboxRequest
string (uuid)
string
string
string
integer
object
object
string
string
required
Response
SandboxResponse
string (uuid)
required
Unique sandbox identifier
string
required
Organization that owns this sandbox
string
required
Session identifier
string
required
Current sandbox status
string
Internal pod IP address
integer
required
Sandbox recycle epoch counter
number
Allocated vCPU cores
number
Allocated memory in GiB
string (date-time)
required
ISO 8601 creation timestamp
string (date-time)
required
ISO 8601 expiration timestamp
string (date-time)
required
Maximum possible expiration
integer
required
Maximum sandbox lifetime in seconds
integer
required
Seconds available for extension
integer
required
Seconds of lifetime consumed
number
required
Percentage of lifetime consumed
object
Status codes
| Code | Meaning |
|---|---|
201 | Sandbox created successfully |
202 | Request queued due to concurrency limits |
400 | Invalid request |
401 | Authentication required |
429 | Concurrent limit exceeded |
curl --request POST \
--url 'https://api.sandbox.stateset.app/api/v1/sandbox/create' \
--header "Authorization: Bearer $STATESET_SANDBOX_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"session_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"cpus": "string",
"memory": "string",
"isolation": "container",
"timeout_seconds": 250,
"env": {},
"gpu": {
"count": 2,
"type": "standard",
"memory_gb": 1
},
"image": "https://cdn.example.com/products/tent-2p.jpg",
"desktop_os": "linux"
}'
{
"sandbox_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"org_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"session_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"status": "creating",
"pod_ip": "string",
"sandbox_epoch": 1,
"allocated_vcpu": 1.5,
"allocated_memory_gib": 1.5,
"created_at": "2026-08-31T14:22:05Z",
"expires_at": "2026-08-31T14:22:05Z",
"max_expires_at": "2026-08-31T14:22:05Z",
"max_lifetime_seconds": 250,
"remaining_extend_seconds": 250,
"lifetime_used_seconds": 250,
"lifetime_used_percent": 7.5,
"startup_metrics": {
"total_ms": 250,
"pod_creation_ms": 250,
"pod_ready_ms": 250,
"phases": [
{
"name": null,
"durationMs": null
}
]
}
}
Last modified on August 31, 2026