Parameter Reference
Every parameter accepted when creating a sandbox, with defaults, limits, and validation rules.
This page is the complete reference for the POST /vms create request. Only image is required — every other field has a sensible default, so a minimal create is just {"image": "python:3.12-slim"}. The table gives the one-line summary; the sections below explain each field's behavior in detail.
Create request parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
name | string | generated (sandbox-<hex>) | Display name. Not required to be unique. |
image | string | object | required | What boots — see Image sources. |
mode | "burstable" | "dedicated" | "burstable" | Resource semantics — see Burstable vs dedicated. |
cpu | number (float) | from vcpus | Guaranteed CPU cores. Fractional allowed (min 0.125). |
vcpus | integer | 2 | Integer CPU request; used only if cpu is absent. |
mem_mib | integer | 1024 | Guaranteed memory (MiB). Min 512 when set explicitly; burstable max 32768. |
scratch_mib | integer | 512 | Guaranteed writable disk (MiB). Min 10240 when set explicitly; burstable max 262144. |
docker_data_mib | integer | unset (10240 for docker-enabled images) | Ephemeral device for /var/lib/docker — see Docker in sandboxes. |
ports | array | [] | Inbound forwards: { "vm_port": 8080, "proto": "tcp" }. Host ports are assigned and returned in port_map. |
volumes | array | [] | Volume mounts (max 8): { "volume", "mount_path", "subpath" } — see Volumes. |
object_store_mounts | array | [] | S3 mounts (max 8): { "object_store", "mount_path", "read_only" } — see Object stores. |
env | object | {} | Plain environment variables, injected verbatim. Values ≤ 64 KiB. |
secrets | array of strings | [] | Names of project secrets to attach — see Environment & secrets. |
persistent | boolean | false | Durable write layer; enables stop/start, pause/resume, fork. |
spot | boolean | false | Discounted, reclaimable capacity. Immutable after create. |
region | string | project → org → platform default | Home region — see Regions. |
Identity: name
The name is a display label to help you find sandboxes in lists and the dashboard. If you omit it, the API generates one of the form sandbox-<8 hex chars>. Names are not required to be unique within a project, so treat the sandbox id as the canonical identifier and the name as a human-friendly hint.
Boot source: image
The only required field. It accepts a bare string or a typed object covering five shapes: registry references, named project images, inline Dockerfile builds, and VM-state snapshot restores. A bare string containing / or : is treated as a registry reference; otherwise it is treated as a named project image. The shapes and their tradeoffs are covered in Image sources.
Resources: mode, cpu, vcpus, mem_mib, scratch_mib
mode selects how resource numbers are interpreted. In burstable (the default) they are a guaranteed floor and the sandbox can use idle capacity beyond it; in dedicated the sandbox is shaped exactly as requested. Any other value is rejected with 400. See Burstable vs dedicated.
CPU can be specified two ways. cpu is a float and allows fractional guarantees like 0.5; explicit values below the platform minimum are clamped up to 0.125. vcpus is an integer alternative (default 2) that is used only when cpu is absent — if both are present, cpu wins.
Memory (mem_mib) defaults to 1024 MiB. If you set it explicitly, values below 512 are clamped up to 512; burstable sandboxes may not guarantee more than 32768 MiB (requests above that are rejected with 400).
Disk (scratch_mib) is the sandbox's writable storage, defaulting to 512 MiB. Explicitly-set values are clamped up to a 10240 MiB minimum; burstable sandboxes may not guarantee more than 262144 MiB.
Note: The clamp-up rules apply only to explicit values. An omitted field keeps its small default — so a bare create gets 2 vCPU / 1024 MiB / 512 MiB without any clamping.
Docker: docker_data_mib
Sets the size of a dedicated ephemeral device mounted at /var/lib/docker, enabling a full Docker daemon inside the sandbox. It is unset by default; sandboxes created from an image built with docker: true automatically get a 10240 MiB (10 GiB) device. The device is recreated fresh on every boot and is excluded from snapshots — see Docker in sandboxes for the full behavior and restrictions.
Networking: ports
Each entry asks the platform to forward an externally reachable port to a port inside the sandbox: {"vm_port": 8080, "proto": "tcp"} (proto defaults to tcp). You do not choose the host port — the platform assigns one and reports it in the sandbox's port_map once running. See Port forwarding.
Storage attachments: volumes and object_store_mounts
volumes attaches persistent, shareable volumes into the sandbox's filesystem. Each entry names the volume (by name or id), an absolute mount_path, and optionally a subpath to mount a subdirectory instead of the volume root. object_store_mounts similarly mounts S3-compatible object stores, with an optional read_only override.
Both share the same rules: at most 8 mounts each, mount_path must be absolute and must not contain .., and the reserved paths /, /proc, /sys, and /dev are rejected. The referenced volume or object store must be in the ready state, otherwise the create fails with 409. Sandboxes that attach volumes cold-boot, so creation is slightly slower than a plain cached-image create.
Configuration: env and secrets
env is a plain name → value map injected into the sandbox verbatim — anything inside the sandbox can read the real values. Names must match [A-Za-z_][A-Za-z0-9_]* and values are limited to 64 KiB. secrets is a list of project secret names; the sandbox only ever sees opaque placeholders, and real values are substituted into outbound requests scoped by each secret's allowed domains. Named secrets must already exist or the create fails with 400. See Environment & secrets.
Durability and pricing: persistent and spot
persistent: true moves the sandbox's write layer onto durable network storage, enabling warm stop/start, pause/resume, and fork — details on Persistent sandboxes. spot: true opts into discounted, reclaimable capacity and is immutable after create — details on Spot sandboxes.
Placement: region
Optionally pins the sandbox to a region. When absent, the region is resolved from the project default, then the organization default, then the platform default. An unknown or disabled region fails the create with 400. GET /regions lists available regions — see Regions.
Validation notes
- Explicitly-set resources are clamped up to platform minimums; omitted fields use defaults without clamping.
- Burstable requests above the burst caps are rejected (
400). - Unknown fields are silently ignored — watch for typos.
envnames must match[A-Za-z_][A-Za-z0-9_]*.- Secret names must exist in the project or the create is rejected (
400).
SDK parameter mapping
The SDKs use idiomatic field names that map onto the REST fields:
| REST field | Python (rlp) | TypeScript (@rlp/sdk) |
|---|---|---|
name | name | name |
image | image (or snapshot) | image (or snapshot) |
mode | mode | mode |
cpu | resources.cpu | resources.cpu |
docker_data_mib | docker_data_mib | dockerDataMib |
ports | ports (PortRequest(vm_port, proto)) | ports ({ vmPort, proto }) |
volumes | volumes (VolumeMount(volume_id, mount_path, subpath)) | volumes ({ volumeId, mountPath, subpath }) |
object_store_mounts | object_store_mounts (ObjectStoreMount) | objectStoreMounts |
env | env_vars | envVars |
secrets | secrets | secrets |
persistent | persistent | persistent |
spot | spot | spot |
Note (known gaps): The SDK
resources.memory/resources.diskfields andlabelsare not applied by the API yet — onlyresources.cpumaps. To set memory or disk, call the REST API directly withmem_mib/scratch_mib. Similarly,regionis REST-only: the SDKs do not send it.
Full example
A "kitchen-sink" create exercising most parameters: