POST /render) and Bulk Render endpoint (POST /bulk-render) to generate PDF, DOCX, and ODT documents.
Top-level structure
A document JSON object has the following top-level keys:| Property | Type | Required | Description |
|---|---|---|---|
document | object | Yes | Page settings: output format, size, margins, orientation, and metadata. |
sections | array | Yes | Array of content sections. Each section contains an array of elements. Min: 0, Max: 500. |
variables | object | No | Template variables for {{varName}} text substitution and variableRef elements. |
abbreviations | object | No | Map of abbreviation short forms to their full text (e.g., "API": "Application Programming Interface"). |
citations | array | No | Array of citation entries in CSL-JSON format for bibliography generation. Max: 1000. |
defaults | object | No | Global styling defaults: fonts, colors, spacing, element styles, header/footer, citation style, and more. |
Strict validation mode
The render endpoints (POST /render and POST /render/markdown) support an optional ?strict=true query parameter that enables strict validation. In strict mode, the API performs additional checks that go beyond schema validation:
- Broken internal references — references to non-existent anchors (e.g.,
[see here](#missing-anchor)) cause an error - Undefined citations —
@[citeKey]references to citation IDs not present in thecitationsarray cause an error - Undefined abbreviations —
~ABK~references to abbreviation keys not present in theabbreviationsobject cause an error - Duplicate anchors — multiple elements defining the same anchor ID cause an error (this is always checked, even without strict mode)
400 Bad Request response containing the list of validation errors.
Strict mode is recommended for production workflows to catch issues early. In the Autype editor, these same checks are shown as warnings in the sidebar.
Document settings
Thedocument object configures the page layout and document metadata.
Properties
| Property | Type | Required | Default | Description |
|---|---|---|---|---|
type | string | Yes | — | Output format: "pdf", "docx", or "odt" |
filename | string | No | — | Output filename without extension. Only a-z, A-Z, 0-9, _, - allowed. Max: 100 chars. |
title | string | No | — | Document title (PDF/DOCX metadata). Max: 200 chars. |
author | string | No | — | Document author (PDF/DOCX metadata). Max: 100 chars. |
subject | string | No | — | Document subject (PDF/DOCX metadata). Max: 200 chars. |
keywords | string[] | No | — | Document keywords for metadata. Max: 10 items, 50 chars each. |
size | string | No | "A4" | Page size: "A4", "A3", "A5", "Letter", "Legal" |
orientation | string | No | "portrait" | Page orientation: "portrait" or "landscape" |
marginTop | number | No | — | Top margin in cm (0–10) |
marginRight | number | No | — | Right margin in cm (0–10) |
marginBottom | number | No | — | Bottom margin in cm (0–10) |
marginLeft | number | No | — | Left margin in cm (0–10) |
Sections
Sections are the content containers of your document. There are two types:Flow section
Flowing content that spans multiple pages automatically. This is the most common section type.| Property | Type | Required | Default | Description |
|---|---|---|---|---|
type | string | Yes | — | Must be "flow" |
id | string | No | — | Optional unique identifier. Max: 100 chars. |
newPage | boolean | No | true | Start this section on a new page. |
columns | object | No | — | Multi-column layout configuration. |
content | array | Yes | — | Array of content elements. Max: 5000 elements. |
Columns
| Property | Type | Required | Default | Description |
|---|---|---|---|---|
count | number | Yes | — | Number of columns (1–4) |
space | number | No | 1.27 | Space between columns in cm (0–5) |
separate | boolean | No | false | Show separator line between columns |
Page section
A single positioned page — useful for cover pages, title pages, or any content that needs precise vertical positioning.| Property | Type | Required | Default | Description |
|---|---|---|---|---|
type | string | Yes | — | Must be "page" |
id | string | No | — | Optional unique identifier. Max: 100 chars. |
align | string | No | "top" | Vertical alignment: "top", "center", "bottom" |
startY | number | No | — | Y position in cm from top (0–100). Overrides align. |
content | array | Yes | — | Array of content elements. Max: 200 elements. |
Complete example
Next steps
Variables
Dynamic content substitution with text, number, image, list, and table variables.
Abbreviations
Define abbreviation short forms and generate abbreviation lists.
Citations
CSL-JSON citations and automatic bibliography generation.
Defaults
Global styling: fonts, colors, spacing, header/footer, and more.
Layout
Flow and page sections, columns, page breaks, and spacers.
Text Elements
Headings, paragraphs, inline formatting, and anchors.
Tables
Tables with headers, rows, cell formatting, captions, and data binding.
Lists
Ordered and unordered lists with nested items.
Media & Code
Images, charts, QR codes, code blocks, and math equations.
Indices
Table of contents, list of figures, list of tables.
