Recommended flow
- Create a Box API key with
box api-key createor in the dashboard. - Create a box with
POST /boxes, or resume/fork an existing box when the user is continuing prior work. - Poll
GET /boxes/{boxId}until the box isreadyoridle. - Queue work with
POST /boxes/{boxId}/prompt. - Read
GET /boxes/{boxId}/eventswhile work is running. - Use
POST /boxes/{boxId}/desktopwhen the user or your support team needs live computer-use visibility. - Stop/archive, resume, fork, or delete the box according to your retention policy.
host and lux, package installs, or your own scripts, is driven through POST /boxes/{boxId}/commands. For high-frequency or streaming control, run your own daemon in the box; see the daemon pattern.
Base URL
Authentication
Pass a Box API key as a bearer token on every request:box api-key CLI command or in the Box dashboard. For key lifecycle guidance, see API Keys.
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:Box lifecycle
A Box moves through these states:idle and running only reflect work queued through POST /boxes/{boxId}/prompt. Processes you run yourself, over SSH or the command endpoint, do not change the state: a box can show idle while your own agent works inside it.Providers, models, and reasoning
POST /boxes/{boxId}/prompt accepts the same providers Box uses in the dashboard. The API accepts codex and claude-code; claude is accepted as an alias for claude-code by the current backend, but claude-code is the canonical value to store in integrations.
Model ids come from the same catalog used by the dashboard model selector. If you omit model, Box uses the user’s saved dashboard default for that provider. Prefer the listed model ids for predictable behavior.
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.