DocumentationHow Captures Work

How Captures Work

A mental model of the rendering pipeline.

Lifecycle overview

Every capture follows the same pipeline:

  1. Validate and normalize the request.
  2. Apply SSRF protection and access checks.
  3. Acquire a browser context from the pool.
  4. Render the page using your settings.
  5. Store, cache, or return the output.

Sync vs async

  • Sync: POST /v1/capture returns immediately when the render finishes.
  • Async: POST /v1/jobs queues the render and returns a job id.

Response types

  • json: metadata + storage URL.
  • binary: raw bytes with Content-Type.
  • empty: status only (use with storage).

Determinism

Consistency comes from controlling:

  • Viewport and device settings.
  • Wait conditions and timeouts.
  • Resource blocking and reduced motion.
  • Custom CSS or scripts.

Storage and caching

Storage and cache are separate layers:

  • Storage is your durable destination.
  • Cache accelerates repeated renders and saves usage.
Tip

Start with defaults, then tune only the options that improve consistency for your use case.

Updated 1 day ago
Did this page help you?