API Overview
The BCTRL REST API launches cloud browser runtimes, runs hosted agents inside them, and records everything that happens. It is a plain HTTP API: one base URL, Bearer auth, JSON in and out. The SDKs and CLI are thin clients over these same endpoints.
Base URL and authentication
All endpoints live under one base URL and take your API key as a Bearer token.
Create a key in the dashboard. Confirm who a key belongs to with GET /v1/auth/whoami.
The flow
Five calls take you from nothing to a recorded run.
POST /v1/runtimes- create a browser runtime (optionally scoped to a space).POST /v1/runtimes/{id}/start- start it. The response returnsconnectUrl(a CDP endpoint) andrunId.- Drive it: connect your own tooling to
connectUrl, orPOST /v1/runtimes/{id}/invocationsto run a hosted agent. GET /v1/runs/{runId}/events- read what happened.POST /v1/runtimes/{id}/stop- stop the runtime.
A runtime takes one controller at a time. A CDP connection and a hosted invocation cannot drive the same runtime at once - the second request is rejected until the first releases.
Resources
Four resource groups cover the whole core workflow - most integrations never need anything else:
The rest of the API is platform depth - reach for these when the workflow calls for them:
Pagination
List endpoints return a page of data and a nextCursor. Pass it back as the cursor query parameter to fetch the next page. When nextCursor is null, you have reached the end.
The SDKs walk this for you with iter() - see Pagination.
Errors
Errors return a non-2xx status and a JSON body with a stable shape:
Branch on code (stable and machine-readable), not on the human error string. Always log requestId - it is what support needs to trace a request.
Next
- SDK Overview - the typed client over these endpoints
- CLI Overview - the same API from your terminal
- Authentication - keys, env vars, and CI

