# Docweave > The PDF/document-generation API built for AI agents and developers. > One REST call (or one MCP tool) turns HTML, a URL, or a template + JSON into a > pixel-perfect PDF. Transparent per-document pricing — no per-page tax. ## What it does - Generate a PDF from raw HTML, a public URL, or a stored template + JSON data. - Canonical Chromium rendering (fonts, page breaks, headers/footers). - Built-in idempotency so agents never double-generate or double-bill. ## For AI agents (MCP) - We ship a first-class MCP server exposing a `generate_pdf` tool. - Install (local): `npx @docweave/mcp` (open source). - Hosted (zero-install): streamable-HTTP MCP at https://docweave.dev/api/mcp — auth with `Authorization: Bearer `; `initialize`/`tools/list` need no auth. - The tool accepts { source: {type: "html"|"url"|"template", ...}, options?, idempotencyKey? }. ## REST API - POST https://docweave.dev/api/v1/pdf - Auth: `Authorization: Bearer ` - Body: { source, options?, fileName?, idempotencyKey? } - Returns: { result: { ok, url?, bytesBase64?, byteSize?, pageCount?, error? } } ## Key links - Docs: https://docweave.dev/docs - MCP guide: https://docweave.dev/pdf-api-for-ai-agents - Free HTML→PDF tool: https://docweave.dev/tools/html-to-pdf ## Guides by language & tool - Generate a PDF in: Node.js, Python, PHP, Ruby, Go, .NET, Java, Next.js, Laravel, Rails — https://docweave.dev/generate-pdf - No-code: Zapier, Make, n8n, Airtable, Google Sheets, Notion — https://docweave.dev/generate-pdf ## By document type - Invoices, receipts, certificates, reports, quotes, contracts, tickets, resumes, statements, labels, boarding passes, purchase orders — https://docweave.dev/use-cases ## Comparisons - Docweave vs PDFShift, DocRaptor, Api2Pdf, CraftMyPDF, PDFMonkey, APITemplate, Pdfcrowd, Urlbox, and more — https://docweave.dev/alternatives - Best PDF generation APIs in 2026 — https://docweave.dev/best-pdf-generation-api ## Glossary (definitions) - HTML-to-PDF API, PDF generation API, MCP server, headless Chromium rendering, programmatic PDF generation — https://docweave.dev/glossary ## Pricing - Starter $29/mo (1,000 PDFs), Pro $99/mo (12,000), Business $299/mo (50,000). - Free, open-source MCP server to start. ## Full reference - https://docweave.dev/llms-full.txt (complete request/response schema, errors, per-language examples) ## Contact - https://docweave.dev