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

# Browserbase: Create Session

> Managing Browserbase browser sessions and session artifacts. Includes SDK V2 guidance, input constraints, response fields, and Deepline credit cost.

Managing Browserbase browser sessions and session artifacts.

<Info>
  Tool ID: `browserbase_create_session`
</Info>

## Run this action

Use the TypeScript SDK for a single call. Put `ctx.tools.execute(...)` inside a Play when the call should be durable, scheduled, or run across a CSV.

```ts theme={null}
import { Deepline } from 'deepline';

const deepline = await Deepline.connect();
const result = await deepline.tools.execute(
  'browserbase_create_session',
  {
    "browserSettings": {
      "viewport": {
        "width": 123,
        "height": 123
      },
      "blockAds": true,
      "solveCaptchas": true
    },
    "timeout": 123,
    "region": "us-west-2"
  },
);

console.log(result.toolResponse.raw);
```

### CLI

```bash theme={null}
deepline tools execute browserbase_create_session --input '{
  "browserSettings": {
    "viewport": {
      "width": 123,
      "height": 123
    },
    "blockAds": true,
    "solveCaptchas": true
  },
  "timeout": 123,
  "region": "us-west-2"
}' --json
```

## Example response

The SDK exposes this shape at `result.toolResponse.raw`. Values below are representative.

```json theme={null}
{
  "data": {
    "id": "id_123",
    "createdAt": "2026-01-15T12:00:00Z",
    "updatedAt": "2026-01-15T12:00:00Z",
    "projectId": "project_123",
    "startedAt": "2026-01-15T12:00:00Z",
    "expiresAt": "2026-01-15T12:00:00Z",
    "status": "PENDING",
    "proxyBytes": 123,
    "keepAlive": true,
    "region": "us-west-2",
    "connectUrl": "https://example.com/resource",
    "seleniumRemoteUrl": "https://example.com/resource",
    "signingKey": "example"
  }
}
```

Use `deepline tools get browserbase_create_session --json` for the latest machine-readable contract.

## Input reference

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `payload.browserSettings` | `object` | No | — | — |
| `payload.timeout` | `integer` | No | — | Minimum: 60. Maximum: 21600. |
| `payload.region` | `"us-west-2" \| "us-east-1" \| "eu-central-1" \| "ap-southeast-1"` | No | — | Allowed: `us-west-2`, `us-east-1`, `eu-central-1`, `ap-southeast-1`. |

