Skip to main content
Hyperbrowser supports three authentication methods depending on how you connect:
  • API keys (x-api-key) — Primary authentication for the REST API and the Node and Python SDKs. The API also accepts a key as Authorization: Bearer <api-key>, and the hx CLI accepts one through HYPERBROWSER_API_KEY.
  • OAuth 2.0 — Used by MCP clients connecting to Hyperbrowser’s hosted MCP server, and by the hx CLI’s default sign-in (hx auth login).
  • X402 wallet payments and management tokens — Pay-per-request access for autonomous agents without a Hyperbrowser account or API key.

API Keys

Create and manage API keys in the Hyperbrowser Dashboard. Pass your key in the x-api-key HTTP header, or export it as HYPERBROWSER_API_KEY when using the SDKs or CLI.
Never commit API keys to source control or embed them in client-side browser code. Use scoped keys for automated pipelines and rotate compromised keys immediately from the dashboard.

Scoped API Keys & Permissions

API keys can be unrestricted (full access to all team API endpoints) or scoped to a specific subset of permissions. Use least-privilege scoped keys in production, CI jobs, and third-party integrations.
  • When a scoped key calls an endpoint outside its granted scopes, the API returns 403 Forbidden with:
  • Account, billing, and API key management endpoints cannot be called with restricted API keys.

Permission Groups

Scopes follow the format <resource>.<action> and are organized into six permission groups:

1. Web APIs (web)

2. AI Agents (agents)

Each agent family supports .run (start tasks), .read (list tasks and read status/results), and .stop (stop running tasks):

3. Browser Sessions (browser)

4. Sandboxes and VM Resources (sandboxes)

Treat secrets.use as high-privilege: any API key that can execute commands in a sandbox attached to secrets—or call browser credential fill—can access those secret values at runtime. See Security for details.

5. Reusable Browser Resources (resources)

6. Network and Usage (network-and-usage)


OAuth 2.0 (Hosted MCP)

When connecting coding agents or desktop clients to Hyperbrowser’s hosted MCP server, clients authenticate via OAuth 2.0 instead of pasting a static API key:
  • Web tools (recommended): https://mcp.hyperbrowser.ai/mcp/web
  • Full hosted MCP (includes admin and usage tools): https://mcp.hyperbrowser.ai/mcp
OAuth access tokens are sent as Authorization: Bearer <token> and scoped to the MCP resource. Requests outside the token’s granted MCP scopes return 403 Forbidden with {"error": "MCP_SCOPE_DENIED"}. See the MCP Server guide for client setup.

X402 Payment & Session Tokens

Agents can pay per request with USDC on supported EVM or Solana networks—with no Hyperbrowser account or API key—via the /x402/* endpoints:
  • POST /x402/web/fetch — Pay per page fetch.
  • POST /x402/web/search — Pay per web search.
  • POST /x402/session — Purchase a 5–60 minute browser session upfront.
Purchasing a session via POST /x402/session returns two distinct tokens:
  1. Browser connection credentials (wsEndpoint, liveUrl, computerActionEndpoint, and token for WebDriver via x-hyperbrowser-token) — Used only to connect to that browser.
  2. managementToken — A scoped Bearer JWT sent in Authorization: Bearer <managementToken> to inspect (GET /x402/session/{id}) or stop (PUT /x402/session/{id}/stop) that single purchased session without paying again. It remains valid for 24 hours and cannot access regular /api/* endpoints.
See the X402 Overview and Sessions with X402 for working examples.

Next Steps

Rate Limits & Errors

Status codes, rate limits, retries, and pagination.

Usage & Credits

Query team credit balances and per-job usage.

Security

Secrets, vaults, and egress policies.