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

# Capture a screenshot



## OpenAPI

````yaml /api-reference/openapi.json post /render/screenshot
openapi: 3.1.0
info:
  title: Scrinly Browser API
  version: 1.0.0
  description: >-
    Public screenshot, region, Visual Style Guide, visual diff, monitoring,
    batch, job-status, and usage API.
servers:
  - url: https://api.scrinly.com
    description: Production
security:
  - BearerAuth: []
tags:
  - name: Screenshots
  - name: Batches
  - name: Diffs
  - name: Jobs
  - name: Usage
  - name: Monitors
  - name: Recipients
paths:
  /render/screenshot:
    post:
      tags:
        - Screenshots
      summary: Capture a screenshot
      operationId: createScreenshot
      parameters:
        - $ref: '#/components/parameters/ProviderApiKey'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ScreenshotRequest'
            examples:
              stored:
                value:
                  url: https://example.com
                  fullPage: true
                  store: true
                  storage_path: screenshots
              styleGuide:
                value:
                  url: https://example.com
                  styleGuide: true
                  cache: true
      responses:
        '200':
          $ref: '#/components/responses/ScreenshotSuccess'
        '202':
          $ref: '#/components/responses/AsyncAccepted'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '402':
          $ref: '#/components/responses/PaymentRequired'
        '422':
          $ref: '#/components/responses/CaptureFailed'
        '429':
          $ref: '#/components/responses/RateLimited'
        '503':
          $ref: '#/components/responses/Unavailable'
        '504':
          $ref: '#/components/responses/NavigationTimeout'
