Skip to main content
Purchase a browser session for $0.10 per hour using your wallet. Choose a timeoutMinutes value from 5 to 60 (default 30) and pay upfront for that duration. You receive connection credentials and can navigate, click, type, scrape, and take screenshots using your own automation code. No Hyperbrowser account or API key is required. Browser actions after purchase do not require additional X402 payments.

Pricing

Purchase a session

The TypeScript example below uses the X402 SDKs to handle the payment challenge, sign with your wallet, and retry the request automatically. It supports both EVM and Solana wallets.

1. Install dependencies

2. Configure your wallet

Set either or both keys in a .env file. Use a 0x-prefixed EVM private key or a base58-encoded Solana 64-byte secret key, and fund the wallet with USDC on the network you intend to use.
Set only one key to choose EVM or Solana. With both set, the client uses the first compatible payment option returned by the server.

3. Create the session

Save this as create-session.ts. If your keys are in .env.agent, replace dotenv.config() with dotenv.config({ path: ".env.agent" }).
Run the example:
The response is saved to session.json for the browser connection and management examples below. Add any of the supported options to the request body to configure the browser.

1. Request payment requirements

Send {} for the default session, or include any of the supported options. This example requests five minutes:
A valid unpaid request returns 402 Payment Required. The PAYMENT-REQUIRED header contains base64-encoded JSON with the accepted networks, assets, amount, and recipient.

2. Sign and retry

Use your X402 client to generate a signed payment authorization from those requirements. Set PAYMENT_SIGNATURE to the encoded authorization returned by your client, then retry with the same request body:
Hyperbrowser verifies the payment authorization, creates the browser, and settles payment before returning its connection details. The successful response also includes a PAYMENT-RESPONSE header with settlement information.

Session response

The example below shows the shape of session.json; the URL hosts and tokens are illustrative:
Save the successful response: it contains the credentials needed to use this browser. The session token does not grant access to account management APIs.

Use the browser

For example, install playwright-core and tsx to run the TypeScript example using the saved response:
Save this as use-session.ts and run it with npx tsx use-session.ts:
Use the returned URLs directly. The regular SDK’s sessions.create, sessions.get, and sessions.stop methods use account authentication and cannot be authenticated with this session token.

Get session status and stop the browser

Use the managementToken from the purchase response as a bearer token. These endpoints are free and require no additional X402 payment or Hyperbrowser API key. The token authorizes only the purchased session and remains valid for 24 hours, including after the browser stops or times out. Read the saved response with jq, then get the session’s status:
The response contains id, status, startTime, endTime, timeoutMinutes, and the original expiresAt. startTime and endTime are Unix timestamps in milliseconds, or null when unavailable. Get does not reissue connection credentials; keep the creation response to reconnect. Stop the session using the same variables:
A successful stop returns { "success": true }. Stopping an already closed or errored session also succeeds. The browser’s token and the tokens in connection or live-view URLs cannot authorize these management endpoints. The managementToken cannot authorize browser connections or regular account APIs. See the get session reference and stop session reference for response codes.

Supported options

All fields are optional. Only timeoutMinutes changes the price; the other supported preferences do not add a surcharge. Example request body:
Web recording is disabled. Other regular session parameters are not accepted, including proxy settings, CAPTCHA solving, profiles, extensions, static IPs, snapshots, saved downloads, browser arguments, memory sizes, and custom token lifetimes. Unknown fields and invalid option combinations return 400 before payment verification.

Lifetime and retries

  • The browser has a maximum lifetime set by timeoutMinutes. Values below 5 or above 60 are not supported.
  • By default, disconnecting a CDP client stops the session. To reconnect later, add keepAlive=true to the WebSocket URL before connecting. This does not extend the timeout, and closing all browser pages can still stop the session. See session lifecycle for connection behavior.
  • Use the X402 get and stop endpoints above to check status or end a session. There are no X402 list, update, or extend endpoints.
  • One payment authorization can create only one session. Reusing a reserved authorization returns 409, including while its first request is still running.
  • If a request fails before settlement, such as a capacity rejection during creation, the unexpired authorization can be retried. After settlement has been attempted, the authorization stays reserved even if the response is an error. If settlement fails, the server attempts to stop the browser and does not return its connection details.
See the X402 session API reference for headers and response codes, or the X402 overview for per-request Fetch and Search payments.