/api/v2 endpoints for creating, executing commands
in, checkpointing, branching, sleeping, waking, and deleting computers and
projects. Every endpoint reference in the sidebar is generated directly from
the server’s OpenAPI specification.
Base URL
/api/v2. For ready-to-run client wrappers, see the
Python & TypeScript cookbook.
Authentication
Pass your API key as a Bearer token in theAuthorization header:
GET /api/v2/system/health) and public repository reads
(GET /api/v2/public/repositories*).
Durable operations and idempotency
Long-running lifecycle mutations execute asynchronously and require a caller-generated UUID in theIdempotency-Key header:
For asynchronous mutations:
- Send a caller-generated UUID in the
Idempotency-Keyheader. - Receive
202 Acceptedwith anOperationpayload (or oneOperationper checkpoint on project restores). - Poll
GET /api/v2/operations/{operation_id}or stream events from/eventsuntilstatusreachessucceeded,failed, orquarantined.
Idempotency-Key converges on
the original operation rather than creating duplicate resources.
Streaming operation events (NDJSON)
To follow an operation without polling, stream newline-delimited JSON (application/x-ndjson) from /events:
OperationEvent:
{"type": "snapshot", "operation": {...}}— durable operation state atoperation.cursor.{"type": "gap", "requested_cursor": ..., "available_cursor": ...}— emitted if intermediate stages were compacted before your cursor.{"type": "end", "cursor": ..., "terminal": true|false}— stream ended (terminal: truemeans the operation reached a final state).
cursor=<last_seen_cursor>&follow=true.
Error codes and retry guidance
Failed asynchronous operations carry a structuredfailure object:
{"code": "<machine_code>", "message": "<human_detail>"}.