# RasterKit
> One API that turns any URL or HTML into a screenshot, a pixel-perfect PDF, or a templated social (OG) image. Three products, one key, one subscription. Free tier: 100 renders/month.
Base URL: https://rasterkit.com
Auth: X-Api-Key header or Bearer token. Keys look like rk_live_…
## Endpoints
- POST /v1/screenshot — body: { url | html, viewport_width, viewport_height, full_page, format: png|jpeg|webp, device: desktop|mobile|tablet, dark_mode, block_ads, block_cookie_banners, delay_ms, wait_for_selector, wait_until, timeout_ms, cache_ttl, async, webhook_url } → binary image
- POST /v1/pdf — body: { url | html, format: A4|A3|A5|Letter|Legal|Tabloid, landscape, margin_*, header_template, footer_template, page_ranges, print_background, prefer_css_page_size, scale, …timing } → binary PDF
- POST /v1/image — body: { template_id | template_html, variables, width, height, format, quality, device_scale_factor, cache_ttl } → binary image (OG cards from HTML templates with {{variables}})
- GET variants of all three accept the same params as query strings with HMAC signatures (signed URLs for
embeds)
- GET /v1/usage — quota status
- GET /v1/jobs/:id and /v1/jobs/:id/result — async job polling
- POST/GET/PUT/DELETE /v1/templates — stored image templates
Errors: JSON { error: { code, message, docs } }. Codes: invalid_request, unauthorized, quota_exceeded, rate_limited, url_blocked, render_timeout, template_invalid, …
## MCP server (for AI agents)
npx -y @rasterkit/mcp with RASTERKIT_API_KEY env. Tools: rasterkit_screenshot, rasterkit_pdf, rasterkit_generate_image, rasterkit_usage.
## Docs
- [Quickstart](https://rasterkit.com/docs)
- [Screenshot API](https://rasterkit.com/docs/screenshot)
- [PDF API](https://rasterkit.com/docs/pdf)
- [OG Image API](https://rasterkit.com/docs/image)
- [Signed URLs](https://rasterkit.com/docs/signed-urls)
- [Errors](https://rasterkit.com/docs/errors)
- [Pricing](https://rasterkit.com/pricing)
## Guides
- [Take website screenshots in curl](https://rasterkit.com/guides/website-screenshot-api-curl)
- [Take website screenshots in Node.js](https://rasterkit.com/guides/website-screenshot-api-node)
- [Take website screenshots in Python](https://rasterkit.com/guides/website-screenshot-api-python)
- [Take website screenshots in PHP](https://rasterkit.com/guides/website-screenshot-api-php)
- [Take website screenshots in Ruby](https://rasterkit.com/guides/website-screenshot-api-ruby)
- [Take website screenshots in Go](https://rasterkit.com/guides/website-screenshot-api-go)
- [Take website screenshots in Java](https://rasterkit.com/guides/website-screenshot-api-java)
- [Take website screenshots in C#](https://rasterkit.com/guides/website-screenshot-api-csharp)
- [Convert HTML to PDF in curl](https://rasterkit.com/guides/html-to-pdf-curl)
- [Convert HTML to PDF in Node.js](https://rasterkit.com/guides/html-to-pdf-node)
- [Convert HTML to PDF in Python](https://rasterkit.com/guides/html-to-pdf-python)
- [Convert HTML to PDF in PHP](https://rasterkit.com/guides/html-to-pdf-php)
- [Convert HTML to PDF in Ruby](https://rasterkit.com/guides/html-to-pdf-ruby)
- [Convert HTML to PDF in Go](https://rasterkit.com/guides/html-to-pdf-go)
- [Convert HTML to PDF in Java](https://rasterkit.com/guides/html-to-pdf-java)
- [Convert HTML to PDF in C#](https://rasterkit.com/guides/html-to-pdf-csharp)
- [Generate dynamic OG images in curl](https://rasterkit.com/guides/og-image-generation-curl)
- [Generate dynamic OG images in Node.js](https://rasterkit.com/guides/og-image-generation-node)
- [Generate dynamic OG images in Python](https://rasterkit.com/guides/og-image-generation-python)
- [Generate dynamic OG images in PHP](https://rasterkit.com/guides/og-image-generation-php)
- [Generate dynamic OG images in Ruby](https://rasterkit.com/guides/og-image-generation-ruby)
- [Generate dynamic OG images in Go](https://rasterkit.com/guides/og-image-generation-go)
- [Generate dynamic OG images in Java](https://rasterkit.com/guides/og-image-generation-java)
- [Generate dynamic OG images in C#](https://rasterkit.com/guides/og-image-generation-csharp)
## Comparisons
- [A modern wkhtmltopdf alternative](https://rasterkit.com/compare/wkhtmltopdf-alternative)
- [Puppeteer vs Playwright for screenshots (and when to use neither)](https://rasterkit.com/compare/puppeteer-vs-playwright-screenshots)
- [RasterKit as a ScreenshotOne alternative](https://rasterkit.com/compare/screenshotone-alternative)
- [RasterKit as an Urlbox alternative](https://rasterkit.com/compare/urlbox-alternative)
- [RasterKit as an HTML/CSS-to-Image alternative](https://rasterkit.com/compare/htmlcsstoimage-alternative)
- [RasterKit as a Bannerbear alternative (for developers)](https://rasterkit.com/compare/bannerbear-alternative)