> ## 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 Context



## OpenAPI

````yaml post /v1/contexts
openapi: 3.0.0
info:
  title: Browserbase API
  description: Browserbase API for 3rd party developers
  version: v1
servers:
  - url: https://api.browserbase.com
    description: Public endpoint
    variables: {}
security:
  - BrowserbaseAuth: []
tags: []
paths:
  /v1/contexts:
    post:
      summary: Create a Context
      operationId: Contexts_create
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                projectId:
                  description: >-
                    The Project ID. Can be found in
                    [Settings](https://www.browserbase.com/settings). Optional -
                    if not provided, the project will be inferred from the API
                    key.
                  type: string
      responses:
        '201':
          description: >-
            The request has succeeded and a new resource has been created as a
            result.
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                  uploadUrl:
                    description: An upload URL to upload a custom user-data-directory.
                    type: string
                    minLength: 1
                  publicKey:
                    description: The public key to encrypt the user-data-directory.
                    type: string
                  cipherAlgorithm:
                    description: >-
                      The cipher algorithm used to encrypt the
                      user-data-directory. AES-256-CBC is currently the only
                      supported algorithm.
                    type: string
                  initializationVectorSize:
                    description: >-
                      The initialization vector size used to encrypt the
                      user-data-directory. [Read more about how to use
                      it](/features/contexts).
                    type: integer
                    format: uint8
                required:
                  - id
                  - uploadUrl
                  - publicKey
                  - cipherAlgorithm
                  - initializationVectorSize
components:
  securitySchemes:
    BrowserbaseAuth:
      type: apiKey
      in: header
      name: X-BB-API-Key
      description: Your [Browserbase API Key](https://www.browserbase.com/settings).

````