components:
  parameters:
    ProviderApiKey:
      name: X-Scrinly-Provider-API-Key
      in: header
      required: false
      schema:
        type: string
        writeOnly: true
        maxLength: 1024
      description: >-
        Ephemeral OpenAI BYOK for Visual Style Guide. Server-to-server and
        synchronous only.
  schemas:
    ScreenshotRequest:
      type: object
      required:
        - url
      additionalProperties: false
      properties:
        url:
          type: string
          format: uri
          pattern: ^https?://
        format:
          type: string
          enum:
            - jpg
            - png
          default: jpg
        quality:
          type: integer
          minimum: 1
          maximum: 100
          default: 80
        width:
          type: integer
          minimum: 320
          maximum: 3840
          default: 1280
        height:
          type: integer
          minimum: 240
          maximum: 2160
          default: 720
        device:
          type: string
          description: Server-supported preset; overrides width and height.
        fullPage:
          type: boolean
          default: false
        theme:
          type: string
          enum:
            - light
            - dark
          default: light
        timeout:
          type: integer
          minimum: 10
          maximum: 60
          default: 30
        waitUntil:
          type: string
          enum:
            - load
            - domcontentloaded
            - networkidle0
            - networkidle2
          default: load
        blockCookieBanners:
          type: boolean
        blockAds:
          type: boolean
        blockChatWidgets:
          type: boolean
        blockPopups:
          type: boolean
        blockAccessibilityWidgets:
          type: boolean
        hideSelectors:
          type: array
          items:
            type: string
        clickSelectors:
          type: array
          items:
            type: string
        scrollToElement:
          type: string
        headers:
          type: object
          additionalProperties:
            type: string
          writeOnly: true
        cookies:
          type: array
          items:
            $ref: '#/components/schemas/Cookie'
          writeOnly: true
        store:
          type: boolean
          default: false
        storage_path:
          type: string
        storage_provider:
          type: string
          enum:
            - b2
            - s3
            - r2
        storage_bucket:
          type: string
        storage_endpoint:
          type: string
          format: uri
          writeOnly: true
        storage_region:
          type: string
        storage_access_key_id:
          type: string
          writeOnly: true
        storage_secret_access_key:
          type: string
          writeOnly: true
        storage_application_key_id:
          type: string
          writeOnly: true
        storage_application_key:
          type: string
          writeOnly: true
        storage_public_domain:
          type: string
          format: uri
        storage_return_location:
          type: boolean
          default: false
        regions:
          type: boolean
          default: false
        design:
          type: boolean
          default: false
          description: Advanced raw observed design evidence.
        styleGuide:
          oneOf:
            - type: boolean
            - type: object
              properties:
                regenerate:
                  type: boolean
                  default: false
              additionalProperties: false
          default: false
        regenerate:
          type: boolean
          default: false
          description: Requires Style Guide; bypasses only its AI cache.
        cache:
          type: boolean
          default: false
        async:
          type: boolean
          default: false
        webhookUrl:
          type: string
          format: uri
        webhookSecret:
          type: string
          writeOnly: true
        priority:
          type: string
          enum:
            - low
            - normal
            - high
          default: normal
    Cookie:
      type: object
      required:
        - name
        - value
      properties:
        name:
          type: string
        value:
          type: string
          writeOnly: true
        domain:
          type: string
        path:
          type: string
        httpOnly:
          type: boolean
        secure:
          type: boolean
        sameSite:
          type: string
          enum:
            - Strict
            - Lax
            - None
      additionalProperties: false
    ScreenshotResponse:
      type: object
      required:
        - success
        - type
        - media
      properties:
        success:
          type: boolean
          const: true
        type:
          type: string
          const: screenshot
        screenshotId:
          type: string
          pattern: ^scr_[a-f0-9-]{36}$
          description: >-
            Opaque account-owned reference for newly completed stored captures.
            Historical results may omit it; no public lookup route is provided.
        referenceExpiresAt:
          type: string
          format: date-time
          description: >-
            Original reference expiry. Cache hits do not renew it; expiry does
            not delete the delivered image.
        url:
          type: string
          format: uri
        media:
          $ref: '#/components/schemas/Media'
        design:
          type: object
          additionalProperties: true
        regions:
          $ref: '#/components/schemas/Regions'
        styleGuide:
          $ref: '#/components/schemas/StyleGuide'
        credits:
          $ref: '#/components/schemas/Credits'
        renderTime:
          type: integer
        startedAt:
          type: string
          format: date-time
        completedAt:
          type: string
          format: date-time
    ScreenshotPartialResponse:
      allOf:
        - $ref: '#/components/schemas/ScreenshotResponse'
        - type: object
          required:
            - status
            - credits
          properties:
            status:
              type: string
              const: partial
            regions:
              oneOf:
                - $ref: '#/components/schemas/Regions'
                - type: 'null'
            regionError:
              $ref: '#/components/schemas/ComponentError'
            styleGuide:
              oneOf:
                - $ref: '#/components/schemas/StyleGuide'
                - type: 'null'
            styleGuideError:
              $ref: '#/components/schemas/ComponentError'
    AsyncAccepted:
      type: object
      required:
        - success
        - id
        - statusUrl
      properties:
        success:
          type: boolean
          const: true
        id:
          type: string
          format: uuid
        type:
          type: string
          enum:
            - screenshot
            - diff
            - transform
        statusUrl:
          type: string
        message:
          type: string
        credits:
          $ref: '#/components/schemas/Credits'
    Error:
      type: object
      required:
        - success
        - error
      properties:
        success:
          type: boolean
          const: false
        error:
          type: string
        type:
          type: string
        code:
          type: string
        retryable:
          type: boolean
        fields:
          type: array
          items:
            $ref: '#/components/schemas/ErrorField'
        credits:
          $ref: '#/components/schemas/Credits'
    Media:
      type: object
      required:
        - stored
        - url
        - contentType
      properties:
        stored:
          type: boolean
          const: true
        url:
          type: string
          format: uri
          description: Direct B2, S3, or R2 URL.
        key:
          type: string
        location:
          type: string
        contentType:
          type: string
          enum:
            - image/jpeg
            - image/png
        width:
          type: integer
        height:
          type: integer
        bytes:
          type: integer
        sha256:
          type: string
          pattern: ^[a-f0-9]{64}$
      additionalProperties: true
    Regions:
      type: object
      required:
        - version
        - coordinateSpace
        - screenshot
        - limits
        - items
        - coverage
      properties:
        version:
          type: string
          enum:
            - regions-v1
            - regions-v2
          description: >-
            New captures return regions-v2. Saved v1 manifests remain valid diff
            inputs, including mixed-version comparisons.
        coordinateSpace:
          type: string
          const: screenshot_pixels
        screenshot:
          type: object
          properties:
            width:
              type: integer
            height:
              type: integer
            sha256:
              type: string
          required:
            - width
            - height
            - sha256
        limits:
          type: object
          properties:
            maxRegionHeight:
              type: integer
              const: 1600
            maxAssets:
              type: integer
              const: 32
          required:
            - maxRegionHeight
            - maxAssets
        items:
          type: array
          maxItems: 32
          items:
            $ref: '#/components/schemas/Region'
        coverage:
          $ref: '#/components/schemas/Coverage'
    StyleGuide:
      type: object
      required:
        - version
        - summary
        - document
        - promptVersion
        - schemaVersion
        - projectionVersion
        - visionVersion
        - grounding
        - coverage
        - source
        - provider
        - usage
        - cache
      properties:
        version:
          type: string
          const: style-guide-v1
        summary:
          type: string
        document:
          type: string
          description: Fixed-heading Markdown.
        promptVersion:
          type: string
        schemaVersion:
          type: string
          const: style-guide-v1
        projectionVersion:
          type: string
        visionVersion:
          type: string
        sections:
          type: object
          additionalProperties:
            type: string
        grounding:
          type: object
          required:
            - status
            - unknownLiteralCount
          properties:
            status:
              type: string
              enum:
                - clean
                - flagged
            reason:
              type:
                - string
                - 'null'
            unknownLiteralCount:
              type: integer
              minimum: 0
            diagnostics:
              type: object
              additionalProperties: true
        coverage:
          $ref: '#/components/schemas/Coverage'
        source:
          type: object
          properties:
            screenshotSha256:
              type: string
            regionParts:
              type: array
              items:
                type: object
                properties:
                  id:
                    type: string
                  sha256:
                    type: string
                required:
                  - id
                  - sha256
          required:
            - screenshotSha256
            - regionParts
        provider:
          type: object
          properties:
            label:
              type: string
              const: openai
            model:
              type: string
              const: gpt-5.6-luna
            credentialMode:
              type: string
              enum:
                - platform
                - byok
            inputMode:
              type: string
              const: overview_and_region_crops
            dataResidency:
              type: string
            dataPolicy:
              type: object
              additionalProperties:
                type: string
            settings:
              type: object
              additionalProperties: true
            latencyMs:
              type: integer
            finishReason:
              type: string
          required:
            - label
            - model
            - credentialMode
            - inputMode
        usage:
          $ref: '#/components/schemas/TokenUsage'
        cache:
          type: object
          required:
            - hit
          properties:
            hit:
              type: boolean
    Credits:
      type: object
      required:
        - charged
        - refunded
        - net
      properties:
        charged:
          type: integer
          minimum: 0
        refunded:
          type: integer
          minimum: 0
        net:
          type: integer
          minimum: 0
    ComponentError:
      type: object
      required:
        - type
        - message
        - retryable
      properties:
        type:
          type: string
        message:
          type: string
        retryable:
          type: boolean
        reason:
          type: string
        unknownLiteralCount:
          type: integer
        missingRegionCount:
          type: integer
    ErrorField:
      type: object
      required:
        - field
        - message
      properties:
        field:
          type: string
        message:
          type: string
    Region:
      type: object
      required:
        - id
        - order
        - kind
        - label
        - confidence
        - evidenceKinds
        - bounds
        - parts
      properties:
        id:
          type: string
        order:
          type: integer
          minimum: 0
        kind:
          type: string
          enum:
            - navigation
            - hero
            - content
            - features
            - pricing
            - testimonials
            - faq
            - logos
            - cta
            - footer
        label:
          type: string
        confidence:
          type: string
          enum:
            - high
            - medium
            - low
        evidenceKinds:
          type: array
          items:
            type: string
        bounds:
          $ref: '#/components/schemas/Bounds'
        parts:
          type: array
          items:
            $ref: '#/components/schemas/RegionPart'
        spec:
          $ref: '#/components/schemas/RegionSpec'
    Coverage:
      type: object
      properties:
        ratio:
          type: number
          minimum: 0
          maximum: 1
        truncated:
          type: boolean
        omittedAssets:
          type: integer
          minimum: 0
        segmentationDegraded:
          type: boolean
          description: >-
            True when unresolved geometry fallback was needed. Included in new
            v2 captures; absent from historical v1 manifests.
        safeCuts:
          type: integer
          minimum: 0
        forcedCuts:
          type: integer
          minimum: 0
      additionalProperties: true
    TokenUsage:
      type: object
      properties:
        inputTokens:
          type: integer
        outputTokens:
          type: integer
        totalTokens:
          type: integer
        cacheHitTokens:
          type: integer
        cacheMissTokens:
          type: integer
        reasoningTokens:
          type: integer
        providerDetails:
          type: object
          additionalProperties:
            type: integer
    Bounds:
      type: object
      required:
        - x
        - 'y'
        - width
        - height
      properties:
        x:
          type: integer
          minimum: 0
        'y':
          type: integer
          minimum: 0
        width:
          type: integer
          minimum: 1
        height:
          type: integer
          minimum: 1
    RegionPart:
      type: object
      required:
        - id
        - index
        - bounds
        - media
      properties:
        id:
          type: string
        index:
          type: integer
          minimum: 0
        bounds:
          $ref: '#/components/schemas/Bounds'
        media:
          $ref: '#/components/schemas/Media'
    RegionSpec:
      type: object
      required:
        - summary
        - claims
        - confidence
        - evidencePartIds
      properties:
        summary:
          type: string
        claims:
          type: array
          items:
            $ref: '#/components/schemas/StyleClaim'
        confidence:
          type: string
          enum:
            - high
            - medium
            - low
        evidencePartIds:
          type: array
          items:
            type: string
    StyleClaim:
      type: object
      required:
        - category
        - basis
        - statement
      properties:
        category:
          type: string
          enum:
            - visual_role
            - layout
            - hierarchy
            - color
            - typography
            - spacing
            - components
            - states
            - motion
            - responsive
        basis:
          type: string
          enum:
            - observed
            - inferred
        statement:
          type: string
  responses:
    ScreenshotSuccess:
      description: >-
        Binary or JSON screenshot result. JSON may be partial when an add-on
        failed.
      headers:
        X-Scrinly-Storage-URL:
          $ref: '#/components/headers/StorageUrl'
        X-Scrinly-Credits-Used:
          $ref: '#/components/headers/CreditsUsed'
        X-Scrinly-Credits-Limit:
          $ref: '#/components/headers/CreditsLimit'
        X-Scrinly-LLM-Provider:
          $ref: '#/components/headers/LlmProvider'
      content:
        image/jpeg:
          schema:
            type: string
            contentEncoding: binary
        image/png:
          schema:
            type: string
            contentEncoding: binary
        application/json:
          schema:
            oneOf:
              - $ref: '#/components/schemas/ScreenshotResponse'
              - $ref: '#/components/schemas/ScreenshotPartialResponse'
    AsyncAccepted:
      description: Job accepted
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/AsyncAccepted'
    BadRequest:
      description: Validation failed
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unauthorized:
      description: Invalid or missing Scrinly key
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    PaymentRequired:
      description: Credit allowance exhausted
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    CaptureFailed:
      description: Complete finite screenshot could not be produced
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    RateLimited:
      description: Host or provider rate limit
      headers:
        Retry-After:
          schema:
            type: integer
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unavailable:
      description: Required platform configuration or provider unavailable
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    NavigationTimeout:
      description: >-
        Page navigation exceeded the requested timeout; the complete charge is
        refunded and the failure is retryable.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  headers:
    StorageUrl:
      description: Direct URL for the complete stored output.
      schema:
        type: string
        format: uri
    CreditsUsed:
      description: Credits used in the current allowance after settlement.
      schema:
        type: integer
    CreditsLimit:
      description: Account credit allowance.
      schema:
        type: integer
    LlmProvider:
      description: Selected Style Guide provider.
      schema:
        type: string
        const: openai
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: Scrinly API key

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.