browseraiOpen the playground

HTTP API

Everything the SDK does is plain HTTP on https://browserai-gw.fly.dev.

Signing a request

Endpoints marked signed take an x-browserai-auth header: base64 of { address, nonce, expires, signature }, where signature is an EIP-191 signature of

BrowserAI
POST /v1/sessions
nonce: <8 to 80 chars, used once>
expires: <unix seconds, at most 600 s ahead>

Smart accounts are verified with ERC-1271 and ERC-6492.

EndpointAuth
POST /v1/sessionssigned, or X-PAYMENT (x402)
GET /v1/sessions/:idsession token (Bearer)
DELETE /v1/sessions/:idsession token
POST /v1/sessions/:id/actionssession token
WS /v1/sessions/:id/cdp?token=session token
WS /v1/sessions/:id/live?view=view token
GET /v1/sessions/:id/replay?view=view token
POST /v1/depositsnone, credits the sender
GET /v1/balancesigned
GET|PUT|DELETE /v1/vault/:namesigned
GET /v1/statsnone

Actions

POST /v1/sessions/:id/actions
authorization: Bearer <token>

{ "type": "goto", "url": "https://example.com" }
{ "type": "click", "selector": "#buy" }        or { "type": "click", "text": "Add to cart" }
{ "type": "click", "selector": "#buy", "dispatch": true }   DOM click event, no mouse move
{ "type": "type", "selector": "#q", "text": "usb-c charger", "submit": true }
{ "type": "press", "key": "Enter" }
{ "type": "select", "selector": "#size", "value": "M" }
{ "type": "check", "selector": "#terms" }
{ "type": "wait", "ms": 1000 }                 or { "type": "wait", "selector": ".done" }
{ "type": "extract", "format": "text" | "list" | "links", "selector": "…" }
{ "type": "screenshot", "fullPage": true }
{ "type": "cookies.export" }  { "type": "cookies.import", "cookies": [ … ] }
{ "actions": [ … up to 20, run in order ] }