# Quire PDF > Quire PDF is an API that turns JSON into polished PDF documents (invoices, receipts, quotes, credit notes, statements, certificates, or any data). Templates are optional: POST any JSON object to /v1/render; Quire uses a matching template or a clean generic layout. Key facts: - Endpoint: POST https://api.quirepdf.dev/v1/render with header "Authorization: Bearer " and a JSON body. Returns application/pdf (or image/png with ?format=png). - Optional ?template=invoice|receipt|quote|credit-note|statement|certificate|document. Response headers x-template and x-template-source (explicit|detected|fallback) say which layout was used. - Free validation: POST /v1/validate returns every data problem with field paths, without rendering. - Get a key: npx quirepdf-cli login you@example.com - SDKs: npm install quirepdf (TypeScript, typed template data), pip install quirepdf (Python). MCP server for agents: npx -y quirepdf-mcp - Plans: Free 100 renders/month free; Starter 2,000 renders/month $19/mo; Pro 15,000 renders/month $49/mo; Scale 75,000 renders/month $99/mo. Only successful renders count. - Documents are rendered in memory and not stored. ## Docs - [Quickstart](https://quirepdf.dev/docs/quickstart.md): Get an API key and render your first PDF from JSON in under a minute, with curl, TypeScript, Python or the CLI. - [Render API reference](https://quirepdf.dev/docs/render-api.md): Every Quire endpoint, query parameter and response header, with the 1 MB, 5 s and 200-page limits, PNG previews, free validation and monthly quotas. - [Templates and the generic layout](https://quirepdf.dev/docs/templates-and-layout.md): The six gallery templates, how Quire auto-detects one from your data, and the exact rules the generic layout uses to turn any JSON into a document. - [Errors](https://quirepdf.dev/docs/errors.md): Every Quire API error type with its HTTP status, what causes it and how to fix it, plus the field-path format used for data validation errors. - [CLI](https://quirepdf.dev/docs/cli.md): Sign in, render JSON files to PDF or PNG, browse templates, check usage and manage API keys from the terminal with quirepdf-cli. - [TypeScript and JavaScript SDK](https://quirepdf.dev/docs/sdk-js.md): Render PDFs from Node.js, Bun, Deno or edge runtimes with the quirepdf package, with typed template data and a single QuireError class. - [Python SDK](https://quirepdf.dev/docs/sdk-python.md): Render PDFs from Python 3.9+ with the quirepdf package, standard library only, with TypedDicts for each template and a single QuireError. - [MCP server](https://quirepdf.dev/docs/mcp.md): Give Claude Code, Claude Desktop or any MCP client five Quire tools to render, validate and preview PDFs, with setup, tool reference and example prompts. - [Accounts and billing](https://quirepdf.dev/docs/accounts-and-billing.md): Sign in by email link, manage API keys, compare plans and quotas, check usage, upgrade through hosted checkout, and see exactly what Quire stores. ## Templates - [Certificate](https://quirepdf.dev/templates/certificate): Landscape course-completion or achievement certificate with an accent frame, issuer mark, large serif recipient name, one or two signature lines, seal, credential ID and verification link. Always exactly one page. - [Credit note](https://quirepdf.dev/templates/credit-note): Credit note against an earlier invoice: credit-amount panel with issued/applied/refunded status, original invoice reference and reason, credited line items, tax and how the credit will be applied. - [Document](https://quirepdf.dev/templates/document): Generic layout for any JSON: header from title/from/to, a details panel, then one section per key. Objects become key/value grids, arrays of objects become tables. Used automatically when no template is chosen and none matches. - [Invoice](https://quirepdf.dev/templates/invoice): Clean, modern invoice with line items, discount, tax, amount-due panel and payment details. Multi-page with a repeating table header. - [Quote](https://quirepdf.dev/templates/quote): Quote or estimate for agencies and service businesses: line items grouped into sections with subtotals, discount, tax, terms and a client acceptance block with signature lines. Multi-page with a repeating table header. - [Receipt](https://quirepdf.dev/templates/receipt): Proof-of-payment receipt with an amount-paid panel and PAID badge, payment method and transaction ID, compact line items, discount, tax, and a support or refund-policy note. - [Statement of account](https://quirepdf.dev/templates/statement): Customer statement for a period: balance-due panel with opening, invoiced, paid and closing balances, an activity table with a running balance, an optional aging summary and payment instructions. Multi-page with a repeating table header. ## Guides - [Generate PDF invoices in Node.js and Next.js](https://quirepdf.dev/guides/generate-pdf-invoices-nodejs): Map your order to Quire's typed InvoiceData object and call quire.render(invoice, { template: "invoice" }) from a route handler, then return pdf.bytes with a Content-Type of application/pdf. There's no HTML to write and no headless browser to run; the invoice template computes subtotal, tax and total for you. - [Generate a PDF from JSON in Python (FastAPI and Django)](https://quirepdf.dev/guides/generate-pdf-from-json-python): Install quirepdf, build a dict with your data and call Quire().render(data); the result's content attribute holds the PDF bytes, and save(path) writes them to a file. In FastAPI or Django, return result.content with the media type application/pdf. - [Turn any JSON into a PDF with one API call](https://quirepdf.dev/guides/json-to-pdf-api): POST your JSON object to https://api.quirepdf.dev/v1/render with your API key, and the response body is the PDF. No template is needed; to make it read like a real document, add a title, from and to, set currency, and order the keys the way you want the sections to appear. - [Let Claude generate PDFs with the Quire MCP server](https://quirepdf.dev/guides/ai-agents-generate-pdf-mcp): Add Quire's MCP server with claude mcp add quire --env QUIRE_API_KEY=qk_live_... -- npx -y quirepdf-mcp (or the equivalent mcpServers entry in Claude Desktop). Claude can then turn any data in the conversation into a PDF saved on your machine, using a gallery template when one fits and checking pages as PNG images. ## Comparisons - [A wkhtmltopdf alternative for invoices and reports](https://quirepdf.dev/compare/wkhtmltopdf-alternative): If you use wkhtmltopdf to turn your own data into invoices, receipts or reports, Quire replaces the HTML templates and the binary with one API call that takes JSON and returns a PDF. If you need to convert arbitrary HTML or web pages, or must run offline, Quire isn't a replacement; look at the alternatives the wkhtmltopdf maintainers themselves recommend. - [A Puppeteer and Playwright page.pdf() alternative](https://quirepdf.dev/compare/puppeteer-pdf-alternative): If you launch headless Chrome only to print invoices, receipts or reports built from your own data, Quire replaces the browser, the HTML template and the print CSS with one API call that takes JSON and returns a PDF. If you need pixel control over your own HTML, JavaScript-rendered content such as charts, or PDFs of existing web pages, keep Puppeteer or Playwright. - [A Gotenberg alternative for documents built from data](https://quirepdf.dev/compare/gotenberg-alternative): If you run Gotenberg only to turn your own data into invoices, receipts or reports, Quire removes both the container and the HTML templates; you send JSON to a hosted API and get a PDF back. If you convert Office documents, HTML or URLs, manipulate existing PDFs, or need everything inside your own network, Gotenberg is the better tool. ## Optional - [Full documentation in one file](https://quirepdf.dev/llms-full.txt) - [OpenAPI-style reference](https://quirepdf.dev/docs/render-api.md)