PDF Generation API for Invoices, Reports & Forms REST API, Stored Templates & AI Agents

Generate invoices, reports, certificates and filled PDF forms from HTML, URLs, or stored templates. Send JSON and get a finished PDF via REST API, batch jobs, or AI agents (MCP) with Claude and ChatGPT.

No credit card required
25 free docs/month (each PDF counts as one)
REST API, batch & MCP for AI agents

Ways to generate invoices, reports & forms

Pick the method that fits the job: render from HTML/URLs, fill a stored template with data, fill an existing PDF form, or let an AI agent generate documents via MCP.

HTML or URL to PDF

Render raw HTML/CSS or convert a web page to a pixel-perfect PDF. Best when a developer controls layout in code (HTML to PDF examples).

Stored templates filled with data

Design/store a template once, then fill it with JSON/CSV to generate invoices, reports or certificates—one or in bulk (batch generation). A developer/team owns the template; your app fills the data.

PDF form filling

Upload an existing PDF and fill its fields with data (e.g. W-4, W-9, I-9 or custom forms). Form filling API with field detection.

Generate with AI agents (MCP)

Let Claude, ChatGPT or other MCP clients generate invoices, PDFs and filled forms from chat by calling the same capabilities via the DocuQueue MCP server.

What is PDF Generation API?

A PDF Generation API is a REST endpoint that programmatically creates PDF documents from structured data, HTML markup, stored templates, or existing PDF forms. Instead of manually designing documents in word processors, developers send a request to the API and receive a formatted PDF in return. This automates document workflows at scale, eliminating repetitive manual work.

Developers use PDF generation APIs to automate invoice creation, contract assembly, certificate generation, report rendering, and tax form filling. The API handles layout, styling, fonts, and pagination, so your application focuses on data, not document design. Whether you need a single PDF or ten thousand, the API scales to match.

DocuQueue lets you generate invoices, reports and filled forms via a single REST API: render a URL or raw HTML (HTML to PDF examples), fill a stored template with JSON/CSV data (a developer/team owns the template; your app fills it), or fill existing PDF forms. The same capabilities are available over MCP for AI agents like Claude and ChatGPT, with batch jobs and webhooks for automation. Each generated PDF counts as one. Start with 25 free documents/month.

API Endpoints

Six endpoints to handle every PDF generation workflow. Convert URLs, render HTML, fill templates, and manage jobs.

POST

/api/v1/convert

Convert any URL to a pixel-perfect PDF. Supports batch processing for multiple pages.

POST

/api/v1/convert-html

Send raw HTML and CSS, receive a rendered PDF. Full control over layout and styling.

POST

/api/v1/templates/{id}/fill

Fill a pre-built or custom template with JSON data. Variables, line items, and conditionals supported.

POST

/api/v1/forms/upload

Upload a PDF and auto-detect all fillable form fields. Learn more →

GET

/api/v1/status/{job_id}

Check the status of an async conversion job. Poll or use webhooks.

GET

/api/v1/download/{job_id}

Download the generated PDF once the job completes.

Code Examples

Get started in minutes with any language. Copy, paste, and run.

# Convert a URL to PDF
curl -X POST https://docuqueue.com/api/v1/convert \
  -H "api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"urls": ["https://example.com"]}'

# Convert HTML to PDF
curl -X POST https://docuqueue.com/api/v1/convert-html \
  -H "api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"html": "<h1>Hello</h1><p>World</p>"}'

# Fill a template with data
curl -X POST https://docuqueue.com/api/v1/templates/{id}/fill \
  -H "api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"data": {"name": "John", "amount": 100}}'
import requests

API_KEY = "your_api_key"
BASE_URL = "https://docuqueue.com/api/v1"

# Convert a URL to PDF
response = requests.post(
    f"{BASE_URL}/convert",
    headers={"api-key": API_KEY},
    json={"urls": ["https://example.com"]}
)

# Check job status
job_id = response.json()["job_id"]
status = requests.get(
    f"{BASE_URL}/status/{job_id}",
    headers={"api-key": API_KEY}
)

# Download the PDF
pdf = requests.get(
    f"{BASE_URL}/download/{job_id}",
    headers={"api-key": API_KEY}
)
open("output.pdf", "wb").write(pdf.content)
const API_KEY = "your_api_key";
const BASE_URL = "https://docuqueue.com/api/v1";

// Convert a URL to PDF
const response = await fetch(`${BASE_URL}/convert`, {
  method: "POST",
  headers: {
    "api-key": API_KEY,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    urls: ["https://example.com"],
  }),
});

const { job_id } = await response.json();

// Download the PDF
const pdf = await fetch(`${BASE_URL}/download/${job_id}`, {
  headers: { "api-key": API_KEY },
});
const buffer = await pdf.arrayBuffer();
require("fs").writeFileSync("output.pdf", buffer);

PDF Generation API Features

REST API with API key auth, Chromium rendering, batch processing, async jobs, templates, and webhooks.

API Key Authentication

Pass your API key in the api-key header with every request. No OAuth or token refresh required.

Chromium Rendering

PDFs are rendered via Chromium. Supports complex HTML layouts, CSS, and web fonts.

Batch Processing

Process multiple documents in parallel. Generate hundreds of PDFs per request.

Async Jobs

Submit jobs and poll for status. Non-blocking workflow for high-throughput apps.

Template System

Pre-built templates or custom DOCX. Variables, line items, and conditionals.

