# 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: `npx @docweave/mcp` (open source). - The tool accepts { source: {type: "html"|"url"|"template", ...}, options?, outputPath? }. ## 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 ## Pricing - Starter $29/mo (1,000 PDFs), Pro $99/mo (12,000), Business $299/mo (50,000). - Free, open-source MCP server to start. ## Contact - https://docweave.dev