Rendering
Capture screenshots, PDFs and videos from the terminal with the Urlbox CLI, covering formats, presets, viewport, full-page, and the common render flags.
render is the workhorse. There's a friendly alias for each common job, and the general render command underneath them all.
Your first render
urlbox screenshot https://urlbox.com --output hello.pngscreenshot (alias: shot) is short for render --format png. The positional URL is all that's required; --output saves the result to disk. See Output & scripting for where files are allowed to land.
Want to see what would be sent without spending a credit?
urlbox screenshot https://urlbox.com --dry-run # prints the validated payload, no API call
urlbox screenshot https://urlbox.com --curl # prints an equivalent curl commandChoosing a format
urlbox screenshot https://stripe.com --output shot.png # render --format png
urlbox pdf https://stripe.com/pricing --output p.pdf # render --format pdf --full-page
urlbox video https://theverge.com --output clip.mp4 # render --format mp4
urlbox render https://nike.com --format webp --width 1280 --output nike.webppdfdefaults to--full-pagebecause a PDF usually means "the whole document". Pass--full-page=falsefor a viewport-sized slice.videorenders MP4 and is typically slower than a screenshot, so consider async + webhook for production workflows.rendertakes any--formatthe API supports (png,jpeg,webp,pdf,mp4, …).
Urlbox uses a single
/v1/screenshotendpoint for every format, sourlbox pdf --curlandurlbox video --curlwill show/v1/screenshotin the URL. That's correct, not a bug; the output format is set in the request body.
Presets
Presets layer in sensible defaults so you don't have to remember a stack of flags:
urlbox render https://example.com --preset mobile # mobile viewport
urlbox render https://example.com --preset desktop # desktop viewport
urlbox render https://example.com --preset pdf-a4 # PDF + A4
urlbox render https://example.com --preset article # block ads, retina, wait for requestsAnything you set with an explicit flag or --json overrides the preset.
Common flags
| Flag | What it does |
|---|---|
--full-page | Capture the whole scrollable page, not just the viewport |
-w, --width / --height | Viewport size in pixels |
-f, --format | Output format (png, jpeg, webp, pdf, mp4, …) |
--retina | 2× device pixel ratio |
-s, --selector | Capture a single element by CSS selector |
--block-ads | Block ads via uBlock filterlists |
--dark-mode | Force prefers-color-scheme: dark |
--delay | Wait N ms after load before capturing |
--wait-until | Page-ready signal: domloaded, loaded, requestsfinished, mostrequestsfinished |
--user-agent | Override the browser User-Agent |
-q, --quality | Output quality 1–100 (format-dependent) |
--open | Open the rendered URL in your browser after success |
--timeout | Per-attempt timeout (e.g. 60s, 3m); fails fast, doesn't retry |
--max-retries / --no-retry | Tune automatic retries on 429 / 5xx (default 3) |
For any option that isn't a dedicated flag, including ones the dashboard just shipped, use --json passthrough.