Webhook Support

Get notified when jobs complete. Build event-driven document workflows.

When to Use PDF Generation API

Automate any document workflow that currently involves manual PDF creation.

Invoices

Generate invoices from CRM data automatically

Certificates

Create awards, completions, and credentials

Contracts

Assemble agreements from templates and data

Reports

Render analytics and business reports as PDF

Tax Forms

Fill and generate W-9, W-4, I-9, 1099 forms

Automated PDF generation

Stop creating PDFs by hand. Automate PDF generation from your data, templates, or HTML so documents are produced automatically whenever your app or workflow needs them.

Generate on events

Trigger automated PDF generation from any app event—a new order, signup, or form submission. Call the API to create a PDF instantly.

Templates + data

Fill reusable templates with JSON or spreadsheet data to automatically generate invoices, contracts, reports, and certificates at scale.

Batch & async workflows

Automate bulk PDF generation with async jobs and batch endpoints. Poll status or use webhooks to deliver finished PDFs into your workflow.

With DocuQueue, automated PDF generation is as simple as one API call: convert HTML or URLs to PDF, or fill a template with data and get a ready-to-download file. Combine bulk generation, webhooks, and the REST API to run fully automated document workflows without managing rendering infrastructure.

Start free to automate your first PDF, or see the API docs for endpoints and examples.

PDF Generation for SaaS Applications

Generate PDFs programmatically inside your product. Multi-tenant, white-label ready.

Multi-Tenant

Each API key maps to a tenant. Isolated data, separate billing, per-tenant rate limits.

White-Label

Remove DocuQueue branding. Your PDFs look like they come from your product.

Scale

From 10 PDFs/month to 100,000+. Same API, same latency, same quality.

PDF API vs Document Generation API

Two terms, overlapping but distinct. Here's the short version.

A PDF API focuses specifically on PDF output. You send HTML, a URL, or structured data; you get a PDF back. The API handles rendering, pagination, and styling.

A Document Generation API is broader. It may produce PDFs, Word docs, Excel spreadsheets, or presentations from the same template. Useful when your workflow requires multiple output formats.

DocuQueue is a PDF-focused API. If you need PDFs only, you get a simpler interface, faster rendering, and lower cost. If you need multiple formats, compare document generation APIs.

DocuQueue vs Other PDF APIs

Key differences at a glance (metering and “counts as one” vary by vendor). See the full comparison for developers & AI agents →

Feature DocuQueue APITemplate.io CraftMyPDF PDFGeneratorAPI
Free Tier 25 credits/mo None 3 credits/mo None
HTML to PDF Yes Yes No No
Batch Processing Yes No No No
PDF Form Filling Yes No No No
MCP for AI agents (Claude, ChatGPT) Yes No No No

What Developers Say

"We replaced our entire PDF pipeline with DocuQueue's API. The HTML to PDF conversion is pixel-perfect, and batch processing cut our document generation time from hours to minutes."
Marcus Chen CTO, InvoiceFlow
"The template system is exactly what we needed. We upload a DOCX template, send JSON data via the API, and get formatted PDFs back. Our legal team generates 200+ contracts per week now."
Sarah Mitchell Operations Manager, LegalEdge
"Finally, a PDF API with a real free tier. I evaluated five different services and DocuQueue was the only one that let me prototype without entering a credit card. The API docs are excellent."
James Park Solo Developer

Frequently Asked Questions

Pass your API key in the api-key header with every request. Get your key from the dashboard after registering. No OAuth or token refresh required.
Rate limits: Free 5 req/min, Starter 20 req/min, Pro 50 req/min, Business 100 req/min. View pricing details.
Yes. Free tier includes 25 credits per month. Each API call uses 1 credit. No credit card required. Sign up to get your API key.
Official SDKs: Python and Node.js. Any HTTP client works (cURL, Go, Ruby, Java) via standard REST with JSON payloads.
Yes. Set a webhook URL in your dashboard to receive POST notifications when generation jobs complete. Integrates with Zapier and n8n.
URL to PDF, HTML to PDF, stored template fill with JSON/CSV data, and PDF form filling from an uploaded PDF. All outputs are Chromium-rendered PDFs. API documentation.
Use an MCP-enabled API or MCP server so the agent can generate documents from data. DocuQueue’s MCP server (https://docuqueue.com/mcp/v1) lets Claude, ChatGPT, Cursor and other MCP clients create PDFs and invoices from stored templates, fill PDF forms, and run batch jobs from chat. You can also call the same capabilities via the REST API. For a side-by-side of tools and APIs, see the PDF generation APIs comparison guide.
A developer or team creates and owns the stored template (HTML/CSS or uploaded template) and its fields; your app or AI agent fills it with data. For existing PDF forms, fields are filled rather than the original layout redesigned. Each generated PDF counts as one document. Free tier: 25 documents/month (no credit card). Metering varies across PDF tools, so compare “what counts as one” at ~1,000 docs/month.
Yes. DocuQueue provides a REST API and MCP server for programmatic form filling. Send a POST request with your PDF and JSON data to /api/v1/forms/fill, or connect via MCP: claude mcp add docuqueue --transport http https://docuqueue.com/mcp/v1. Supports W-4, W-9, I-9, and custom PDF forms.

Start Generating PDFs Today

Free tier includes 25 credits per month. No credit card required.
Start Generating for Free

Need higher volume or done-for-you setup? Email arun@docuqueue.com.