multipart/form-data for file/extension uploads), returns JSON responses, and uses standard HTTP status codes.
- Base URL:
https://api.hyperbrowser.ai - OpenAPI 3.0.1 Specification:
https://www.hyperbrowser.ai/docs/openapi.json - Official Clients: Node.js / TypeScript SDK, Python SDK, and the unified
hxCLI.
Authentication
Pass your API key in thex-api-key HTTP header on every /api/* request:
/x402/*).
GET /api/secrets/public-key is publicly readable without authentication so SDKs can fetch the encryption key before uploading secrets.Content Types & Versioning
- Request & response format: Set
Content-Type: application/jsonfor JSON bodies. File upload endpoints (POST /api/session/{id}/uploads,POST /api/extensions/add) usemultipart/form-data. - Timestamps: ISO 8601 UTC strings (for example,
"2026-04-01T12:00:00.000Z") or Unix epoch milliseconds where noted in the endpoint schema. - Identifiers: UUID v4 strings unless a resource explicitly supports human-readable names/keys (such as sandbox images, snapshots, volumes, secrets, and vaults).
- API stability: New optional fields may be added to responses without a breaking version bump. Ignore unknown response fields when deserializing.
Error Envelope & Status Codes
Failed requests return a JSON error body with amessage string explaining the cause (authentication and scope rejections use error instead):
See Rate Limits & Errors for concurrency ceilings, retry templates, and troubleshooting.
Pagination
List endpoints acceptpage (1-indexed) and limit query parameters (or offset + limit on /api/disks) and return totalCount alongside the requested page. GET /api/session/{id}/event-logs also supports optional startTimestamp and endTimestamp filters alongside page and limit:
Async Jobs & Idempotency
- Async jobs (
200/201withjobId): Endpoints such asPOST /api/web/fetch/job,POST /api/web/batch-fetch,POST /api/web/crawl,POST /api/task/*, and legacy scraping endpoints enqueue background work. Poll the sibling/statusendpoint (pending->running->completed|failed|stopped) before fetching full results. - Idempotency: Persistent disk creation (
POST /api/disks) and disk snapshots (POST /api/disks/{id}/snapshot) accept a client-supplied UUIDidfor safe idempotent retries.PUT /api/session/{id}/stopandPUT /api/sandbox/{id}/stopare idempotent on already-stopped resources. - Cleanup invariant: Always stop active browser sessions (
PUT /api/session/{id}/stop) and sandboxes (PUT /api/sandbox/{id}/stop) in afinallyblock to avoid idle billing.