Skip to main content
POST
Render a sandwich document

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.

Body

application/json

Sandwich document: a first-page header (logo, professional identity, subject and document context), a Markdown body, and a last-page footer (optional signature, divider, professional name). Image assets (logo, signature) are inlined as data: URLs. Page-1 body clearance uses a flow offset for the header band; bottom margins reserve the repeating page-footer band and, when the last-page signature would not fit under the body, the signature band as well.

Sandwich document: a first-page header (logo, professional identity, subject and document context), a Markdown body, and a last-page footer (optional signature, divider, professional name). Image assets (logo, signature) are inlined as data: URLs. Page-1 body clearance uses a flow offset for the header band; bottom margins reserve the repeating page-footer band and, when the last-page signature would not fit under the body, the signature band as well.

markdown
string
required

Markdown source rendered as the body between header and footer

Maximum string length: 262144
metadata
object
required

PDF document metadata embedded in the rendered file. Visible to any reader of the PDF — never include confidential or sensitive personal data, secrets, or other sensitive information.

header
object
required

First-page header band content

Last-page footer band content

fontStack
enum<string>[]

Ordered list of hosted font families for the cascade. Exactly one weighted body/heading family is required (for example inter, lora, or source-serif-4). Emoji families (noto-emoji-mono, twemoji-mozilla) are appended automatically when omitted so emoji glyphs always render; optional jetbrains-mono supplies the code role. Every hosted family is available on every plan. This route does not accept Google Fonts URLs.

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

Page geometry and appearance for the output PDF, including optional full-sheet background. The sandwich-document template supplies defaults of size "Letter" and 2 cm margin when these fields (or the whole page object) are omitted; explicit values override the defaults for their respective fields.

Response

PDF bytes. Metered like POST /v1/render (usage, spend-cap, tier rate/concurrency). Diagnostics via X-Render-Status / X-Render-Diagnostics. X-Template-Version is 1.0.0. Successful responses include wall-clock X-Render-Ms. Template routes do not use the process-local 60s PDF LRU, so X-BlinkPDF-Cache is not set.

The response is of type file.