<details>
  <summary>Show raw input schema</summary>

  ### Input JSON Schema

  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "browserSettings": {
        "type": "object",
        "properties": {
          "viewport": {
            "type": "object",
            "properties": {
              "width": {
                "type": "integer"
              },
              "height": {
                "type": "integer"
              }
            },
            "additionalProperties": false
          },
          "blockAds": {
            "type": "boolean"
          },
          "solveCaptchas": {
            "type": "boolean"
          },
          "advancedStealth": {
            "type": "boolean"
          },
          "verified": {
            "type": "boolean"
          },
          "captchaImageSelector": {
            "type": "string"
          },
          "captchaInputSelector": {
            "type": "string"
          },
          "os": {
            "type": "string",
            "enum": [
              "windows",
              "mac",
              "linux",
              "mobile",
              "tablet"
            ]
          },
          "allowedDomains": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "ignoreCertificateErrors": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "timeout": {
        "type": "integer",
        "minimum": 60,
        "maximum": 21600
      },
      "region": {
        "type": "string",
        "enum": [
          "us-west-2",
          "us-east-1",
          "eu-central-1",
          "ap-southeast-1"
        ]
      }
    },
    "required": [],
    "additionalProperties": false
  }
  ```
</details>

## Output reference

Standard tool result payload.

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `result.data` | `object` | Yes | — | Provider response payload. |
| `result.data.id` | `string` | Yes | — | — |
| `result.data.createdAt` | `string` | Yes | — | Format: `date-time`. |
| `result.data.updatedAt` | `string` | Yes | — | Format: `date-time`. |
| `result.data.projectId` | `string` | Yes | — | The Project ID linked to the Session. |
| `result.data.startedAt` | `string` | Yes | — | Format: `date-time`. |
| `result.data.endedAt` | `string` | No | — | Format: `date-time`. |
| `result.data.expiresAt` | `string` | Yes | — | Format: `date-time`. |
| `result.data.status` | `"PENDING" \| "RUNNING" \| "ERROR" \| "TIMED_OUT" \| "COMPLETED"` | Yes | — | Allowed: `PENDING`, `RUNNING`, `ERROR`, `TIMED_OUT`, `COMPLETED`. |
| `result.data.proxyBytes` | `integer` | Yes | — | Bytes used via the [Proxy](https://docs.browserbase.com/features/stealth-mode#proxies-and-residential-ips) |
| `result.data.keepAlive` | `boolean` | Yes | — | Indicates if the Session was created to be kept alive upon disconnections |
| `result.data.contextId` | `string` | No | — | Optional. The Context linked to the Session. |
| `result.data.region` | `"us-west-2" \| "us-east-1" \| "eu-central-1" \| "ap-southeast-1"` | Yes | — | The region where the Session is running. Allowed: `us-west-2`, `us-east-1`, `eu-central-1`, `ap-southeast-1`. |
| `result.data.userMetadata` | `object` | No | — | Arbitrary user metadata to attach to the session. To learn more about user metadata, see [User Metadata](https://docs.browserbase.com/features/sessions#user-metadata). |
| `result.data.connectUrl` | `string` | Yes | — | WebSocket URL to connect to the Session. Format: `uri`. |
| `result.data.seleniumRemoteUrl` | `string` | Yes | — | HTTP URL to connect to the Session. Format: `uri`. |
| `result.data.signingKey` | `string` | Yes | — | Signing key to use when connecting to the Session via HTTP. |
| `result.meta` | `object` | No | — | Additional response metadata (status, paging). |

<details>
  <summary>Show raw output schema</summary>

  ### Output JSON Schema

  ```json theme={null}
  {
    "type": "object",
    "description": "Standard tool result payload.",
    "properties": {
      "data": {
        "type": "object",
        "description": "Provider response payload.",
        "properties": {
          "id": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "projectId": {
            "type": "string",
            "description": "The Project ID linked to the Session."
          },
          "startedAt": {
            "type": "string",
            "format": "date-time"
          },
          "endedAt": {
            "type": "string",
            "format": "date-time"
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time"
          },
          "status": {
            "type": "string",
            "enum": [
              "PENDING",
              "RUNNING",
              "ERROR",
              "TIMED_OUT",
              "COMPLETED"
            ]
          },
          "proxyBytes": {
            "type": "integer",
            "description": "Bytes used via the [Proxy](https://docs.browserbase.com/features/stealth-mode#proxies-and-residential-ips)"
          },
          "keepAlive": {
            "type": "boolean",
            "description": "Indicates if the Session was created to be kept alive upon disconnections"
          },
          "contextId": {
            "type": "string",
            "description": "Optional. The Context linked to the Session."
          },
          "region": {
            "type": "string",
            "description": "The region where the Session is running.",
            "enum": [
              "us-west-2",
              "us-east-1",
              "eu-central-1",
              "ap-southeast-1"
            ]
          },
          "userMetadata": {
            "type": "object",
            "description": "Arbitrary user metadata to attach to the session. To learn more about user metadata, see [User Metadata](https://docs.browserbase.com/features/sessions#user-metadata).",
            "properties": {},
            "additionalProperties": true
          },
          "connectUrl": {
            "type": "string",
            "description": "WebSocket URL to connect to the Session.",
            "format": "uri"
          },
          "seleniumRemoteUrl": {
            "type": "string",
            "description": "HTTP URL to connect to the Session.",
            "format": "uri"
          },
          "signingKey": {
            "type": "string",
            "description": "Signing key to use when connecting to the Session via HTTP."
          }
        },
        "required": [
          "id",
          "createdAt",
          "updatedAt",
          "projectId",
          "status",
          "proxyBytes",
          "keepAlive",
          "region",
          "startedAt",
          "expiresAt",
          "connectUrl",
          "seleniumRemoteUrl",
          "signingKey"
        ],
        "additionalProperties": false
      },
      "meta": {
        "type": "object",
        "description": "Additional response metadata (status, paging).",
        "additionalProperties": true
      }
    },
    "required": [
      "data"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Deepline cost

* Pricing model: `provider_usage` (provider usage).
* Estimated Deepline credits: `0.03` per pricing unit.

## Related documentation

* [Browserbase provider guide](/docs/providers/browserbase/guide)
* [SDK V2 quickstart](/docs/sdk-v2/quickstart)
* [SDK reference](/docs/sdk-v2/sdk-reference)
* [Run tools across a CSV](/docs/sdk-v2/batch-csv)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.