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

# Create Browser Session

> Create a new browser session.

**Pricing:** Browser sessions are charged at $0.02/hour for all users.

The full rate is charged upfront when the session starts.
When you stop the session, any unused time is automatically refunded proportionally.

Billing is rounded up to the minute (minimum 1 minute).
For example, if you stop a session after 30 minutes, you'll be refunded half the charged amount.

**Session Limits:**
- All users: Up to 4 hours per session



## OpenAPI

````yaml /cloud/openapi/v3.json post /browsers
openapi: 3.1.0
info:
  title: Browser Use Public API v3
  summary: Browser Use session-based agent API (v3)
  version: 3.0.0
servers:
  - url: https://api.browser-use.com/api/v3
    description: Production server
security: []
paths:
  /browsers:
    post:
      tags:
        - Browsers
      summary: Create Browser Session
      description: >-
        Create a new browser session.


        **Pricing:** Browser sessions are charged at $0.02/hour for all users.


        The full rate is charged upfront when the session starts.

        When you stop the session, any unused time is automatically refunded
        proportionally.


        Billing is rounded up to the minute (minimum 1 minute).

        For example, if you stop a session after 30 minutes, you'll be refunded
        half the charged amount.


        **Session Limits:**

        - All users: Up to 4 hours per session
      operationId: create_browser_session_browsers_post
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateBrowserSessionRequest'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BrowserSessionItemView'
        '403':
          description: Session timeout limit exceeded (maximum 4 hours)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SessionTimeoutLimitExceededError'
        '404':
          description: Profile not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProfileNotFoundError'
        '422':
          description: Request validation failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationError'
        '429':
          description: Too many concurrent active sessions
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TooManyConcurrentActiveSessionsError'
      security:
        - APIKeyHeader: []
