Getting Started

PixDoc is an API for generating PDFs, screenshots, and OG images from HTML or URLs. Send a request, get back a rendered file — or use async rendering with webhooks or polling to process jobs in the background.

1. Create an Account

Sign up at pixdoc.dev/signup to create your free account. The free plan includes 100 renders per month.

2. Get Your API Key

After signing in, go to Dashboard → API Keys and click Create API Key. Give it a name like "Development" and copy the key. It is only shown once.

Ready to get started? Create your API key in the dashboard — it only takes a few seconds.

Store your API key securely. It grants full access to your account's rendering capabilities. Never commit it to version control.

3. Make Your First Render

curl -X POST https://pixdoc.dev/api/v1/pdf \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"html": "<h1>Hello World</h1>"}' \
-o hello.pdf

The response is a binary PDF file. Save it, stream it to your users, or upload it to storage.

Available Endpoints

EndpointMethodDescription
/api/v1/pdfPOSTGenerate a PDF from HTML or URL
/api/v1/screenshotPOSTTake a screenshot as PNG/JPEG/WebP
/api/v1/og/{template}GETGenerate an OG image from a template

Quick Examples

Screenshot

curl -X POST https://pixdoc.dev/api/v1/screenshot \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"url": "https://example.com", "options": {"fullPage": true}}' \
-o screenshot.png

OG Image

<meta property="og:image" content="https://pixdoc.dev/api/v1/og/blog-post?key=YOUR_API_KEY&title=My+Post&author=Jane" />

API Reference

The full API schema is available as an OpenAPI 3.1 specification:

  • OpenAPI Spec: pixdoc.dev/openapi.yaml
  • Import into Postman, Insomnia, or any API client
  • Auto-generate typed clients: openapi-generator generate -i https://pixdoc.dev/openapi.yaml -g typescript-fetch

Next Steps