Generate PDF, DOCX, EPUB, and PPTX from structured data
Define your document structure with content blocks, styles, and fonts — get back a PDF, DOCX, EPUB, or PPTX file. No template engine or typesetting library needed.
No credit card required — start with free trial credits
What's included
Templates As Code
12 content block types — paragraphs, tables, grids, lists, QR codes, barcodes — defined as JSON. No template engine, no typesetting language, no browser.
One API, Four Formats
Generate PDF, DOCX, EPUB, and PPTX from the same document definition. EPUB and PPTX are rare capabilities most document APIs don't offer. Switch the format field — the content and styles carry over.
Two-Layer Styles
Set document-wide defaults for fonts, colors, and spacing, then override per block. Custom TTF, OTF, WOFF, and WOFF2 fonts with weight and style variants, 19 page size presets.
MCP (Model Context Protocol)
Connect directly to AI agents. Use our APIs as tools in Claude, GPT, and other LLM-powered workflows.
Zapier
Connect to 5,000+ apps with Zapier integration.
n8n
Build automated workflows with n8n integration.
How it works
Define your document
Describe metadata, page size, fonts, and styles. Choose from 19 page size presets (A0-A6, B0-B6, Letter, Legal, Tabloid, Executive, Statement) or set custom dimensions.
- 19 page size presets plus custom dimensions
- Embed custom fonts (TTF, OTF, WOFF, WOFF2) with weight and style variants
- Two-layer style system: document defaults + per-block overrides
Add content blocks
Build your document from 12 block types: paragraphs with rich text, headlines (h1-h6), images, tables, 12-column grids, ordered and unordered lists, table of contents, separators, QR codes, and barcodes.
- Rich text with bold, italic, links, and markdown
- Tables with headers, column widths, and cell spans
- 12-column grid layout for multi-column designs
Choose your format
Get back a base64-encoded document in PDF, DOCX, EPUB, or PPTX. Headers, footers, and page numbers are supported. For PPTX, each page break creates a new slide.
- PDF with headers, footers, and page numbers
- DOCX with full formatting and embedded images
- EPUB with navigation, fonts, and images
- PPTX with slides split by page breaks
Quick Start
One API call, one credit deducted. Chains naturally with our other APIs — pipe the output of one into the next without glue code. You'll be up and running in minutes.
- Full OpenAPI 3.1 specification available for code generation and IDE integration.
- MCP server support for seamless integration with AI agents and tools.
- Comprehensive documentation with examples for every field type and edge case.
curl -X POST https://api.iterationlayer.com/document-generation/v1/generate \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"format": "pdf",
"document": {
"metadata": { "title": "Quarterly Report" },
"page": {
"size": { "preset": "A4" },
"margins": { "top_in_pt": 72, "right_in_pt": 72, "bottom_in_pt": 72, "left_in_pt": 72 }
},
"styles": {
"text": { "font_family": "Helvetica", "font_size_in_pt": 12, "color": "#333333", "line_height": 1.5 },
"headline": { "font_family": "Helvetica", "font_size_in_pt": 28, "color": "#111111", "is_bold": true }
},
"content": [
{ "type": "headline", "level": "h1", "text": "Quarterly Report" },
{ "type": "paragraph", "markdown": "Revenue grew **23%** compared to last quarter." }
]
}
}'
import { IterationLayer } from "iterationlayer";
const client = new IterationLayer({ apiKey: "YOUR_API_KEY" });
const result = await client.generateDocument({
format: "pdf",
document: {
metadata: { title: "Quarterly Report" },
page: {
size: { preset: "A4" },
margins: { top_in_pt: 72, right_in_pt: 72, bottom_in_pt: 72, left_in_pt: 72 },
},
styles: {
text: { font_family: "Helvetica", font_size_in_pt: 12, color: "#333333", line_height: 1.5 },
headline: { font_family: "Helvetica", font_size_in_pt: 28, color: "#111111", is_bold: true },
},
content: [
{ type: "headline", level: "h1", text: "Quarterly Report" },
{ type: "paragraph", markdown: "Revenue grew **23%** compared to last quarter." },
],
},
});
from iterationlayer import IterationLayer
client = IterationLayer(api_key="YOUR_API_KEY")
result = client.generate_document(
format="pdf",
document={
"metadata": {"title": "Quarterly Report"},
"page": {
"size": {"preset": "A4"},
"margins": {"top_in_pt": 72, "right_in_pt": 72, "bottom_in_pt": 72, "left_in_pt": 72},
},
"styles": {
"text": {"font_family": "Helvetica", "font_size_in_pt": 12, "color": "#333333", "line_height": 1.5},
"headline": {"font_family": "Helvetica", "font_size_in_pt": 28, "color": "#111111", "is_bold": True},
},
"content": [
{"type": "headline", "level": "h1", "text": "Quarterly Report"},
{"type": "paragraph", "markdown": "Revenue grew **23%** compared to last quarter."},
],
},
)
import il "github.com/iterationlayer/sdk-go"
client := il.NewClient("YOUR_API_KEY")
result, err := client.GenerateDocument(il.GenerateDocumentRequest{
Format: "pdf",
Document: il.DocumentDefinition{
Metadata: il.DocumentMetadata{Title: "Quarterly Report"},
Page: il.DocumentPage{
Size: il.DocPageSize{Preset: "A4"},
Margins: il.DocMargins{TopInPt: 72, RightInPt: 72, BottomInPt: 72, LeftInPt: 72},
},
Styles: il.DocumentStyles{
Text: il.TextStyle{FontFamily: "Helvetica", FontSizeInPt: 12, Color: "#333333", LineHeight: 1.5},
Headline: il.HeadlineStyle{FontFamily: "Helvetica", FontSizeInPt: 28, Color: "#111111"},
},
Content: []il.ContentBlock{
il.NewHeadlineBlock("h1", "Quarterly Report"),
il.ParagraphBlock{Type: "paragraph", Markdown: "Revenue grew **23%** compared to last quarter."},
},
},
})
See it in action
Ready-to-use workflows for the most common data processing tasks.
Build Product Datasheets
Generate professional product specification sheets with images, feature tables, technical specs, and contact information.
Build Slide Decks
Build PowerPoint slide decks with title slides, content slides, and call-to-action pages.
Create Quarterly Reports
Create structured quarterly business reports with table of contents, data tables, and page numbers.
Create Shipping Labels
Generate compact PDF shipping labels with sender and recipient addresses, barcode, and tracking number.
Generate DOCX Contracts
Generate editable DOCX service agreements with parties, terms, and payment schedules.
Generate PDF Certificates
Generate professional achievement certificates with recipient name, course details, date, and a QR code for verification.
Generate PDF Invoices
Generate professional PDF invoices with company branding, line items, and totals.
Produce EPUB Books
Generate complete EPUB e-books with chapters, table of contents, and rich text formatting.
Privacy by default
We built Iteration Layer with privacy by design. Your data is processed in the EU and never stored beyond temporary logs. Learn more about our security practices .
No data storage
We don't store your files or processing results. Logs are automatically deleted after 30 days.
EU-hosted infrastructure
All processing runs on servers located in the European Union. Your data never leaves the EU.
GDPR-compliant by design
Full compliance with EU data protection regulations. Data Processing Agreement available for all customers.
Pricing
Start with free trial credits. No credit card required.
Developer
For individuals & small projects
-
1,000 credits / month1,000 image transformations 500 document generations 500 image generations 100 document extractions
-
All APIs included
-
Free trial credits per API
-
Email support
-
Budget caps per key
Startup
Save 40%For growing teams
-
5,000 credits / month5,000 image transformations 2,500 document generations 2,500 image generations 500 document extractions
-
All APIs included
-
Free trial credits per API
-
Priority support
-
Budget caps per key
Business
Save 47%For high-volume workloads
-
15,000 credits / month15,000 image transformations 7,500 document generations 7,500 image generations 1,500 document extractions
-
All APIs included
-
Free trial credits per API
-
Priority support
-
Budget caps per key
Frequently asked questions
What output formats are supported?
The API generates PDF, DOCX, EPUB, and PPTX documents. All formats are created from the same document definition, so you can switch formats without changing your content.
How does the style system work?
You define document-level defaults for text, headlines, tables, and other elements. Individual blocks can override any style property. This two-layer system keeps your documents consistent while allowing per-block customization.
Can I use custom fonts?
Yes. Embed any TTF, OTF, WOFF, or WOFF2 font by including its base64-encoded buffer in the request. Specify weight (thin to black) and style (normal or italic) for each font variant.
What content blocks are available?
The API supports 12 block types: paragraph (with rich text and markdown), headline (h1-h6), image, table, grid (12-column layout), list (ordered and unordered with nesting), table of contents, page break, separator, page number, QR code, and barcode.
How do PPTX slides work?
For PPTX output, each page-break block creates a new slide. Content before the first page break goes on slide 1. Headlines become slide titles, and other blocks are mapped to slide elements.
Can I add headers and footers?
Yes, for PDF and DOCX output. Define header and footer content using the same block types as the main body. Headers and footers appear on every page. Use the page-number block type to show page numbers. EPUB and PPTX do not support headers and footers.