> ## Documentation Index
> Fetch the complete documentation index at: https://docs.driver.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Overview

> Create managed browser sessions and use Driver's API from your automation code.

Driver provides managed Chrome sessions that you control over CDP. Create a hosted session, connect with Playwright, Puppeteer, Browser-Use, Crawl4AI, Stagehand, or another CDP client, then stop the session when your automation finishes.

## Base URL

```text theme={null}
https://api.driver.dev
```

Send your API key as a bearer token:

```bash theme={null}
Authorization: Bearer $DRIVER_API_KEY
```

## Quick Start

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST "https://api.driver.dev/v1/browser/session" \
    -H "Authorization: Bearer $DRIVER_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{"type":"hosted"}'
  ```

  ```python Python theme={null}
  import os
  import requests

  resp = requests.post(
      "https://api.driver.dev/v1/browser/session",
      headers={
          "Authorization": f"Bearer {os.getenv('DRIVER_API_KEY')}",
          "Content-Type": "application/json",
      },
      json={"type": "hosted"},
  )
  resp.raise_for_status()
  session = resp.json()
  print(session["cdpUrl"])
  ```

  ```typescript TypeScript theme={null}
  import BrowsercashSDK from "@browsercash/sdk";

  const client = new BrowsercashSDK({
    apiKey: process.env.DRIVER_API_KEY!,
    baseURL: "https://api.driver.dev",
  });

  const session = await client.browser.session.create({ type: "hosted" });
  console.log(session.cdpUrl);
  ```
</CodeGroup>

## Core Flow

<Steps>
  <Step title="Create a session">
    `POST /v1/browser/session` returns a `sessionId`, status, node, and `cdpUrl`.
  </Step>

  <Step title="Connect over CDP">
    Use `cdpUrl` with Playwright, Puppeteer, Browser-Use, Crawl4AI, Stagehand, or another CDP-compatible client.
  </Step>

  <Step title="Run your automation">
    Navigate, click, scrape, or test from the remote browser.
  </Step>

  <Step title="Stop the session">
    `DELETE /v1/browser/session?sessionId=...` stops billing and releases the browser.
  </Step>
</Steps>

## Current APIs

<CardGroup cols={2}>
  <Card title="Browser Sessions" href="/docs/fundamentals/creating-a-browser-session" icon="browser">
    Create, list, fetch, update, and stop managed browser sessions.
  </Card>

  <Card title="Session Options" href="/docs/fundamentals/creating-a-browser-session#session-options" icon="sliders">
    Configure hosted sessions with country, duration, window size, and profiles.
  </Card>

  <Card title="Profiles" href="/docs/features/browser-profiles" icon="id-card">
    Persist cookies and browser state across hosted sessions.
  </Card>

  <Card title="API Reference" href="/api-reference" icon="book-open">
    View the Mintlify API reference generated from the Driver OpenAPI spec.
  </Card>
</CardGroup>

## Account Balance

Use the balance endpoint to check the current account balance and included network allowance.

```bash theme={null}
curl "https://api.driver.dev/v1/account/balance" \
  -H "Authorization: Bearer $DRIVER_API_KEY"
```
