Building inside an AI agent like Claude Code or Codex? Skip the glue code entirely — connect the Blink PDF MCP server and your agent renders PDFs in plain language with
render_pdf, plus tools to validate a body, stage images, and list themes and fonts. The patterns below cover the REST-based pipeline.Why LLM Output Maps Perfectly to Blink PDF
LLMs are trained on Markdown-heavy corpora and default to it whenever they generate structured content — reports, summaries, analyses, and proposals all arrive pre-formatted with headings, bullet lists, bold text, and tables. Blink PDF’s/v1/render endpoint accepts that Markdown directly as a JSON string, so the integration is essentially zero-glue:
- Prompt your model to produce a Markdown document.
- Take
response.choices[0].message.content(or the Claude equivalent). - POST it to
/v1/render. - Receive a ready-to-use PDF binary.
Your Markdown input is never persisted — it’s processed in memory and discarded when the response closes. Generated PDFs and any staged assets are purged within 24 hours. This makes the pipeline safe for sensitive AI outputs such as legal summaries, financial analyses, and medical drafts. See Zero Retention.
Basic Pattern
Code Examples
Agentic Workflows
When you’re building autonomous agents that produce multiple documents across a workflow run, a few patterns help you stay efficient and within your rate limits.Async Batch Generation
If your agent produces several reports in one run, fire the render requests concurrently rather than sequentially. At Pro plan (120 req/min) you can sustain roughly two renders per second without hitting limits. See the Batch Processing guide for a full async example.Prompt Engineering for Clean PDFs
Guide the model to produce render-ready Markdown by adding explicit instructions in your system prompt:Streaming + Buffering
If you use OpenAI’s streaming API to display content progressively in a UI, buffer the full completion before sending it to/v1/render. Blink PDF requires the complete Markdown document in a single request.
Connecting to Notion, Obsidian, and Tiptap
Blink PDF integrates well with editor-based AI workflows:- Notion AI — Export Notion page content as Markdown via the Notion API, then render with Blink PDF to produce a shareable PDF snapshot.
- Obsidian — Use the Obsidian Local REST API plugin or a community plugin to pipe vault notes to
/v1/renderon demand. - Tiptap — Convert Tiptap’s JSON document model to Markdown using
@tiptap/extension-markdown, then pass the string directly to Blink PDF.
Plan Considerations
On every plan, your Markdown input is never persisted; generated PDFs and staged assets are purged within 24 hours. See Pricing for render-unit allowances.