Types of the TypeScript SDK with no Python counterpart of the same name: mostly option objects and result records. The methods that take them are on the area pages.
Required for the development lab’s HTTP LAN address; never needed for HTTPS.
apiKey
string
bearerToken
string
domain
string
fetch
typeof fetch
headers
Record<string, string>
Headers added to every REST call and sent as metadata on the data plane. They cannot replace the authentication headers.
httpVersion
"1.1" | "2"
The HTTP version of every REST call (and of the SDK’s own downloads): "1.1" or "2". Without it Node’s fetch decides (HTTP/1.1 unless the server negotiates more) and a browser negotiates as it always does. "2" fails a call to a server that does not speak HTTP/2 (h2 by ALPN, or h2c on http://); it is never sent as HTTP/1.1. Node only; not with fetch, and "2" not with proxy (the proxy tunnel is HTTP/1.1). The sandbox data plane is gRPC and always HTTP/2, so this option does not change it.
logger
Logger
Gets one debug line per HTTP attempt: method, path, status and duration, never a header, query value, body or credential.
proxy
string
An HTTP proxy (http://[user:password@]host:port) for every REST call and the sandbox data-plane channel, in place of any proxy the environment names. Node only; not with fetch.
retry
Partial<RetryPolicy>
Retries and backoff for failed requests; see RetryPolicy.
Git hosts the sandbox may use through the scoped credential proxy (INT-009).
gpu
string
idempotencyKey
string
lifecycle
SandboxLifecycle
Auto-stop, auto-archive and auto-delete timers, ephemeral or persistent. An auto-stop timer replaces timeoutSeconds.
mcpServers
Array<Record<string, unknown>>
MCP servers behind the gateway from the first start, e.g. { name: "gh", catalog_id: "github" } (getMcpCatalog).
memoryMb
number
metadata
Record<string, string>
name
string
A name to find the sandbox by (getByName); unique among the team’s live sandboxes.
network
Record<string, unknown>
preferWaitSeconds
number
Ask the API to answer once the sandbox runs, for at most this many seconds, without the client waiting afterwards.
privateNetwork
boolean
Join the team’s private network: a private address and the name <name>.sandbox.internal, reachable by the team’s other private-network sandboxes on the same host (VMM-031).
profile
string
secure
boolean
snapshotId
string
template
string
timeoutSeconds
number
volumeMounts
Array<Record<string, unknown>>
wait
boolean
Resolve only once the sandbox is running and its envd answers.
The inject object of an egress rule (updateEgress): replace a placeholder in headers of the HTTPS requests the rule allows with a team secret (secret_name) or a fresh identity token of the sandbox (identity_audience). Wire names, as the rest of a rule.
A file or directory in a sandbox does not exist: a data-plane failure with envd’s ERROR_CODE_PATH_NOT_FOUND (the reference vendor’s FileNotFoundError). A NotFoundError; the same failure is a ProcessError.
Lifecycle timers in seconds (absent: off) and the flags fixed at create (API-018). Stopping pauses the sandbox.
Field
Type
Description
autoArchiveSeconds
number
How long a stopped sandbox stays on its host before it is archived to the object store.
autoDeleteSeconds
number
How long a stopped sandbox is kept before it is deleted; 0 deletes it as soon as it stops.
autoResume
boolean
Whether a request to the paused sandbox’s public URL wakes it. Absent means on, as before, except for a sandbox paused with mode filesystem, which only a connect or resume wakes; it cannot be true for one paused that way. In setLifecycle, the timers are replaced and onTimeout and autoResume are left as they are when absent.
autoStopSeconds
number
The deadline, renewed on every resume; reaching it stops the sandbox (deletes an ephemeral one).
onTimeout
OnTimeout
What reaching the deadline does. Absent means pause when autoPause, an auto-stop timer or persistent is set, otherwise kill.
How a failed request is repeated. maxAttempts counts the first try (1 means never retry). The wait before attempt n+1 is baseDelayMs * 2^(n-1) capped at maxDelayMs, scaled by jitter() (a number in [0.5, 1] so concurrent clients do not retry in step); the server’s own Retry-After replaces it, and one longer than maxRetryAfterMs ends the retries at once rather than hanging the caller. A POST is repeated only because the client attaches an idempotency key that every attempt reuses.
Confine the command and its children with Landlock inside the microVM: "read-only", "workspace-only" (read-write in cwd, read-only system paths) or "workspace-offline" (that, and no TCP connect or listen). A kernel that cannot enforce it refuses the command.
stdin
string | Uint8Array
Sent to a command once it starts. A foreground command then gets EOF; a background one keeps its stdin open ("" just opens it).
How long a stopped sandbox stays on its host before it is archived to the object store.
autoDeleteSeconds
number
How long a stopped sandbox is kept before it is deleted; 0 deletes it as soon as it stops.
autoResume
boolean
Whether a request to the paused sandbox’s public URL wakes it. Absent means on, as before, except for a sandbox paused with mode filesystem, which only a connect or resume wakes; it cannot be true for one paused that way. In setLifecycle, the timers are replaced and onTimeout and autoResume are left as they are when absent.
autoStopSeconds
number
The deadline, renewed on every resume; reaching it stops the sandbox (deletes an ephemeral one).
ephemeral
boolean
Deleted when it stops, leaving no snapshot.
onTimeout
OnTimeout
What reaching the deadline does. Absent means pause when autoPause, an auto-stop timer or persistent is set, otherwise kill.
persistent
boolean
Every stop snapshots memory and filesystem to the object store and releases the host.
write: metadata (at most 16 string pairs, keys 1..64 characters, values at most 256, no NUL) is stored on the file and replaces earlier pairs; gzip sends the data compressed.