HTML, PDF, and video
Render raw HTML, export pixel-perfect PDFs, or record scrolling MP4s — same async pipeline.
- HTML rendering
- PDF output
- MP4 capture
- Paper size controls
HTML, PDF, and video
Render HTML strings, convert pages to PDFs, or record scroll videos.
- 30fps
- video max framerate
- A4 / Letter
- default PDF sizes
What developers actually call
Every capture goes through the same async job model. Submit → poll → result. The SDK wraps the polling loop for you.
1const result = await client.screenshots.webAndWait({
2 url: "https://example.com/report",
3 video: { duration: 10, fps: 30 }
4});From request to result
Submit content
POST an HTML string, a URL for PDF export, or a URL with video config. Each routes to the same async job model.
Render
Playwright loads the content — injecting custom CSS and fonts for HTML, using Chromium's print engine for PDFs, or recording the viewport for video.
Store and deliver
The output file (PNG, PDF, or MP4) is stored in your configured S3 bucket or local storage and returned as a signed URL.
Request parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
html | string | Optional | Raw HTML string to render. Requires STARTER plan or above. |
url | string | Optional | URL to load for PDF export or video recording. |
format | "pdf"|"mp4" | Optional | Output format. When omitted, defaults to png. |
pdf | { pageSize } | Optional | PDF options: pageSize (A4, Letter), margin, printBackground. |
video | { duration, fps } | Optional | Video options: duration in seconds, fps (max 30). Requires GROWTH. |
css | string | Optional | Extra CSS to inject before capture. Useful for hiding cookie banners. |
webhookUrl | string | Optional | Endpoint to receive the job.completed event with the file URL. |
Full parameter reference and response schemas available in the API reference docs.
Who uses this and why
Invoice and certificate generation
Render a Handlebars / Jinja template to HTML, pass it to the API, get back a pixel-perfect PDF in seconds.
Dynamic OG images
Pass a React-rendered HTML string with brand fonts and dynamic data. Get back a 1200 × 630 PNG ready for og:image.
Scrolling demo videos
Record a 10-second MP4 scroll of any landing page for product walkthroughs, app store previews, or sales decks.
Ready to use html, pdf, and video?
Start on the Free tier with 100 captures per month. No credit card required.