zshot/cliDownload

Server

--server runs zshot as an HTTP server instead of rendering a single capture. It binds 127.0.0.1:3000 by default; set --server-bind-address and --server-bind-port to change that. To reach the server from another host or a container, bind 0.0.0.0.

zshot --server --server-bind-address 0.0.0.0 --server-bind-port 3000

Endpoints

A bare server exposes only the render and status endpoints; everything else is opt-in.

  • GET / renders from query parameters; POST / renders from a JSON body. See the API for additional assets and the Link header.
  • GET /status returns 200 with the current number of in-flight requests. Use it for readiness and health checks.
  • GET /assets serves additional artifacts referenced by the render response.
  • GET /metrics exposes Prometheus metrics when --server-enable-prometheus is set (Enterprise). Alongside the HTTP-layer zshot_http_requests_* series it reports zshot_requests_total{endpoint,format,outcome}, zshot_auth_failures_total{endpoint,format,reason}, and the zshot_request_duration_seconds{format,cache,status} histogram. Protect it with --server-prometheus-auth or move it to a private listener with --server-prometheus-bind-address and --server-prometheus-bind-port.
  • GET /openapi.json serves the OpenAPI document when --server-enable-schema is set.
  • /swagger-ui serves interactive API docs when --server-enable-docs is set.
  • /mcp serves the Model Context Protocol endpoint when --server-enable-mcp is set.

Concurrency

--server-max-concurrency caps simultaneous renders. --server-queue-requests holds requests over that cap instead of rejecting them.

To run the server in Docker, see Docker.

FlagDescription
--serverRun as an HTTP server PRO
--server-additional-asset-expirationLifetime in seconds for additional render assets (HAR/WARC/pprof/trace/
--server-basic-authBasic auth requirement for requests
--server-bind-addressBind address or path for server
--server-bind-portBind port for server
--server-cacheCache successful render results on disk and serve repeat GETs from the cache ENT
--server-cache-size-limitMaximum cache size in bytes; oldest entries are evicted when exceeded ENT
--server-cache-ttlHow long a cached render stays fresh, in seconds ENT
--server-enable-docsEnable /swagger-ui
--server-enable-mcpEnable /mcp (Model Context Protocol streamable-HTTP endpoint)
--server-enable-prometheusEnable /metrics (Prometheus)
--server-enable-schemaEnable /openapi.json
--server-max-concurrencyMax concurrent requests ENT
--server-prometheus-authBasic auth for the /metrics endpoint only
--server-prometheus-bind-addressServe /metrics from a separate listener
--server-prometheus-bind-portPort for the separate /metrics listener
--server-queue-requestsQueue requests when at max concurrency instead of returning 429 ENT
--server-signed-urlRequire signed URLs for GET requests ENT
--server-signed-url-max-ageMaximum age (in seconds) for signed URL expiration ENT
--server-token-authToken auth requirement for requests
--server-update-adblock-intervalRe-fetch --adblock-rules sources every N seconds in server and MCP modes ENT
--server-update-blocklist-intervalRe-fetch --ip-blocklist sources every N seconds in server and MCP modes ENT