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

# Screenshot a URL (ephemeral browser)



## OpenAPI

````yaml /openapi/webcompute.json post /v1/screenshot
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/screenshot:
    post:
      tags:
        - Quick Actions
      summary: Screenshot a URL (ephemeral browser)
      operationId: QuickActionController_screenshot
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ScreenshotDto'
      responses:
        '200':
          description: Screenshot result (base64 in JSON)
        '504':
          description: Quick action timed out
      security:
        - bearer: []
components:
  schemas:
    ScreenshotDto:
      type: object
      properties:
        url:
          type: string
          description: Target URL to navigate to
        proxy:
          type: string
          description: Proxy URL (protocol://user:pass@host:port)
        waitFor:
          type: string
          description: CSS selector to wait for before action
        timeout:
          type: number
          default: 30000
          description: Action timeout in milliseconds (1-60000)
        policy:
          type: object
          additionalProperties: true
          description: Browser navigation policy for this action
        fullPage:
          type: boolean
          default: false
          description: Capture the full scrollable page
        format:
          type: string
          enum:
            - png
            - jpeg
            - webp
          default: png
          description: Image format
        quality:
          type: number
          default: 80
          description: Image quality (1-100). Only applies to jpeg/webp.
        selector:
          type: string
          description: CSS selector of a specific element to capture
        hideSelectors:
          description: CSS selectors hidden with visibility:hidden only during capture
          type: array
          items:
            type: string
        maskSelectors:
          description: CSS selectors covered by screenshot masks during capture
          type: array
          items:
            type: string
        maskColor:
          type: string
          description: Mask color for maskSelectors
          minLength: 1
          maxLength: 100
        style:
          type: string
          description: Advanced temporary screenshot-only CSS
      required:
        - url
  securitySchemes:
    bearer:
      scheme: bearer
      bearerFormat: API key
      type: http

````