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

# Generate PDF from a URL (ephemeral browser)



## OpenAPI

````yaml /openapi/webcompute.json post /v1/pdf
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/pdf:
    post:
      tags:
        - Quick Actions
      summary: Generate PDF from a URL (ephemeral browser)
      operationId: QuickActionController_pdf
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PdfDto'
      responses:
        '200':
          description: PDF result (base64 in JSON)
        '504':
          description: Quick action timed out
      security:
        - bearer: []
components:
  schemas:
    PdfDto:
      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
        format:
          type: string
          enum:
            - A4
            - Letter
            - A3
            - Tabloid
            - Ledger
            - Legal
          default: A4
          description: Paper size
        landscape:
          type: boolean
          default: false
          description: Landscape orientation
        printBackground:
          type: boolean
          default: true
          description: Print background graphics
      required:
        - url
  securitySchemes:
    bearer:
      scheme: bearer
      bearerFormat: API key
      type: http

````