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

> Returns JPEG or PNG bytes unless storage, regions, asynchronous delivery, or Visual Style Guide requires a JSON result.

Every option that fits in a URL is available here. These are **POST-body only** and are refused with `400` in a query string, because URLs are recorded in logs, browser history and caches: `headers`, `cookies`, `webhookSecret`, and customer-storage credentials (`storage_access_key_id`, `storage_secret_access_key`, `storage_application_key_id`, `storage_application_key`). Customer-storage destinations (`storage_provider`, `storage_bucket`, `storage_endpoint`, `storage_region`, `storage_public_domain`) need those credentials, so use POST for them too.



## OpenAPI

````yaml /api-reference/openapi.json get /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:
    get:
      tags:
        - Screenshots
      summary: Capture a screenshot
      description: >-
        Returns JPEG or PNG bytes unless storage, regions, asynchronous
        delivery, or Visual Style Guide requires a JSON result.


        Every option that fits in a URL is available here. These are **POST-body
        only** and are refused with `400` in a query string, because URLs are
        recorded in logs, browser history and caches: `headers`, `cookies`,
        `webhookSecret`, and customer-storage credentials
        (`storage_access_key_id`, `storage_secret_access_key`,
        `storage_application_key_id`, `storage_application_key`).
        Customer-storage destinations (`storage_provider`, `storage_bucket`,
        `storage_endpoint`, `storage_region`, `storage_public_domain`) need
        those credentials, so use POST for them too.
      operationId: getScreenshot
      parameters:
        - $ref: '#/components/parameters/TargetUrl'
        - $ref: '#/components/parameters/Format'
        - $ref: '#/components/parameters/Quality'
        - $ref: '#/components/parameters/Width'
        - $ref: '#/components/parameters/Height'
        - $ref: '#/components/parameters/Device'
        - $ref: '#/components/parameters/FullPage'
        - $ref: '#/components/parameters/Theme'
        - $ref: '#/components/parameters/Timeout'
        - $ref: '#/components/parameters/WaitUntil'
        - $ref: '#/components/parameters/BlockCookieBanners'
        - $ref: '#/components/parameters/BlockAds'
        - $ref: '#/components/parameters/BlockChatWidgets'
        - $ref: '#/components/parameters/BlockPopups'
        - $ref: '#/components/parameters/BlockAccessibilityWidgets'
        - $ref: '#/components/parameters/HideSelectors'
        - $ref: '#/components/parameters/ClickSelectors'
        - $ref: '#/components/parameters/ScrollToElement'
        - $ref: '#/components/parameters/Store'
        - $ref: '#/components/parameters/StoragePath'
        - $ref: '#/components/parameters/Regions'
        - $ref: '#/components/parameters/StyleGuide'
        - $ref: '#/components/parameters/Regenerate'
        - $ref: '#/components/parameters/Cache'
        - $ref: '#/components/parameters/Async'
        - $ref: '#/components/parameters/ProviderApiKey'
        - $ref: '#/components/parameters/Design'
        - $ref: '#/components/parameters/WebhookUrl'
        - $ref: '#/components/parameters/Priority'
        - $ref: '#/components/parameters/StorageReturnLocation'
      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:
    TargetUrl:
      name: url
      in: query
      required: true
      schema:
        type: string
        format: uri
        pattern: ^https?://
    Format:
      name: format
      in: query
      schema:
        type: string
        enum:
          - jpg
          - png
        default: jpg
    Quality:
      name: quality
      in: query
      schema:
        type: integer
        minimum: 1
        maximum: 100
        default: 80
    Width:
      name: width
      in: query
      schema:
        type: integer
        minimum: 320
        maximum: 3840
        default: 1280
    Height:
      name: height
      in: query
      schema:
        type: integer
        minimum: 240
        maximum: 2160
        default: 720
    Device:
      name: device
      in: query
      schema:
        type: string
      description: Server-supported device preset; overrides width and height.
    FullPage:
      name: fullPage
      in: query
      schema:
        type: boolean
        default: false
    Theme:
      name: theme
      in: query
      schema:
        type: string
        enum:
          - light
          - dark
        default: light
    Timeout:
      name: timeout
      in: query
      schema:
        type: integer
        minimum: 10
        maximum: 60
        default: 30
    WaitUntil:
      name: waitUntil
      in: query
      schema:
        type: string
        enum:
          - load
          - domcontentloaded
          - networkidle0
          - networkidle2
        default: load
      description: >-
        Navigation readiness strategy. Network-idle modes are opt-in for pages
        that eventually become quiet.
    BlockCookieBanners:
      name: blockCookieBanners
      in: query
      schema:
        type: boolean
        default: true
      description: Hide common cookie-consent banners before capture.
    BlockAds:
      name: blockAds
      in: query
      schema:
        type: boolean
        default: true
      description: Block common ad networks and hide ad slots.
    BlockChatWidgets:
      name: blockChatWidgets
      in: query
      schema:
        type: boolean
        default: false
      description: Hide third-party chat and support widgets.
    BlockPopups:
      name: blockPopups
      in: query
      schema:
        type: boolean
        default: false
      description: Hide newsletter and promotional popups.
    BlockAccessibilityWidgets:
      name: blockAccessibilityWidgets
      in: query
      schema:
        type: boolean
        default: false
      description: Hide floating accessibility-overlay launchers.
    HideSelectors:
      name: hideSelectors
      in: query
      schema:
        type: string
      description: >-
        Comma-separated CSS selectors to hide before capture, e.g.
        `.promo,#chat`. Commas inside `()`, `[]` or quotes do not split. The
        POST body takes an array.
    ClickSelectors:
      name: clickSelectors
      in: query
      schema:
        type: string
      description: >-
        Comma-separated CSS selectors to click, in order, before capture. Same
        splitting rules as `hideSelectors`.
    ScrollToElement:
      name: scrollToElement
      in: query
      schema:
        type: string
      description: CSS selector to scroll into view before capture.
    Store:
      name: store
      in: query
      schema:
        type: boolean
        default: false
    StoragePath:
      name: storage_path
      in: query
      schema:
        type: string
    Regions:
      name: regions
      in: query
      schema:
        type: boolean
        default: false
      description: Adds ordered full-page crops and two credits; implies full-page storage.
    StyleGuide:
      name: styleGuide
      in: query
      schema:
        type: boolean
        default: false
      description: >-
        Adds a GPT-5.6 Luna Visual Style Guide; implies regions and stored
        full-page capture.
    Regenerate:
      name: regenerate
      in: query
      schema:
        type: boolean
        default: false
      description: Bypasses only the seven-day Style Guide cache. Requires styleGuide=true.
    Cache:
      name: cache
      in: query
      schema:
        type: boolean
        default: false
    Async:
      name: async
      in: query
      schema:
        type: boolean
        default: false
    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.
    Design:
      name: design
      in: query
      schema:
        type: boolean
        default: false
      description: >-
        Add raw observed design evidence (colors, fonts, spacing) to the JSON
        result. One credit.
    WebhookUrl:
      name: webhookUrl
      in: query
      schema:
        type: string
        format: uri
      description: >-
        Deliver the result to this URL; implies `async=true`. Send
        `webhookSecret` in a POST body to sign deliveries.
    Priority:
      name: priority
      in: query
      schema:
        type: string
        enum:
          - low
          - normal
          - high
        default: normal
      description: Queue priority for asynchronous jobs.
    StorageReturnLocation:
      name: storage_return_location
      in: query
      schema:
        type: boolean
        default: false
      description: Include the provider location of the stored object in `media`.
  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
  schemas:
    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
  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.