Skip to main content
POST
Fork a sandbox

Authorizations

Authorization
string
header
required

An API key (zode_tok_...). Create one in the console under API keys (https://console.zode.dev/tokens), or with zode login.

Path Parameters

id
string
required
Pattern: ^sbx_[a-z2-7]{16}$

Body

application/json
name
string
Pattern: ^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$
git_branch
string

Defaults to the parent's.

Maximum string length: 255
pr_number
integer

Defaults to the parent's.

Required range: x >= 1
max_cost_micros
integer<int64>

Defaults to the parent's. AI calls only, counted from zero for the fork (see Sandbox).

Required range: x >= 0
browser
boolean

Defaults to the parent's.

desktop
boolean

Defaults to the parent's.

Response

Child created and running

id
string
required
Example:

"sbx_ilvsd743b36wqi26"

name
string
required
status
enum<string>
required
Available options:
creating,
running,
stopping,
stopped,
starting,
deleting,
deleted,
error
vcpus
integer
required
ram_mb
integer
required
disk_gb
integer
required
region
string
required
Example:

"eu-central"

git_repo
string
required
git_branch
string
required
pr_number
integer | null
required
max_cost_micros
integer<int64> | null
required

AI spend cap for this sandbox, in micro-dollars. Counts only AI calls made on the workspace's keys through the node's AI proxy, not compute or storage. The total is kept in the node daemon's memory, so a node daemon restart starts it again from zero. Reaching it refuses further AI calls (402 zode_spend_cap) and sends spend.cap_reached; the sandbox keeps running.

parent_sandbox_id
string | null
required
created_at
string<date-time>
required
updated_at
string<date-time>
required
deleted_at
string<date-time> | null
required
created_by
null | object
required

The member who created or forked it; null for sandboxes made before this was recorded.

browser
boolean

Chrome with CDP is on.

desktop
boolean

The Linux desktop is on.

feature_error
string

Only on a create or fork whose browser or desktop could not be switched on; the sandbox was made.