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

# Create a browser session

> Learn how to create and configure browser sessions in Browserbase

A browser session represents a single browser instance running in the cloud. It's the fundamental building block of Browserbase, providing an isolated environment for your web automation tasks.

<Note>
  **Looking for serverless automation?** [Functions](/platform/runtime/overview) automatically create and manage sessions for you, letting you deploy browser automation as API-invokable functions without manual session management.
</Note>

## Creating a session

Create browser sessions through the [Sessions API](/reference/api/create-a-session), which gives you full control over configuration and features. After creation, you'll receive a connection URL to use with your preferred automation framework.

<Warning>
  The create session API is rate limited based on your plan's concurrent session
  limits. See [Concurrency & Rate
  Limits](/optimizations/concurrency/overview) for details on limits and
  best practices for handling them.
</Warning>

<Tabs>
  <Tab title="Node.js">
    ```typescript theme={null}
    import { Browserbase } from "@browserbasehq/sdk";

    const bb = new Browserbase({ apiKey: process.env.BROWSERBASE_API_KEY! });
    const session = await bb.sessions.create({
      // Add configuration options here
    });
    ```
  </Tab>

  <Tab title="Python">
    ```python theme={null}
    import os
    from browserbase import Browserbase

    bb = Browserbase(api_key=os.environ["BROWSERBASE_API_KEY"])
    session = bb.sessions.create(
        # Add configuration options here
    )
    ```
  </Tab>

  <Tab title="cURL">
    ```bash theme={null}
    curl --request POST \
      --url "https://api.browserbase.com/v1/sessions" \
      --header "Content-Type: application/json" \
      --header "x-bb-api-key: $BROWSERBASE_API_KEY" \
      --data '{
        // Add configuration options here
      }'
    ```
  </Tab>
</Tabs>

## Configuration options

When creating a session, you can configure various settings. For complete API details, see:

* [Create Session API Reference](/reference/api/create-a-session)
* [Node.js SDK Reference](/reference/sdk/nodejs)
* [Python SDK Reference](/reference/sdk/python)

### Basic settings

* **Region** — Decrease latency by choosing where your browser runs using [browser regions](/optimizations/latency/multi-region)
* **Viewport** - Set custom screen dimensions for your browser window.
* **Keep alive** — Enable [longer-running sessions](/platform/browser/long-sessions/overview) that run even after disconnection
* **Recording** - Enable/disable [session recording](/platform/browser/observability/session-recording) (enabled by default)
* **Logging** - Enable/disable session logging for debugging (enabled by default)

### Advanced features

* **[Agent Identity](/platform/identity/overview)** - Configure browser identity:

  * Automatic fingerprinting (devices, locales, operating systems)
  * Verified (Scale plan only)
  * [Proxy settings](/platform/identity/proxies)
  * Captcha solving (enabled by default)

* **[Extensions](/platform/browser/core-features/browser-extensions)** - Load custom browser extensions to enhance functionality

* **[Browser Context](/platform/browser/core-features/contexts)** - Configure isolated browsing contexts for session persistence

* **[User Metadata](/platform/browser/core-features/session-metadata)** - Attach custom data for session organization and filtering

## Next steps

Once you've created a session, you can:

1. Connect to it using your preferred automation framework - see [Using a browser session](/platform/browser/getting-started/using-browser-session)
2. Monitor it through the [Session Inspector](/platform/browser/observability/observability)
3. End it manually or let it timeout - see [Manage a browser session](/platform/browser/getting-started/manage-browser-session)
