Skip to main content
POST

Authorizations

x-api-key
string
header
required

API key issued from your Blink PDF account, prefixed bp_. Send it in the x-api-key header on every request. The documentation and health endpoints are exempt.

Headers

x-idempotency-key
string

Optional client-supplied idempotency token. When present, usage metering deduplicates on (key, user_id) so retries with the same body do not double-count. Reusing the key with a different request body returns 409 idempotency_conflict (no PDF, no usage headers).

Body

application/json

Markdown source plus optional document metadata, font selection, page layout, viewer hints, style overrides, and page furniture. Only markdown is required; everything else falls back to safe defaults. When metadata.title is omitted the title is derived from the first Markdown heading; a document with no heading and no title is rendered without a title (no /Title) and is consequently not PDF/UA-1 conformant. Image references use standard Markdown URLs: data: is inline, http(s):// URLs are fetched by the service under strict security defaults (private-IP rejection always-on), and unsupported schemes are reported as render diagnostics. Local images can also be staged out of band and referenced from Markdown as blink://asset/<sha256>, where the handle is the base64url SHA-256 of the bytes; the bytes are fetched at render time and do not count toward the request input size limit. Staged images can also be laid out as pages — one per page or a grid — via the imageSequence option, without hand-authored Markdown. See components.examples.RenderRequest.Minimal, components.examples.RenderRequest.WithRules, components.examples.RenderRequest.WithImages, components.examples.RenderRequest.WithLocalAssets, components.examples.RenderRequest.WithImageSequence, components.examples.RenderRequest.WithOutline, components.examples.RenderRequest.WithHeadingNumbering, components.examples.RenderRequest.WithPageBackground, and components.examples.RenderRequest.WithFurniture for canonical request shapes.

Markdown source plus optional document metadata, font selection, page layout, viewer hints, style overrides, and page furniture. Only markdown is required; everything else falls back to safe defaults. When metadata.title is omitted the title is derived from the first Markdown heading; a document with no heading and no title is rendered without a title (no /Title) and is consequently not PDF/UA-1 conformant. Image references use standard Markdown URLs: data: is inline, http(s):// URLs are fetched by the service under strict security defaults (private-IP rejection always-on), and unsupported schemes are reported as render diagnostics. Local images can also be staged out of band and referenced from Markdown as blink://asset/<sha256>, where the handle is the base64url SHA-256 of the bytes; the bytes are fetched at render time and do not count toward the request input size limit. Staged images can also be laid out as pages — one per page or a grid — via the imageSequence option, without hand-authored Markdown. See components.examples.RenderRequest.Minimal, components.examples.RenderRequest.WithRules, components.examples.RenderRequest.WithImages, components.examples.RenderRequest.WithLocalAssets, components.examples.RenderRequest.WithImageSequence, components.examples.RenderRequest.WithOutline, components.examples.RenderRequest.WithHeadingNumbering, components.examples.RenderRequest.WithPageBackground, and components.examples.RenderRequest.WithFurniture for canonical request shapes.

markdown
string
required

Markdown source to render to PDF

Maximum string length: 262144
title
string

Convenience alias for metadata.title. When both are present metadata.title wins. Defaults to the first Markdown heading when neither is set

Required string length: 1 - 1024
Pattern: \S
metadata
object

PDF document metadata embedded in the rendered file. These fields are visible to anyone who opens the PDF — never include PHI, secrets, or other sensitive data.

fontStack
enum<string>[]

Ordered list of hosted font families; earlier families take precedence, later ones provide fallback coverage. Every family is available on every plan. When googleFontsUrl or googleFontsUrls is set, the Google family takes the body/heading slot and any weighted family in the stack is ignored (the stack then supplies only the emoji and code roles). Emoji families are appended automatically when omitted

Required array length: 1 - 4 elements
Available options:
inter,
lora,
source-serif-4,
noto-emoji-mono,
twemoji-mozilla,
jetbrains-mono
typography
object

Unified font selection: pool declaration/overrides, custom named roles, hosted heading variant policy, and per-family static weight maps for the four-variant PDF model. Body, heading, and per-depth heading families are assigned with rules (select + set.family); positional URL defaults apply otherwise

glyphFallback

A text family: a hosted weighted key, a declared Google Fonts display name, or a typography.named role reference

Allowed value: "inter"
googleFontsUrl
string

