PDF Generation API

Generate pixel-perfect PDFs from reusable templates, HTML, or URLs. Simple REST API, free tier, enterprise-ready.

Trusted by 500+ developers
10,000+ PDFs generated
99.9% uptime
SOC 2 ready

What is PDF Generation API?

A PDF Generation API is a REST endpoint that programmatically creates PDF documents from structured data, HTML markup, or web page URLs. 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 simplifies PDF generation with a single REST API. Pass a URL to convert any web page to PDF, send raw HTML for full design control, or fill pre-built templates with JSON data. Authentication is a single API key header, no OAuth complexity. Rendered via Chromium for pixel-perfect accuracy. Start with 25 free credits.

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);

Why Developers Choose DocuQueue

Built for speed, simplicity, and scale. Every feature designed to reduce friction.

Simple Authentication

API key in a header. No OAuth, no tokens, no complexity. Get started in seconds.

Fast Rendering

Chromium-based rendering engine. Pixel-perfect PDFs from complex HTML layouts.

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

DocuQueue vs Other PDF APIs

See how we compare on the features that matter most.

Feature DocuQueue APITemplate.io CraftMyPDF PDFGeneratorAPI
Auth Complexity API key only API key API key API key + secret
Free Tier 25 credits/mo None 3 credits/mo None
HTML to PDF Yes Yes No No
URL to PDF Yes Yes No No
Pre-built Templates Yes Yes Yes Yes
Batch Processing Yes No No No
Webhook Support Yes Yes No Yes
PDF Form Filling 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. No OAuth, no tokens, no complexity. Get your key from the dashboard after registering. Every request must include the header.
Rate limits depend on your plan. Free: 5 requests per minute. Starter: 20 requests per minute. Pro: 50 requests per minute. Business: 100 requests per minute. View pricing details.
Yes. DocuQueue offers a free tier with 25 credits per month. Each API call uses 1 credit. No credit card required to start. Sign up now to get your API key.
We provide official SDKs for Python and Node.js. You can also use any HTTP client (cURL, Go, Ruby, Java, etc.) since the API uses standard REST conventions with JSON payloads.
Yes. Configure a webhook URL in your dashboard to receive real-time notifications when PDF generation jobs complete. This enables event-driven document workflows and integrates with automation tools like Zapier and n8n.
DocuQueue supports three input methods: convert any URL to PDF, convert raw HTML to PDF, or fill pre-built and custom templates with JSON data. All outputs are pixel-perfect PDFs rendered via Chromium. See the full API documentation.

Start Generating PDFs Today

Free tier includes 25 credits per month. No credit card required.
Get Your API Key