cavi-ai/
GitHub ↗

HTTP API reference

Authenticated broker routes under /v1/*. Interface version: 2026-07-23 (CURRENT_INTERFACE_VERSION / TypeScript INTERFACE_VERSION).

Unauthenticated: GET /healthz{ "ok": true }.

There is no /runtime route. Use GET /v1/runtime.

Shared headers for every /v1/* call: Authentication.

Routes

MethodPathPurposeRequired capability
GET/v1/runtimeRuntime infosession:read
GET/v1/sessionsList sessionssession:read
POST/v1/sessionsCreate sessionsession:write
POST/v1/pagesOpen pagepage:write
POST/v1/commandsSubmit command envelopebrowser:mutate (+ nested caps for upload / download / JS / intents)
POST/v1/checkpointsPersist workflow checkpointrecovery:write
POST/v1/recovery/{workflow}Recover workflowrecovery:write
GET/v1/eventsRead events (after, limit query)session:read
GET/v1/artifacts/{id}Read artifact bytesartifact:read
POST/v1/principalsIssue scoped bearerauthority:admin
DELETE/v1/principals/{principal}Revoke principalauthority:admin

MCP streamable HTTP is also mounted at POST /v1/mcp — see MCP over HTTP and MCP tools.

Request bodies (high level)

Shapes use camelCase JSON. Do not invent fields; follow the TypeScript SDK validators / Rust types.

  • POST `/v1/sessions`{ profile, proxy, executionPolicy? } where

executionPolicy defaults to { javascriptEvaluation: false, visionAssist: false }

  • POST `/v1/pages`{ session_id } (snake_case on this request; session/page state also uses id / session_id / page_ids)
  • POST `/v1/commands`CommandEnvelope (schemaVersion: 2, ids, deadline,

command where command is { kind: "primitive"|"intent", input: … })

  • POST `/v1/checkpoints` — checkpoint request with verified evidence (see SDK CheckpointRequest)
  • POST `/v1/principals`{ principalId, capabilities, expiresAt }201 with one-time bearer
  • GET `/v1/events` — query after (cursor) and limit (bounded; SDK max 256)

Nested command kinds include primitives (navigate, click, …) and { kind: "intent", input: … }. Intents additionally need intent:execute.

Status and errors

Successful JSON responses are typically 200. Principal issuance returns 201. Revocation returns 204.

Failures return JSON { "error": { … } } where error is an InterfaceError:

code (camelCase)Typical HTTP
authenticationFailed / tokenExpired401
missingCapability / malformedScope403
artifactDenied / notFound404
deadlineExceeded408
idempotencyConflict / reconciliation409
resourceExhausted429
invalidRequest422 (or 413 when oversized)
unsupportedInterfaceVersion422
internal500

Command outcomes may map to 200 / 403 / 409 / 429 / 503 depending on CommandOutcome.status — the TypeScript client checks status against the body.

Clients