Quick start
1
Install dependencies
2
Create a session
Run the following with your wallet’s private key (requires USDC on Base):
API reference
Create session
Creates a new browser session with prepaid time.- First Response (402)
- With Payment (200)
When you first make a request, you’ll receive a 402 Payment Required response with payment details:
Get session status
Check the status of an active session.Extend session
Add more time to an active session.Extending a session requires another x402 payment for the additional time.
Terminate session
End a session early. Unused time may be eligible for refund.Making x402 payments
- x402 Package (Recommended)
- x402-fetch (Automatic)
Use the x402 package for full control over the payment flow:
Using your session
Once you have aconnectUrl, connect with Playwright or Puppeteer:
Further reading
x402 Protocol
Learn about the x402 payment protocol
Get USDC on Base
Bridge or swap tokens to get USDC on Base
Browserbase Docs
Explore more Browserbase features