Guides
Each guide here is one task, start to finish, with a complete program you can copy into a file and run. They assume you have an API key, or that you are happy to start on the keyless trial. Nothing is a fragment: every script builds a payload, calls the API, handles the error case, and does something real with the file that comes back.
If you have never rendered anything, read the quickstart first — it is three minutes and one curl command. Come back here when you want the version that runs in your own codebase.
The guides
Section titled “The guides”In your codebase
A complete program you can paste into a file and run. No SDK, no dependencies.
- Node Generate a PDF invoice from JSON in Node A complete dependency-free Node 22 script that renders the invoice template to PDF, handles validation errors, saves the file, and shows the cache hit.
- Python Generate a PDF invoice from JSON in Python A complete Python 3.9 script using only urllib that renders an invoice PDF, handles validation errors, saves the file, and shows the cache hit.
In your agent
Hand a model the render tool and let it read the template contract for itself.
- Claude Code Give Claude Code a PDF tool Connect the Galley MCP server to Claude Code in one command, render keyless, then add a key and share the config with your team.
- OpenAI Agents Give an OpenAI Agents SDK agent a PDF tool A complete Python agent that renders PDFs through the Galley MCP server, plus a plain function-tool version that calls the REST API directly.
- LangGraph Give a LangGraph agent a PDF tool A complete LangGraph agent with a render_document tool over the REST API, wired into a ReAct agent and a StateGraph that carries the signed URL.
In your automation
One HTTP step in a workflow you already have, field by field.
- n8n Add a PDF step to an n8n workflow Configure n8n's HTTP Request node to render a PDF with Galley, map fields from the previous node, download the file and attach it to an email.
- Zapier Add a PDF step to a Zap Configure Webhooks by Zapier to render a PDF with Galley, map trigger fields, and build a nested line_items array with Code by Zapier.
Migrating
What it costs to keep running your own browser, and how to stop.
What these assume
Section titled “What these assume”- The base URL is
https://api.galleyrender.comand your key goes inAuthorization: Bearer glr_sk_…. - The starter library —
invoice,quote,receipt,certificate,og-card,report-table,shipping-labeland fifteen more — is already on your account, including a trial account. You do not have to create a template to follow any of these. - Signed URLs expire in an hour. The stored object does not;
GET /v1/renders/:idhands back a fresh URL.
What next
Section titled “What next”- Quickstart — your first render, in one request.
- Template gallery — the twenty-two starter templates and their schemas.
- Render API reference — every field on the request and the response.