Skip to main content
Create only the environments needed by one test boundary. A smaller sandbox is faster to understand, cheaper to run, and easier to clean up.

With the CLI

The CLI waits until every environment is ready unless --detach is present. Detached creation returns after durable provisioning begins, then you can run:

With TypeScript

createSession waits for readiness and attempts cleanup if readiness fails. Use startSession when your process needs the sandbox ID before the wait.

Creation rules

  • Every requested environment must be enabled for the workspace key.
  • State is validated before the sandbox becomes ready.
  • One invalid state payload fails the whole create request and triggers cleanup.
  • Reusing an idempotency key with the same request returns the original result.
  • Reusing it with a different request returns a conflict.
  • Failed provisioning and cold-start time are not billed.
The CLI creates a fresh idempotency key when you omit the option. Supply --idempotency-key only when your caller needs to retry the exact same create request after an uncertain response. Read expiresAt and the optional lease fields from the response. Server and plan policy can reduce a requested TTL.