Skip to main content
POST
cURL

Authorizations

Authorization
string
header
required

Hiloop API key sent as an HTTP Bearer token.

Headers

idempotency-key
string
required

Required idempotency key for this mutation. The server records the result from execution start. For at least 72 hours, reuse by the same organization and route replays the original status and body. A matching request still in flight or reuse for different input returns 409 idempotency_conflict. Keys are scoped by organization and route and contain 1-255 characters.

Required string length: 1 - 255

Body

application/json

Create a root sandbox from an OCI image; omitting image starts from the platform default image.

image
string

The unmodified OCI image reference to start from.

Minimum string length: 1
ttl_seconds
integer<uint32>

Sandbox lifetime in seconds. Omit it to use the deployment default.

Required range: x >= 1
storage_class
enum<string>
default:standard

Storage behavior for the sandbox. Omit it to use durable storage when restoring a snapshot, or standard storage for an image/platform-default create.

Available options:
standard,
durable
ports
integer<uint32>[]

Unique guest TCP ports in the range 1-65535. Returned endpoints are authenticated private session-plane connections, not public preview URLs.

Required range: 1 <= x <= 65535
volumes
object[]

Pre-registered volumes to mount, each pinned to its current version at admission.

secrets
object[]

Pre-registered secrets to bind for proof-bound request-time delivery.

metadata
object

Caller-owned metadata: at most 50 entries, keys at most 128 characters, and at most 4096 bytes of total value content.

name
string

Optional customer-supplied name, unique among the project's sandboxes that have not finished deleting. It must be 1-63 characters: lowercase letters or digits, with interior hyphens allowed. Omit it to leave the sandbox unnamed; the server never generates a name. A duplicate returns 409 name_conflict; a terminated sandbox's name is free to reuse, and its record keeps the name for history.

Required string length: 1 - 63
Pattern: ^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$
resources
object

Requested compute resources. Omitted fields resolve to deployment defaults at admission, and the resolved shape is echoed on every Sandbox response. A GPU request is rejected with 422 unsupported_capability when the deployment cannot schedule accelerators.

command
string[]

Argv that replaces the image's own entrypoint as the sandbox's first process. Omit it to run the image's ENTRYPOINT/CMD unchanged, which is what an image built to hold itself open wants. Supply it for an image whose entrypoint runs a task and exits, such as a base OS image or a build tool: a sandbox is something you attach to, and it lives only as long as its first process. The argv is executed directly rather than through a shell, so pipes and redirection belong inside a command you name explicitly. The executable must not be empty; at most 256 entries, each at most 4096 characters.

workspace_capacity_gib
integer<uint32>

Durable workspace capacity in whole GiB. A root create may omit it to use the deployment default; a snapshot create inherits the snapshot-time value. A legacy snapshot whose capacity predates stamping requires an explicit value. This field is valid only with durable storage; standard storage has no persistent workspace claim.

Required range: x >= 1
placement_class
enum<string>

Capacity posture for this sandbox. Omit it to use standard placement.

Available options:
standard,
non_preemptible
idle_timeout_seconds
integer<uint32>

Idle duration in seconds after which a running sandbox is stopped. Omit it to use the deployment default; when the deployment has no default, idle stopping is disabled. Values are from 60 through 86400.

Required range: 60 <= x <= 86400
shared_filesystems
object[]

Deployment-registered shared filesystems to mount. Shared filesystems are external to this sandbox's snapshots; durable storage is required for the sandbox's private runtime state.

network_access
enum<string>

Outbound-network posture. Omit it to use public access.

Available options:
public,
gateway_only,
none

Response

Accepted

id
string
required

The new sandbox id. Poll GetSandbox with this id for observed lifecycle state.

request_state
enum<string>
required

The accepted mutation-request state, distinct from observed sandbox lifecycle state.

Available options:
requested
run_id
string
required

The ambient run that receives telemetry captured for this sandbox. An idempotent create retry returns the same run id.