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

# Create a new browser



## OpenAPI

````yaml /openapi/webcompute.json post /v1/browsers
openapi: 3.0.0
info:
  title: Webcompute API
  description: >-
    Public Webcompute REST API for managed browsers, browser-control execution,
    resources, quick actions, and health checks.
  version: 0.1.0
servers:
  - url: https://api.webcompute.dev
    description: Webcompute production API
security:
  - bearer: []
tags:
  - name: Health
    description: Public liveness and readiness checks.
  - name: Browsers
    description: >-
      Managed browser lifecycle, browser control, status, blockers, and
      resources.
  - name: Quick Actions
    description: Ephemeral browser actions for scrape, screenshot, and PDF generation.
paths:
  /v1/browsers:
    post:
      tags:
        - Browsers
      summary: Create a new browser
      operationId: BrowserController_create
      parameters:
        - name: idempotency-key
          required: true
          in: header
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateBrowserDto'
      responses:
        '201':
          description: Browser created successfully
        '429':
          description: Concurrent browser limit reached
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseDto'
      security:
        - bearer: []
components:
  schemas:
    CreateBrowserDto:
      type: object
      properties:
        proxy:
          type: string
          description: Proxy URL (protocol://user:pass@host:port)
        recording:
          type: boolean
          default: false
          description: Enable browser recording
        maxDuration:
          type: number
          default: 86400000
          description: 'Maximum browser duration in milliseconds (default: 24 hours)'
        policy:
          type: object
          additionalProperties: true
          description: Browser navigation policy stored with this browser
    ErrorResponseDto:
      type: object
      properties:
        error:
          $ref: '#/components/schemas/ErrorBodyDto'
      required:
        - error
    ErrorBodyDto:
      type: object
      properties:
        code:
          type: string
          description: Machine-readable error code.
          example: SELECTOR_NOT_FOUND
        message:
          type: string
          description: Human-readable error description.
        details:
          type: object
          description: Structured context for debugging. `null` when not provided.
          additionalProperties: true
          nullable: true
        category:
          type: string
          description: >-
            Semantic category for the error. Consumers should prefer this over
            pattern-matching `code`.
          enum:
            - cors
            - navigation-timeout
            - readiness-timeout
            - selector-missing
            - target-detached
            - dialog-blocking
            - network
            - auth
            - quota
            - rate-limited
            - browser-crashed
            - invalid-request
            - unknown
        nextStep:
          type: string
          description: >-
            Recommended recovery hint paired with `category`. Use this instead
            of pattern-matching the `code`.
          enum:
            - wait
            - state
            - switch_tab
            - retry
            - fail
            - navigate-to-origin
            - refresh-state
            - dismiss-dialog
            - scrape-may-still-succeed
            - abort
      required:
        - code
        - message
        - details
  securitySchemes:
    bearer:
      scheme: bearer
      bearerFormat: API key
      type: http

````