> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.auxiliar.ai/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.auxiliar.ai/_mcp/server.

# Browserbase

Proxies the [Browserbase](https://www.browserbase.com) REST API — sessions, contexts, extensions, and projects. Like ElevenLabs, it's a whole API surface, so the gateway mounts a **wildcard** and forwards the path after `/browserbase/` verbatim:

```
GET|POST|PUT|DELETE /browserbase/<api path>   → https://api.browserbase.com/<api path>
```

Because the path passes through unchanged, **new Browserbase endpoints work without any gateway change**. The methods are the REST verbs across sessions/contexts/extensions — `GET`, `POST`, `PUT`, `DELETE`.

## Common paths

| Path                                | Purpose          |
| ----------------------------------- | ---------------- |
| `POST /browserbase/v1/sessions`     | Create a session |
| `GET /browserbase/v1/sessions/{id}` | Session details  |
| `POST /browserbase/v1/contexts`     | Create a context |
| `GET /browserbase/v1/projects`      | List projects    |

## What the gateway injects and strips

* **The `X-BB-API-Key` header is injected**, overwriting any client-supplied one.
* **The `Authorization` header is stripped** before forwarding — Browserbase has no use for your gateway token.

`projectId` is optional on session/context creation — Browserbase infers it from the API key — so the gateway injects nothing into the body. You may still pass `projectId` explicitly if you need to target a specific project.

## WebSocket / browser automation

**The WebSocket session is not proxied** — the gateway is plain HTTP only.

Browserbase runs the actual browser automation over a WebSocket `connectUrl` that the session response returns. Create the session **through** the gateway, then connect your Playwright/Puppeteer client directly to the session-scoped `connectUrl`:

1. `POST /browserbase/v1/sessions` through the gateway.
2. Connect your automation client directly to the `connectUrl` it returns.

The master key still never reaches the client.

## Example

```bash
curl -X POST "$GATEWAY/browserbase/v1/sessions" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'
```

The response is Browserbase's JSON, returned unchanged. For request and response fields, follow [Browserbase's API reference](https://docs.browserbase.com/reference/api/overview) — the gateway does not alter them.