Screenshot API for Developers
Self-hosted. Free. MIT-licensed. Convert HTML to images on your own infrastructure — no API key, no rate limits, no SaaS dependency.
What is a screenshot API?
A screenshot API is an HTTP service that accepts a URL, HTML snippet, or HTML file and returns a rendered image or PDF. It runs headless Chromium server-side — the same engine that powers Chrome — so the output reflects exactly how a real browser would render the page: JavaScript execution, custom fonts, CSS Grid, CSS custom properties, animations, and all.
Developers use screenshot APIs to automate image generation tasks that would otherwise require a browser — generating social preview cards, archiving pages, visual regression testing, monitoring website changes, building OG images from HTML templates, and creating PDFs from HTML documents.
What Openkova does differently
Most screenshot APIs are SaaS products you pay for per screenshot. Openkova is different: it is an MIT-licensed, self-hostable REST API that runs on your own server with no usage caps and no vendor dependency.
| Feature | Openkova (self-hosted) | Typical SaaS API |
|---|---|---|
| Cost | Free (server only) | $17–$3,200+/mo |
| Rate limits | None | Plan-based caps |
| HTML snippet input | ✓ | Rarely |
| File upload input | ✓ | Rarely |
| URL capture | ✓ | ✓ |
| Internal / VPN URLs | ✓ | ✗ |
| PDF output | ✓ | Sometimes |
| SSE streaming | ✓ | Rarely |
| Data stays on your server | ✓ | ✗ |
| License | MIT — fork freely | Proprietary |
Three input modes
1. HTML snippet
POST raw HTML and get a screenshot back. No server required on the other end — ideal for screenshotting generated HTML, email templates, OG image designs, or dynamic content assembled in code.
curl -X POST https://your-openkova-instance/api/screenshot \
-H "Content-Type: application/json" \
-d '{
"html": "<h1 style=\"font-family:sans-serif;padding:40px\">Hello world</h1>",
"format": "png",
"width": 1200,
"height": 630
}' \
--output preview.png2. URL capture
Pass any URL — including internal network URLs, localhost, and VPN-protected services — and Openkova renders it with headless Chromium and returns the screenshot.
curl -X POST https://your-openkova-instance/api/screenshot \
-H "Content-Type: application/json" \
-d '{"url": "https://example.com", "format": "png", "fullPage": true}' \
--output screenshot.png3. HTML file upload
Upload a .html file directly — useful for archiving documents, screenshotting static HTML reports, or processing files from a CI pipeline.
curl -X POST https://your-openkova-instance/api/screenshot \
-F "file=@report.html" \
-F "format=pdf" \
--output report.pdfCommon use cases
OG image generation
Generate Open Graph preview images from HTML templates at build time or on-demand. Pass an HTML template with dynamic content (title, author, date) as a snippet, get a 1200×630 PNG back. No design tools, no Puppeteer boilerplate. See the OG image generation guide.
Visual regression testing
Screenshot your pages on every deploy and diff against a baseline using pixelmatch or odiff. Catches regressions in layout, typography, and colour without a SaaS visual testing subscription. See the visual regression testing guide.
CI/CD screenshot automation
Screenshot deploy previews, HTML templates, and generated reports from GitHub Actions or GitLab CI using @openkova/cli. No browser needed in your CI environment beyond Chromium. See the CI/CD screenshot guide.
AI agent vision inputs
AI agents that observe web state need a screenshot source they can call programmatically. Openkova's REST API and @openkova/mcp MCP server integrate directly with Claude Desktop, Cursor, and Windsurf. See the screenshot API for AI agents guide.
PDF generation from HTML
Generate invoices, reports, and documents from HTML templates. Pass format: "pdf" and Openkova returns a Chromium-rendered PDF — accurate CSS support, no wkhtmltopdf limitations.
Deploy in minutes
Openkova ships as a Docker image with bundled Chromium. One docker compose up and your screenshot API is running.
# docker-compose.yml
services:
openkova:
image: ghcr.io/scnix-git/openkova:latest
ports:
- "3000:3000"
volumes:
- ./data:/app/datadocker compose up -dFor Railway, Fly.io, Render, and other platforms, see the full documentation. The Docker deployment guide covers production configuration, environment variables, and storage.
CLI and MCP integrations
Openkova ships with two companion packages for non-server use cases:
@openkova/cli— screenshot URLs and HTML files from the terminal.kova screenshot https://example.com. No running server required — uses your local Chrome binary. Ideal for CI/CD pipelines and scripting.@openkova/mcp— an MCP server that gives Claude Desktop, Cursor, and Windsurf a screenshot tool. Ask your AI assistant to screenshot a page and it returns the PNG inline. No API key, runs on your machine.
Pricing
| Tier | Price | Best for |
|---|---|---|
| Self-hosted (MIT) | Free | Developers and teams who manage their own infrastructure |
| Cloud Pro | Coming soon | Teams who want zero infrastructure management |
The self-hosted tier is completely free with no usage limits. See the SaaS vs self-hosted cost breakdown to understand total cost of ownership compared to ScreenshotOne, Urlbox, and Browserless.
Frequently asked questions
What is a screenshot API?
A screenshot API is an HTTP service that accepts a URL, HTML snippet, or HTML file and returns a rendered image (PNG, JPEG, WebP) or PDF. It runs headless Chromium server-side so the output matches what a real browser renders — including JavaScript, custom fonts, and modern CSS.
What is the best free screenshot API?
Openkova is the best free screenshot API for developers who can self-host. It is MIT-licensed, Docker-deployable, and has no usage limits at any volume. For a managed zero-setup option, Microlink offers 1,500 free requests/month.
Can a screenshot API take screenshots of HTML without a URL?
Yes. Openkova accepts raw HTML snippets and uploaded .html files directly — no publicly accessible URL needed. This is useful for HTML email templates, dynamically generated OG images, and internal documents.
How do I screenshot a page behind a login?
Self-hosted Openkova runs Chromium on your own server inside your network — it can reach internal URLs, localhost, VPN-protected services, and staging environments. SaaS screenshot APIs run on external servers and cannot access private URLs.
Does Openkova support PDF generation from HTML?
Yes. Pass format: "pdf" and Openkova returns a Chromium-rendered PDF. Works with HTML snippets, uploaded files, and URLs — accurate CSS support, no wkhtmltopdf limitations.
How much does Openkova cost?
The self-hosted version is free — MIT-licensed with no per-screenshot charges, no API key, and no usage caps. A managed Cloud Pro tier is coming soon for teams that prefer not to manage infrastructure. See the pricing comparison.