components:
  schemas:
    CreateBrowserSessionRequest:
      properties:
        profileId:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Profile ID
          description: The ID of the profile to use for the session
        proxyCountryCode:
          anyOf:
            - $ref: '#/components/schemas/ProxyCountryCode'
            - type: 'null'
          title: Proxy Country Code
          description: >-
            Country code for proxy location. Defaults to US. Set to null to
            disable proxy.
          default: us
        timeout:
          type: integer
          title: Timeout
          description: >-
            The timeout for the session in minutes. All users can use up to 240
            minutes (4 hours). Browser sessions are charged $0.02/hour.
          default: 60
          ge: 1
          le: 240
        browserScreenWidth:
          anyOf:
            - type: integer
              maximum: 6144
              minimum: 320
            - type: 'null'
          title: Browser Screen Width
          description: Custom screen width in pixels for the browser.
        browserScreenHeight:
          anyOf:
            - type: integer
              maximum: 3456
              minimum: 320
            - type: 'null'
          title: Browser Screen Height
          description: Custom screen height in pixels for the browser.
        allowResizing:
          type: boolean
          title: Allow Resizing
          description: >-
            Whether to allow the browser to be resized during the session (not
            recommended since it reduces stealthiness).
          default: false
        customProxy:
          anyOf:
            - $ref: '#/components/schemas/CustomProxy'
            - type: 'null'
          title: Custom Proxy
          description: >-
            Custom proxy settings to use for the session. If not provided, our
            proxies will be used. Custom proxies are available on any active
            subscription.
        enableRecording:
          type: boolean
          title: Enable Recording
          description: If True, enables session recording. Defaults to False.
          default: false
      type: object
      title: CreateBrowserSessionRequest
      description: Request model for creating a browser session.
    BrowserSessionItemView:
      properties:
        id:
          type: string
          format: uuid
          title: ID
          description: Unique identifier for the session
        status:
          $ref: '#/components/schemas/BrowserSessionStatus'
          title: Status
          description: Current status of the session (active/stopped)
        liveUrl:
          anyOf:
            - type: string
            - type: 'null'
          title: Live URL
          description: URL where the browser can be viewed live in real-time
        cdpUrl:
          anyOf:
            - type: string
            - type: 'null'
          title: CDP URL
          description: Chrome DevTools Protocol URL for browser automation
        timeoutAt:
          type: string
          format: date-time
          title: Timeout At
          description: Timestamp when the session will timeout
        startedAt:
          type: string
          format: date-time
          title: Started At
          description: Timestamp when the session was created and started
        finishedAt:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Finished At
          description: Timestamp when the session was stopped (None if still active)
        proxyUsedMb:
          type: string
          pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
          title: Proxy Used MB
          description: Amount of proxy data used in MB
          default: '0'
        proxyCost:
          type: string
          pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
          title: Proxy Cost
          description: Cost of proxy usage in USD
          default: '0'
        browserCost:
          type: string
          pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
          title: Browser Cost
          description: Cost of browser session hosting in USD
          default: '0'
        agentSessionId:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Agent Session ID
          description: >-
            ID of the agent session that created this browser (None for
            standalone BaaS sessions)
        recordingUrl:
          anyOf:
            - type: string
            - type: 'null'
          title: Recording URL
          description: >-
            Presigned URL to download the session recording (available after
            session ends, if recording was enabled)
      type: object
      required:
        - id
        - status
        - timeoutAt
        - startedAt
      title: BrowserSessionItemView
      description: View model for representing a browser session in list views.
    SessionTimeoutLimitExceededError:
      properties:
        detail:
          type: string
          title: Detail
          default: Maximum session timeout is 4 hours (240 minutes).
      type: object
      title: SessionTimeoutLimitExceededError
      description: Error response when session timeout exceeds the maximum allowed limit
    ProfileNotFoundError:
      properties:
        detail:
          type: string
          title: Detail
          default: Profile not found
      type: object
      title: ProfileNotFoundError
      description: Error response when a profile is not found
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    TooManyConcurrentActiveSessionsError:
      properties:
        detail:
          type: string
          title: Detail
          default: >-
            Too many concurrent active sessions. Please wait for one to finish,
            kill one, or upgrade your plan.
      type: object
      title: TooManyConcurrentActiveSessionsError
      description: Error response when user has too many concurrent active sessions
    ProxyCountryCode:
      type: string
      enum:
        - ad
        - ae
        - af
        - ag
        - ai
        - al
        - am
        - an
        - ao
        - aq
        - ar
        - as
        - at
        - au
        - aw
        - az
        - ba
        - bb
        - bd
        - be
        - bf
        - bg
        - bh
        - bi
        - bj
        - bl
        - bm
        - bn
        - bo
        - bq
        - br
        - bs
        - bt
        - bv
        - bw
        - by
        - bz
        - ca
        - cc
        - cd
        - cf
        - cg
        - ch
        - ck
        - cl
        - cm
        - co
        - cr
        - cs
        - cu
        - cv
        - cw
        - cx
        - cy
        - cz
        - de
        - dj
        - dk
        - dm
        - do
        - dz
        - ec
        - ee
        - eg
        - eh
        - er
        - es
        - et
        - fi
        - fj
        - fk
        - fm
        - fo
        - fr
        - ga
        - gd
        - ge
        - gf
        - gg
        - gh
        - gi
        - gl
        - gm
        - gn
        - gp
        - gq
        - gr
        - gs
        - gt
        - gu
        - gw
        - gy
        - hk
        - hm
        - hn
        - hr
        - ht
        - hu
        - id
        - ie
        - il
        - im
        - in
        - iq
        - ir
        - is
        - it
        - je
        - jm
        - jo
        - jp
        - ke
        - kg
        - kh
        - ki
        - km
        - kn
        - kp
        - kr
        - kw
        - ky
        - kz
        - la
        - lb
        - lc
        - li
        - lk
        - lr
        - ls
        - lt
        - lu
        - lv
        - ly
        - ma
        - mc
        - md
        - me
        - mf
        - mg
        - mh
        - mk
        - ml
        - mm
        - mn
        - mo
        - mp
        - mq
        - mr
        - ms
        - mt
        - mu
        - mv
        - mw
        - mx
        - my
        - mz
        - na
        - nc
        - ne
        - nf
        - ng
        - ni
        - nl
        - 'no'
        - np
        - nr
        - nu
        - nz
        - om
        - pa
        - pe
        - pf
        - pg
        - ph
        - pk
        - pl
        - pm
        - pn
        - pr
        - ps
        - pt
        - pw
        - py
        - qa
        - re
        - ro
        - rs
        - ru
        - rw
        - sa
        - sb
        - sc
        - sd
        - se
        - sg
        - sh
        - si
        - sj
        - sk
        - sl
        - sm
        - sn
        - so
        - sr
        - ss
        - st
        - sv
        - sx
        - sy
        - sz
        - tc
        - td
        - tf
        - tg
        - th
        - tj
        - tk
        - tl
        - tm
        - tn
        - to
        - tr
        - tt
        - tv
        - tw
        - tz
        - ua
        - ug
        - uk
        - us
        - uy
        - uz
        - va
        - vc
        - ve
        - vg
        - vi
        - vn
        - vu
        - wf
        - ws
        - xk
        - ye
        - yt
        - za
        - zm
        - zw
      title: ProxyCountryCode
    CustomProxy:
      properties:
        host:
          type: string
          maxLength: 255
          minLength: 1
          title: Host
          description: Host of the proxy.
        port:
          type: integer
          maximum: 65535
          minimum: 1
          title: Port
          description: Port of the proxy.
        username:
          anyOf:
            - type: string
              maxLength: 255
              minLength: 1
            - type: 'null'
          title: Username
          description: Username for proxy authentication.
        password:
          anyOf:
            - type: string
              maxLength: 255
              minLength: 1
            - type: 'null'
          title: Password
          description: Password for proxy authentication.
        ignoreCertErrors:
          type: boolean
          title: Ignore Certificate Errors
          description: >-
            Ignore TLS certificate errors. Enable this if your proxy uses a
            self-signed or untrusted certificate (e.g. Burp Suite, corporate
            proxies).
          default: false
      type: object
      required:
        - host
        - port
      title: CustomProxy
      description: Request model for creating a custom proxy.
    BrowserSessionStatus:
      type: string
      enum:
        - active
        - stopped
      title: BrowserSessionStatus
      description: |-
        Enumeration of possible browser session states

        Attributes:
            ACTIVE: Session is currently active and running (browser is running)
            STOPPED: Session has been stopped and is no longer active (browser is stopped)
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: X-Browser-Use-API-Key

````