Skip to main content
Use the Boat Public API from services, CI jobs, hosted workers, and product automation code. For typed clients, start with the Boat SDKs, Python SDK, or TypeScript/JavaScript SDK.
  1. Create a Boat API key with boat api-key create or in the dashboard.
  2. Create a sandbox with POST /sandboxes, or resume/fork an existing sandbox when the user is continuing prior work.
  3. Poll GET /sandboxes/{sandboxId} until the sandbox is ready or idle.
  4. Queue work with POST /sandboxes/{sandboxId}/prompt.
  5. Read GET /sandboxes/{sandboxId}/events while work is running.
  6. Use POST /sandboxes/{sandboxId}/desktop when the user or your support team needs live computer-use visibility.
  7. Stop/archive, resume, fork, or delete the sandbox according to your retention policy.
Everything the Boat CLI does programmatically is available here: first-class endpoints cover lifecycle, prompts, events, files, desktop, and snapshots. Anything else, including in-sandbox tools like host, package installs, or your own scripts, is driven through POST /sandboxes/{sandboxId}/commands. For high-frequency or streaming control, run your own daemon in the sandbox; see the daemon pattern.

Base URL

Authentication

Pass a Boat API key as a bearer token on API requests:
Create, rotate, and revoke service keys with the boat api-key CLI command or in the Boat dashboard. For key lifecycle guidance, see API Keys.
Treat Boat API keys and returned desktop URLs as secrets. Desktop and VNC URLs can contain access tokens and should not be logged or persisted unredacted.
Updating PATCH /account/data-retention is the exception: it requires an interactive sandbox session and refuses API keys. Per-Sandbox keys are restricted to their sandbox; use an account service key for account-wide reads.

Response envelope

Every v1 JSON response has an explicit success discriminator:

Error model

HTTP status remains authoritative. Error bodies also use a structured JSON envelope:

Idempotent sandbox creation

POST /sandboxes and POST /sandboxes/{sandboxId}/fork each provision a new sandbox that bills on success, so a lost response (timeout or 5xx after the sandbox was already accepted) leaves you unsure whether to retry. Send an Idempotency-Key header with your own account-unique value (a UUID) to make create and fork safe to retry: the first request creates the sandbox and binds it to the key; every retry with the same account, key, and request body returns that same sandbox instead of a second, billable one.
Keys are retained for 24 hours, and are scoped to your account (two accounts can use the same key value with no collision). Omit the header to keep the default (non-idempotent) behavior. The header is optional on every SDK’s create and fork call (Idempotency-Key / idempotencyKey); see Create sandbox and Fork sandbox.

Sandbox lifecycle

A Sandbox moves through these states:
idle and running only reflect work queued through POST /sandboxes/{sandboxId}/prompt. Processes you run yourself, over SSH or the command endpoint, do not change the state: a sandbox can show idle while your own agent works inside it.

Providers, models, and reasoning

POST /sandboxes/{sandboxId}/prompt runs work through an agent harness (provider): Omit provider to use the harness the user selected on the Agents dashboard. Models and reasoning effort are harness- and model-specific and change over time, so fetch them from the live catalog rather than hardcoding lists: GET /provider-models returns, per provider, every model and which reasoningEffort levels it accepts (none, low, medium, high, xhigh, max; some models accept none). The boat prompt --help CLI command prints the same catalog. pi, opencode, and prime-agent also expose OpenRouter- and llmgateway-routed models (ids like openrouter:anthropic/claude-sonnet-4.5). If you omit model, Boat uses the user’s saved dashboard default for that harness. Use the dashboard’s provider setup page to configure credentials before prompting. If credentials are missing, the API returns provider_not_configured with a setup URL.
A Sandbox runs many conversations in parallel. POST /prompt takes new or conversationId and returns the conversationId; GET /events and POST /interrupt take a conversation filter. See Integrated agents.

Request examples

These are raw HTTP. Every one of them has a CLI, TypeScript and Python equivalent on the feature page it belongs to: Snapshots, Environments, Webhooks, Data retention, Desktop, Hosting. The CLI reference maps commands to endpoints. Set shared variables:
Create a one-hour sandbox and store its id:
Create a sandbox without automatic archival:
Poll readiness:
Prompt a sandbox to work in a repo:
Read Sandbox work and lifecycle events:
Get a desktop streaming URL for live inspection:
To return a VNC URL that does not require an access token, send:
Stop/archive a sandbox when the workflow is complete:
Archive keeps snapshots for resume. Permanent delete requires the exact target id as a confirmation header, returns 202, and cannot be canceled:
Poll GET /deletion-operations/{operationId} until status is completed. See Data retention and deletion.

Endpoint reference