Documentation

Templates & styles

A template is a reusable, named style option: a base theme plus a few tweaks (accent colour, fonts) and a page format. Render with one and every document comes out on-brand and consistent.

text
template = base theme  +  style overrides (accent, fonts)  +  page format

You reference a template by its slug or id when rendering — via the REST API, an MCP create_pdf call, or the dashboard editor.

Base themes

Five built-in themes ship with every deployment (web, API, MCP). They're bundled modules, so they're identical everywhere.

ThemeLook
defaultClean, versatile document style — the fallback for everything.
editorialLong-form magazine feel — display serifs, generous measure.
minimalAiry Swiss product-doc look — lots of whitespace.
technicalDense developer-docs look — grid tables, monospace headings.
boldHigh-impact pitch/report look — heavy headings, punchy accents.

Use a theme directly on a render with theme: "editorial", or as the base for a template.

Style overrides

Templates layer a small, sanitized set of tweaks over the base theme. Only these fields exist, and each is validated before it touches the CSS:

FieldValueNotes
accenthex coloure.g. #2f5d50. 3-, 6-, or 8-digit hex. A soft tint is derived automatically for blockquotes, zebra rows, and table heads.
fontBodyfont preset keyBody text.
fontHeadingfont preset keyHeadings.
fontMonofont preset keyCode / monospace.
SecurityThese values are inlined into a <style> block, so nothing user-supplied reaches CSS verbatim: the accent must be a hex colour and fonts are mapped through a fixed preset table. Unknown fields are silently dropped.

Fonts

Font values are preset keys, not arbitrary font names. There are two groups.

System stacks — always available, no download:

KeyFamily
serifIowan / Palatino / Georgia serif stack
sansSystem UI sans stack (San Francisco / Segoe / Roboto)
slabRoboto Slab / Rockwell slab stack
monoSF Mono / JetBrains Mono / Menlo mono stack

Self-hosted Google fonts — embedded into the PDF as @font-face (only the fonts a render actually uses are embedded):

KeyFamilyCategory
interIntersans
robotoRobotosans
opensansOpen Sanssans
latoLatosans
montserratMontserratsans
poppinsPoppinssans
merriweatherMerriweatherserif
loraLoraserif
playfairPlayfair Displaydisplay serif
robotomonoRoboto Monomono

Formats

FormatSize
A4210 × 297 mm (default)
LetterUS Letter
LegalUS Legal

Built-in templates

Every deployment ships these ready-to-use system templates. Render with any slug directly — no setup. (They're read-only starting points; fork/clone in the dashboard to customise.)

SlugThemeFormatAccentFonts (heading / body)
quarterly-reportdefaultA4#14463Asans / serif
sales-proposaldefaultA4#1F6FEBsans / sans
investor-updatedefaultLetter#6A3FA9slab / serif
onboarding-guidedefaultA4#C2972Asans / sans
technical-manualdefaultA4#0F766Emono / sans
case-studydefaultA4#B4432Fslab / serif
meeting-minutesdefaultLetter#334155sans / sans
legal-briefdefaultLegal#6D2932serif / serif
whitepapereditorialA4#7A5C3Eplayfair / merriweather
editorial-lettereditorialA4#8C2F39playfair / lora
annual-lettereditorialLetter#35524Aplayfair / merriweather
product-briefminimalA4#3B5BDBinter / inter
design-specminimalA4#0EA5A4montserrat / opensans
one-pagerminimalLetter#111827inter / inter
api-referencetechnicalA4#2563EBrobotomono / inter
runbooktechnicalA4#0F766Emono / roboto
release-notestechnicalLetter#7C3AEDrobotomono / inter
pitch-handoutboldA4#C2410Cpoppins / inter
impact-reportboldA4#1D4ED8montserrat / lato
executive-summaryboldLetter#BE123Cpoppins / inter

List them live (plus your own) with GET /api/v1/templates or the MCP list_templates tool.

Creating templates

Three ways, all producing the same record:

  • DashboardTemplates (https://inkrun.dev/templates): a visual builder for theme, accent, fonts, and format.
  • REST APIPOST /api/v1/templates — see API · Templates.
  • MCP → the create_template tool, then render with the returned slug.
bash
curl "https://inkrun.dev/api/v1/templates" \
  -H "Authorization: Bearer $INKRUN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Acme Proposal",
    "themeName": "default",
    "format": "A4",
    "styles": { "accent": "#1F6FEB", "fontHeading": "sans", "fontBody": "serif" }
  }'

Style precedence (how the CSS layers)

At render time the CSS is composed in this order (later wins):

text
base theme CSS  <  custom-theme tokens  <  template style overrides

And at the request level, an explicit theme/format on the render call overrides whatever the template specifies. Style overrides work by injecting a :root { --accent: …; --font-body: …; } block after the theme CSS, so they win by source order — the built-in themes are driven entirely by these CSS variables.

Custom themes & cover pages

Beyond the tweakable style options, the dashboard (Themes, https://inkrun.dev/themes) lets you fork a built-in theme into a fully custom one:

  • Theme tokens — palette, typography, headings, spacing, page margins, and header/footer, edited visually. (Hex-only colours and preset fonts — no raw CSS, by design.)
  • Cover page — an optional designed first page built in a visual editor. Placeholders (e.g. title, subtitle) are filled from the document's frontmatter. Cover images are validated raster data (PNG/JPG, ≤300 KB; no SVG) and the cover renders full-bleed.

A custom theme has its own slug/id (thm_…). Render on it directly (theme: "my-brand"), or base a template on it (themeName: "my-brand").

Frontmatter

A leading --- YAML block is stripped before rendering and used to fill cover placeholders and the document title:

markdown
---
title: Q2 Revenue Report
subtitle: FY2026
---

# Q2 Revenue

Strong quarter…
  • Scalars only, bounded sizes. Values bind to cover-page placeholders and the PDF <title>.
  • The frontmatter title: is used as the render's title when the request doesn't supply one.
  • A malformed or oversized block is not swallowed — it renders as ordinary Markdown so you can see it.

Charts

Add a chart by including a fenced code block tagged chart: a key: value settings block, a --- separator, then a GitHub-style Markdown data table.

markdown
```chart
type: bar
x: Quarter
y: Revenue, Costs
title: 2026 Performance
stacked: false
---
| Quarter | Revenue | Costs |
| ------- | ------- | ----- |
| Q1      | 120     | 80    |
| Q2      | 180     | 95    |
```

Settings

KeyValuesNotes
typebar | line | area | pieDefault bar.
xcolumn headerRequired. Category axis (bar/line/area) or slice label (pie).
yone or more headers, comma-separatedRequired. Value columns. Pie uses only the first.
titletextOptional chart title.
xLabel / yLabeltextOptional axis titles.
heightpxPlot height, clamped 160–760 (default 340).
stackedtrue | yes | 1Stack bars/areas (ignored for line/pie).

Rules

  • Every cell under a y column must be numeric. Thousands separators and trailing units like % or $ are tolerated; any non-numeric y cell makes the whole fence fall back to a plain code block.
  • At least one data row is required.
  • Charts render as static inline SVG sized to fit the page — offline and deterministic, no interactivity.

Over MCP, the get_chart_syntax tool returns this spec verbatim.

Inkrun © 2026