# PaperType > Hosted PDF generation: POST Markdown, HTML, or a hosted template with JSON data to https://papertype.dev/v1/pdf and get a typeset PDF back (cover page, table of contents, page numbers, running header/footer, themes, custom CSS; A4/Letter/Legal/A5). The renderer runs no JavaScript and has no network access. Also a no-signup browser studio (Markdown to PDF, $5 per clean export) and an open-source MCP server, Python SDK and CLI (MIT). Facts an agent needs before calling the API: - Endpoint: POST https://papertype.dev/v1/pdf with JSON. Auth header: Authorization: Bearer dp_... (keys start with dp_). Free key at https://papertype.dev/signup, 50 documents/month. - Body fields: markdown | html | template+data (one source); theme (clean default, report, minimal, letter, none); css; page_size; title, author, date; cover, toc, page_numbers (bool); footer, header; filename; output (pdf default, or url). - output=url returns JSON {url, filename, pages, bytes, expires_at}; the PDF is kept 24 hours at an unguessable https://papertype.dev/v1/files/.pdf link. output=pdf stores nothing. - Images, fonts and stylesheets at web URLs are never fetched: inline them as data: URIs or remove them, or the render fails with 422 naming the URL. Links are fine. - Limits: 2 MB source, 300 pages per document. Response headers X-Pages, X-Quota-Used, X-Quota-Limit. Errors are JSON: 400 no source, 401 bad key, 413 too large, 422 render/validation, 429 quota. - GET https://papertype.dev/v1/me (or GET https://papertype.dev/v1) returns plan, quota and usage for the key. - Free output carries a small 'papertype.dev' footer mark. Paid plans remove it: Starter $9/month for 500 documents, Pro $29 for 3,000, Scale $79 for 15,000; hard caps, no overage. - Install: pip install papertype (SDK + CLI: papertype render README.md -o README.pdf, env PAPERTYPE_API_KEY). MCP server: claude mcp add papertype -e PAPERTYPE_API_KEY=dp_... -- npx -y papertype-mcp (tools render_pdf, list_templates, account; Node.js 20+). ## Reference - [API reference](https://papertype.dev/docs): every field of POST /v1/pdf, responses, errors, Python/Node/curl examples - [OpenAPI document](https://papertype.dev/v1/openapi.json): machine-readable schema of the API - [For agents](https://papertype.dev/for-agents): MCP server setup for Claude Code, Claude Desktop, Cursor and other clients; what the three tools do - [Pricing](https://papertype.dev/pricing): free key, paid plans, the $5 studio export - [Studio](https://papertype.dev/markdown-to-pdf): paste Markdown, see the PDF, no account - [Hosted templates](https://papertype.dev/templates): JSON in, finished document out - [Certificate template](https://papertype.dev/templates/certificate): A landscape certificate of completion, achievement or attendance: recipient name, what it is for, issuer, date, signature line and an optional certificate ID for verification. - [Invoice template](https://papertype.dev/templates/invoice): A clean, itemised invoice with your details, the client's details, line items, optional discount and tax, totals and payment instructions. Totals are computed on the server from quantity × unit price. - [Report template](https://papertype.dev/templates/report): A structured report with cover page, optional key-figures strip, and sections written in Markdown (headings, lists, tables, code). Good for monthly client reports, audits and summaries generated from your data. ## Guides: The API from your language - [Markdown to PDF API: JSON in, typeset PDF out](https://papertype.dev/guides/markdown-to-pdf-api): Convert Markdown to PDF with one HTTPS request. Cover page, table of contents with page numbers, highlighted code, four themes. Free tier, no card. - [HTML to PDF API with CSS paged media](https://papertype.dev/guides/html-to-pdf-api): Post HTML and CSS, get a PDF. @page sizes, margins, running headers and footers, page counters and break control. No JavaScript, no external fetches. - [PDF generation in Python with an HTTP API](https://papertype.dev/guides/pdf-generation-python): Generate PDFs from Python with one requests.post call: Markdown or HTML in, PDF bytes out. No system packages, no headless browser. Free tier. - [PDF generation in Node.js with fetch](https://papertype.dev/guides/pdf-generation-nodejs): Generate PDFs from Node.js with a single fetch call: Markdown or HTML in, a PDF buffer out. No headless browser to install or keep alive. Free tier. ## Guides: Document features - [Markdown to PDF with a table of contents](https://papertype.dev/guides/markdown-to-pdf-with-table-of-contents): Turn Markdown into a PDF with a contents page: dotted leaders, real page numbers, clickable entries, built from your headings. Free preview, no signup. - [Markdown to PDF with a cover page](https://papertype.dev/guides/markdown-to-pdf-cover-page): Add a cover page with title, author, date and logo to a Markdown PDF. Four themes, free preview in the browser, $5 clean export, no account. - [README to PDF: repository docs as a typeset PDF](https://papertype.dev/guides/readme-to-pdf): Convert a README.md or docs folder page into a clean PDF with highlighted code, tables and a contents page. Free preview in the browser, no signup. - [Chatbot Markdown to PDF: clean export of AI output](https://papertype.dev/guides/chatbot-markdown-to-pdf): Paste the Markdown a chatbot or LLM wrote and get a typeset PDF with headings, tables, code and a cover page. Free preview, $5 clean export, no account. ## Guides: Documents from data - [Invoice PDF API: invoices from JSON data](https://papertype.dev/guides/json-to-pdf-invoice-api): Generate invoice PDFs from JSON with a hosted invoice template, or send your own HTML or Markdown. Repeating table headers, page numbers, capped pricing. - [Certificate PDF API: certificates from data](https://papertype.dev/guides/certificate-pdf-api): Generate certificates of completion as PDFs from JSON with a hosted certificate template, or your own HTML. Logo, signature line, capped pricing. ## Guides: Automation and no-code tools - [Generate a PDF in GitHub Actions](https://papertype.dev/guides/pdf-in-github-actions): Render CHANGELOG.md, docs or a JSON invoice to PDF inside a GitHub Actions workflow with one curl step and attach it to the release. No browser install. - [Generate a PDF in n8n (Markdown, HTML, invoice)](https://papertype.dev/guides/pdf-in-n8n): Turn Markdown, HTML or invoice JSON into a PDF in an n8n workflow with the built-in HTTP Request node. Two importable workflows, no community node needed. - [Generate a PDF in Zapier or Make from Markdown or HTML](https://papertype.dev/guides/pdf-in-zapier-and-make): Zapier or Make PDF generation with no code step: Markdown, HTML or invoice JSON to PDF with the built-in webhook and HTTP apps. Bodies verified live. - [Retool: generate a PDF from a table row or form](https://papertype.dev/guides/pdf-in-retool): Retool PDF generation: one REST API resource, a POST query from a table row or form, a download button, and a Workflows webhook route. Verified live. - [Google Sheets to PDF: one row to a document (Apps Script)](https://papertype.dev/guides/pdf-from-google-sheets): Google Sheets to PDF with Apps Script: turn one row into a report or invoice PDF, save it to Drive or email it on form submit. One file, verified live. - [Airtable: generate a PDF from a record (automation script)](https://papertype.dev/guides/pdf-from-airtable): Generate a PDF from any Airtable record with one Run-a-script automation and save it to an attachment field. Report or invoice mode. Verified live. - [Notion to PDF via API: export a page or database (Python)](https://papertype.dev/guides/pdf-from-notion): Notion to PDF without the manual export: one Python script saves a page, or every row of a database, as a clean PDF via Notion's API. Verified live. - [Coda to PDF via API: export a page or a whole doc (Python)](https://papertype.dev/guides/pdf-from-coda): Coda (now Superhuman Docs) to PDF: one Python script exports a page, or every page of a doc, as Markdown and renders a PDF via the API. Verified live. - [HubSpot deal to PDF via API: summary or invoice (Python)](https://papertype.dev/guides/pdf-from-hubspot): HubSpot deal to PDF: one Python script reads the deal, line items, company and contacts via the CRM API and renders a summary or invoice PDF. Tested live. - [Jira issue to PDF via API: issue, JQL list, release notes](https://papertype.dev/guides/pdf-from-jira): Jira issue to PDF: a Python script reads an issue with comments and attachments, or every issue a JQL matches, and renders PDFs via the REST API. - [ClickUp task to PDF via API: task, List, or Doc (Python)](https://papertype.dev/guides/pdf-from-clickup): ClickUp task to PDF: a Python script reads a task (comments, attachments), a whole List, or a Doc's pages via the API and renders PDFs. Tested live. - [Email a PDF for every form submission (no code)](https://papertype.dev/guides/email-pdf-from-form-submission): Turn each Tally, Typeform or Google Forms submission into a formatted PDF and email it via Zapier, Make, Apps Script or a webhook. Bodies verified live. ## Optional - [About](https://papertype.dev/about): who runs the service and how - [Status](https://papertype.dev/status): measured uptime and render errors, updated every 5 minutes - [Changelog](https://papertype.dev/changelog) - [Privacy policy](https://papertype.dev/privacy) - [Terms of service](https://papertype.dev/terms) - [Refund policy](https://papertype.dev/refunds) - [Contact](https://papertype.dev/contact): support@papertype.dev - [Source code for the clients](https://github.com/papertype-dev): MCP server, Python SDK and CLI, MIT