A single Google Fonts URL (alias of googleFontsUrls[0]). Do not pass together with googleFontsUrls. Accepted forms: CSS API (https://fonts.googleapis.com/css2?family=…), specimen (https://fonts.google.com/specimen/<Family>), or share (https://fonts.google.com/share?selection.family=…). Weight axes set the min/max endpoint weights fetched for the four-variant model. Up to 4 families per URL, and at most 4 in the merged pool across both URLs (two URLs do not raise the total)

Maximum string length: 2048
Pattern: ^https://fonts\.(googleapis|google)\.com/\S+$
googleFontsUrls
string[]

One or two Google Fonts URLs merged into a single family pool (max 4 distinct families). Default: first family of the first URL → body; first family of the second URL (or second family of the first URL) → heading. Use a rule set.family (or reorder URLs) to override

Required array length: 1 - 2 elements

A single Google Fonts URL (alias of googleFontsUrls[0]). Do not pass together with googleFontsUrls. Accepted forms: CSS API (https://fonts.googleapis.com/css2?family=…), specimen (https://fonts.google.com/specimen/<Family>), or share (https://fonts.google.com/share?selection.family=…). Weight axes set the min/max endpoint weights fetched for the four-variant model. Up to 4 families per URL, and at most 4 in the merged pool across both URLs (two URLs do not raise the total)

Maximum string length: 2048
Pattern: ^https://fonts\.(googleapis|google)\.com/\S+$
page
object

Page geometry and appearance: size (named preset or [width, height] in points), orientation, margins, and optional full-sheet background

viewer
object

PDF viewer hints — document language, page layout, page mode, and viewer preferences (toolbar/menubar visibility, fit-to-window, duplex, print scaling)

rules
object[]

Surgical presentation rules over standard Markdown nodes.

Maximum array length: 256
imageOverrides
object[]

Ergonomic per-image style overrides by position or exact URL, without authoring a full rules selector entry. For document-order indexing (true reading order across interleaved block and inline images), or for matching by anything other than an exact URL, use rules with select.nth/select.url and type: 'image' instead.

Maximum array length: 256
theme
string

Design preset resolved server-side to a fixed bundle of typography/page/furniture/numbering/rules, then merged under your own typography/page/furniture/rules (your values win per field; your rules win on conflicting cascade leaves). Picking a theme never lets the server read your Markdown — the bundle is deterministic, so the same source plus the same theme yields the same PDF. An unknown or malformed slug resolves to report-clean and never fails the request; the fallback is reported by resolvedTheme on /v1/render/validate and the x-render-theme-fallback response header on /v1/render. One of: report-clean, report-executive, report-data, blog-modern, blog-dark, blog-editorial, academic-classic, academic-modern, thesis, docs-light, docs-dark, api-reference, corporate, proposal, invoice.

Maximum string length: 64
Examples:

"report-clean"

"report-executive"

"report-data"

"blog-modern"

"blog-dark"

"blog-editorial"

"academic-classic"

"academic-modern"

"thesis"

"docs-light"

"docs-dark"

"api-reference"

"corporate"

"proposal"

"invoice"

numbering
object

Auto-numbering policy. Opt-in via enabled: true. Counters reset on the next deeper-depth heading and propagate across the document. Passing any of all, byDepth, depthRange, or trailingSeparator together with enabled: false returns 400 — those fields configure an active numbering policy, so they require enabled: true.

furniture
object

Page furniture (running headers and footers). slots applies to every page; set omitFirstPage: true to suppress furniture on the cover page, or pass firstPage to override the first page only. Set omitLastPage: true to suppress furniture on the closing page, or pass lastPage to override the final page only (when totalPages > 1). Optional pageOverrides supplies arbitrary per-page exceptions (later matches win per field). Optional watermark draws faint text behind body content. Optional decorations draws band rules such as masthead hairlines

outline
object

PDF outline (bookmarks). When omitted, an outline is emitted with the default depth range [1, 6] for any document containing headings. Pass depthRange alone to constrain depths. Set enabled: false to suppress the outline entirely. Passing depthRange together with enabled: false returns 400 — choose one intent.

imageSequence
object

Lay out staged images as pages without hand-authored Markdown: one per page or tiled in a grid, fit contain/cover, orientation: auto matching each page to its image. Defaults: fit is contain for one_per_page and cover for grid; orientation is auto; size is A4; padding is 0 (full-bleed). The sequence renders after the Markdown body; with empty markdown the document is the sequence alone. Each image still decodes against the per-render megapixel cap, so downscale very large folders or split them across renders. See components.examples.RenderRequest.WithImageSequence

pinRemoteImages
boolean

When true, each remote http(s):// image is fetched once and its bytes are reused on later renders of the same request, so repeated renders produce a byte-identical PDF even if the origin changes; reuse lasts up to 24 hours, after which the image is fetched again. Defaults to false, fetching every remote image fresh on each render.

Response

PDF bytes. Every successful render includes X-Render-Status (ok or degraded) and X-Render-Rendered-As-Requested (true when the PDF matches the requested content: no error-severity issues such as missing images or glyphs, and no image-fetch-skipped warnings). When issues occurred, X-Render-Diagnostics carries a base64url-encoded JSON array of objects with severity, code, message, optional resource and httpStatus, and help (a blinkpdf://reference/… URI). If the array was truncated to fit header size limits, X-Render-Diagnostics-Truncated is true (the header may be omitted when even a single entry cannot fit). When the request maps a font weight that the Google Fonts URL does not fetch, X-Render-Typography-Notes carries the same weight_not_in_fetch advisory (base64url JSON) that POST /v1/render/validate reports, so a direct render is not silent about it. Public free-plan API renders carry a non-removable bottom-center footer ("Made with Blink PDF" plus the Blink PDF brand mark); the response schema and status code are unchanged.

The response is of type file.