take_screenshot
Capture screenshots of web pages or HTML content, returning base64-encoded PNG or JPEG images. Supports custom viewport size, full page capture, and cookie injection.
Instructions
Capture a screenshot of a web page or HTML content. Returns a base64-encoded PNG or JPEG image.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | URL of the page to screenshot. Exactly one of url or html is required. | |
| html | No | Raw HTML to render. Exactly one of url or html is required. | |
| format | No | Image format. | png |
| quality | No | JPEG quality (1–100). Ignored for PNG. | |
| viewport_width | No | Viewport width in pixels. | |
| viewport_height | No | Viewport height in pixels. | |
| full_page | No | Capture the full scrollable page. | |
| wait_for | No | When to consider the page loaded: load | dom_content_loaded | network_idle | commit | CSS selector. | dom_content_loaded |
| delay_ms | No | Extra delay in milliseconds after page load before capturing. | |
| ai_cleanup | No | Remove cookie banners/popups before capture. 'fast' uses JS heuristics (1 credit). 'thorough' adds an LLM pass (3 credits; requires Anthropic key on the server). | |
| headers | No | Custom HTTP headers to send with the render request. Use for Bearer tokens, X-Tenant-Id, etc. Host / Cookie / Content-Length / Sec-* / Connection are rejected server-side. Max 30 headers, values ≤ 2 KB. | |
| cookies | No | Session cookies to inject before page navigation. Each cookie needs either 'domain' or 'url'. Max 50 per request. | |
| basic_auth | No | HTTP Basic auth credentials. Forwarded to the headless browser on a 401 challenge. | |
| output_path | No | Absolute or relative path to save the image file (e.g. /tmp/shot.png). If omitted, the image is returned as base64 in the response. |