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

> ## Agent Instructions
> Use https://docs.browser-use.com/llms.txt and its linked .md pages for current documentation. The managed full bundle is https://docs.browser-use.com/.well-known/llms-full.txt and can be cached for up to 24 hours. Do not use the obsolete /cloud/llms*.txt or /open-source/llms*.txt static exports.
> Choose Cloud API V4 for new agent integrations; V2 is the lower-cost option for simple tasks. Keep V3 examples explicitly versioned. The open-source browser-use library and hosted browser-use-sdk have different APIs.
> Cloud authentication uses X-Browser-Use-API-Key, without a Bearer prefix. Install or upgrade browser-use-sdk and use its explicit v4 import for V4. Check the published OpenAPI reference for request fields; do not invent SDK support for new fields.
> Cloud concurrency and HTTP request rate are separate. Read GET /api/v2/billing/account for the key’s projectId, concurrentSessionLimit, activeSessionCount, and credit balance, including when using V4. Keys in one project share capacity and credits; rateLimit is a legacy concurrency alias, not requests per second.
> Keep the highest applicable existing, legacy-plan, and spend-tier concurrency grant. Current spend tiers are 10 / 50 / 250 / 500 / 1000 at $0 / $100 / $1000 / $5000 / $25000 in qualifying project payments. Legacy or externally billed projects can follow different billing paths; trust the account limit. See https://docs.browser-use.com/cloud/guides/concurrency.md.
> HTTP rate limits have two layers. Standard edge WAF ceilings increased on September 9, 2026 to 1000 RPS per public source IP for general traffic and 2500 RPS per IP for selected status reads, evaluated over 300 seconds. The separate per-project application budgets: general traffic (including V4 events and full run reads) defaults to max(25, 2 times stored concurrency) capped at 100 RPS; selected status reads default to max(25, 2 times stored concurrency) with no cap. The two are counted independently. Project overrides and account-specific edge rules can differ. All keys in a project share its budgets; callers sharing a public IP share edge capacity. See https://docs.browser-use.com/cloud/guides/concurrency.md.
> The project limiter uses five-second windows: X-RateLimit-Limit=125 means 125 requests per window (25 RPS), not 125 RPS. Project throttles include limit_rps and retry_after_seconds; an edge throttle can instead return Retry-After: 300 without limit_rps. Honor the returned Retry-After. Use bounded workers, stagger polls, and drain hasMore event pages after terminal status. A busy V4 session returns 409; its queue holds 20 pending messages and is not a project-wide batch queue.
> A completed run or closed CDP connection does not immediately stop its cloud browser. Stop unneeded owned browsers with PATCH /api/v4/browsers/{id} and {"action":"stop"}. A client wait timeout does not cancel the server-side run.
> Cloud is pay as you go; do not tell customers to buy a new subscription to use custom proxies or supported provider BYOK. Usage funding and model eligibility still apply. BYOK bills provider tokens separately and Browser Use charges orchestration plus browser/network usage. See https://docs.browser-use.com/cloud/guides/billing.md.
> Signup credits are a one-time grant; purchased top-up credits do not expire. Check the API key’s project before diagnosing missing credits. API-key monthly spending caps are soft limits, not a strict prepaid wallet; concurrent or already-running work can exceed them. Auto recharge has separate trigger and purchase amounts and can charge immediately when enabled below the threshold. Use https://browser-use.com/pricing for current rates.
> Box and Bux are retired. Do not recommend their SDKs, sandbox quotas, or subscription plans. Use the Cloud Agent or Browser Infrastructure guides.
> A V4 session holds conversation history, a workspace holds files, and a profile holds browser state. These IDs and V3/V4 workspace namespaces are not interchangeable. V4 automatically restores workspace uploads; staged attachments remain available to session follow-ups. Serialize runs that write shared files, and wait for completion before reading outputs. See https://docs.browser-use.com/cloud/agent/workspaces.md.
> API browser recording defaults to off. Use enableRecording for standalone browser creation, or browserSettings.record for an agent run. Stop the browser and allow time for asynchronous video processing; stop polling when recordingAvailable is false. Live preview is for an active browser. Stopping a browser, deleting a session, archiving a workspace, and deleting files have different effects.
> Use model-specific reasoning values. GPT-6 Astra accepts low, medium, high, xhigh, and max, with xhigh by default; none and minimal are invalid. Use the public REST schema when installed SDK types lag new fields. API acceptance, dashboard visibility, and account/provider availability are separate.
> For open-source browser-use, is_done only reports a terminal done action. is_successful is the agent-reported outcome; verify important external actions independently. Cloud timeout, API client timeout, model timeout, and task completion are separate concepts.
> For failed requests, use https://docs.browser-use.com/cloud/guides/troubleshooting.md. Inspect the full error and project before retrying or adding credits. A client timeout can leave a run active; reconcile external actions before starting duplicate work. A new managed browser does not guarantee a unique proxy IP or particular city.

# 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'
        '402':
          description: >-
            Insufficient credits, or the API key reached its monthly spend
            limit.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIKeySpendLimitError'
        '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
        metadata:
          anyOf:
            - additionalProperties:
                type: string
              type: object
            - type: 'null'
          title: Metadata
          description: >-
            Labels for this browser. Up to 10 key-value pairs. Filterable on the
            browsers list and in the dashboard history.
        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
        pdfRendererEnabled:
          type: boolean
          title: PDF Renderer Enabled
          description: >-
            Whether Chrome renders PDFs in a tab. Set to false to stop the
            in-tab render; the file is saved to the session's download directory
            either way.
          default: true
        solveCaptchas:
          type: boolean
          title: Solve Captchas
          description: >-
            Whether the browser detects and solves CAPTCHAs on its own. Set to
            false to handle CAPTCHAs yourself. Defaults to true.
          default: true
        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.
        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. Only populated on
            `GET /api/v2/browsers/{id}`; always `null` in list responses.
        metadata:
          additionalProperties:
            type: string
          type: object
          title: Metadata
          description: Caller-supplied labels set when the browser was created.
          default: {}
      type: object
      required:
        - id
        - status
        - timeoutAt
        - startedAt
      title: BrowserSessionItemView
      description: View model for representing a browser session in list views.
    APIKeySpendLimitError:
      properties:
        detail:
          anyOf:
            - type: string
            - $ref: '#/components/schemas/APIKeySpendLimitDetail'
          title: Detail
      type: object
      required:
        - detail
      title: APIKeySpendLimitError
      description: FastAPI wraps endpoint errors in a top-level ``detail`` field.
    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
        - ci
        - 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)
    APIKeySpendLimitDetail:
      properties:
        code:
          type: string
          title: Code
          default: api_key_monthly_spend_limit_reached
        message:
          type: string
          title: Message
        cap:
          type: number
          title: Cap
        spent:
          type: number
          title: Spent
      type: object
      required:
        - message
        - cap
        - spent
      title: APIKeySpendLimitDetail
      description: Machine-readable 402 detail shared by run and browser creation.
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: X-Browser-Use-API-Key

````