Documentation

Reference documentation for gpdf-api — render PDFs from JSON over HTTP.

gpdf-api documentation

gpdf-api is a fast, CJK-aware PDF generation HTTP API built on gpdf, a pure-Go, zero-dependency PDF engine. This site is the source of truth for the public REST API exposed at https://api.gpdf.dev.

Make your first request

curl https://api.gpdf.dev/v1/pdf \
  -H "Authorization: Bearer $GPDF_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "template": {
      "page": { "size": "A4" },
      "body": [{ "text": "Hello, PDF!" }]
    }
  }' \
  --output hello.pdf

You get back a real application/pdf byte stream — no async polling, no signed-URL roundtrip, no second call to fetch the result.

Read the full Quickstart →

What's in these docs

  • Getting started — sign up, get a key, send your first request.
  • API reference — every endpoint with request/response shape, headers, and quotas.
  • Guides — templates, CJK, images, multi-page layout, signing, encryption, performance.
  • Errors — every error code we return, what causes it, and the fix.
  • Rate limits — per-plan limits, headers, and how Retry-After works.

What gpdf-api isn't

  • It is not a wrapper around Chromium / wkhtmltopdf / Puppeteer. There's no headless browser. PDFs are written byte-by-byte by gpdf, a pure-Go engine that uses only the Go standard library.
  • It is not a "render any HTML to PDF" service. We accept JSON templates, not arbitrary HTML/CSS. That trade-off is what lets us give you sub-100 ms latency and stable behaviour across deploys.
  • It is not a queue. The HTTP request is the render. If your render takes 30 s, you'll see a 30 s response. Most renders finish in tens of milliseconds.

If you want HTML→PDF, you want a different product. If you want predictable latency on a stable JSON contract, keep reading.

Something unclear or missing on this page?