Documentation

Quickstart

curl → PDF in 60 seconds. Turn a Markdown string into a themed PDF with one HTTP request.

Prerequisites

  • An Inkrun account.
  • An API key. In the dashboard go to API & MCP (https://inkrun.dev/api-mcp), create a key, and copy it — it looks like sk_... and is shown once.
bash
export INKRUN_API_KEY="sk_..."             # your key

1. Render a PDF

Send Markdown, ask for the PDF back with Accept: application/pdf, and save it:

bash
curl "https://inkrun.dev/api/v1/render" \
  -H "Authorization: Bearer $INKRUN_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Accept: application/pdf" \
  -d '{
    "template": "quarterly-report",
    "markdown": "# Q2 Revenue\n\nStrong quarter — up **12%** QoQ."
  }' \
  --output report.pdf

2. Open it

bash
open report.pdf        # macOS   (xdg-open on Linux)

That's it — a themed, on-brand PDF from Markdown.

Prefer a JSON response + download URL?

Drop the Accept: application/pdf header. You get JSON back, and when S3 is configured the url is a presigned, ready-to-download link:

bash
curl "https://inkrun.dev/api/v1/render" \
  -H "Authorization: Bearer $INKRUN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "markdown": "# Hello\n\nWorld." }'
json
{
  "id": "rnd_9f2a…",
  "status": "rendered",
  "size": 28211,
  "url": "https://…s3…/rnd_9f2a.pdf?X-Amz-Signature=…",
  "stored": true
}

Choose how it looks

Pass any of these in the JSON body (all optional):

FieldExampleEffect
template"sales-proposal"Render with a saved style option (theme + accent + fonts + format). See Templates.
theme"editorial"Render on a raw base theme. Overrides the template's theme.
format"Letter"Page size: A4, Letter, or Legal.
title"Q2 Report"Document title stored with the render (defaults to frontmatter title:).

Only markdown is required. With nothing else, you get the default theme on A4.

bash
# On a theme directly, US Letter:
curl "https://inkrun.dev/api/v1/render" \
  -H "Authorization: Bearer $INKRUN_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Accept: application/pdf" \
  -d '{ "markdown": "# Notes", "theme": "minimal", "format": "Letter" }' \
  --output notes.pdf

Next steps

Keep the key server-sideThe API denies cross-origin browser reads, so don't call it from client JS. Each successful render counts against your monthly quota (Free: 50, Pro: 500).
Inkrun © 2026