Skip to main content
POST
/
api
/
sandboxes
Create Sandbox
curl --request POST \
  --url https://app.opencomputer.dev/api/sandboxes \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "templateID": "<string>",
  "timeout": 123,
  "cpuCount": 123,
  "memoryMB": 123,
  "envs": {},
  "metadata": {},
  "image": {},
  "snapshot": "<string>"
}
'
{
  "sandboxID": "sb-abc123",
  "status": "running",
  "region": "use2",
  "workerID": "w-use2-abc123"
}
Create a new sandbox.
templateID
string
Template name (default: "base")
timeout
integer
Idle timeout in seconds (default: 300)
cpuCount
integer
CPU cores, 1–4 (default: 1)
memoryMB
integer
Memory in MB, up to 2048 (default: 512)
envs
object
Environment variables as key-value pairs
metadata
object
Arbitrary key-value pairs
image
object
Declarative image manifest (see Image builder)
snapshot
string
Name of a pre-built snapshot for instant boot
{
  "sandboxID": "sb-abc123",
  "status": "running",
  "region": "use2",
  "workerID": "w-use2-abc123"
}