Skip to content

Getting Started

Bindery Press is a cloud rendering API. You send a template and data, and get back a rendered document as PDF, PNG, ZPL, or HTML.

Base URL:

https://api.binderypress.dev

Sign in to the Bindery Press dashboard and navigate to Settings > API Keys. Create a new key — you’ll get a key that starts with bp_sk_live_ or bp_sk_test_.

Send a POST request to /v1/render with an inline template and data:

Terminal window
curl -X POST https://api.binderypress.dev/v1/render \
-H "Authorization: Bearer bp_sk_test_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"template": {
"formatVersion": 1,
"meta": { "name": "Hello World" },
"dimensions": { "width": "4in", "height": "2in" },
"elements": [
{
"id": "greeting",
"type": "text",
"position": { "mode": "absolute", "x": "10mm", "y": "10mm" },
"width": "80mm",
"height": "20mm",
"content": { "expression": "\"Hello, \" + data.name + \"!\"" },
"style": { "fontSize": "24pt", "fontWeight": "bold" }
}
]
},
"data": { "name": "World" },
"format": "pdf"
}'

The response includes a URL to download the rendered document:

{
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"status": "complete",
"format": "pdf",
"url": "https://api.binderypress.dev/v1/render-outputs/a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"sizeBytes": 12345,
"renderTimeMs": 450
}

Fetch the document from the url field. The output is available for 7 days.

Terminal window
curl -H "Authorization: Bearer bp_sk_test_YOUR_KEY" \
"https://api.binderypress.dev/v1/render-outputs/a1b2c3d4-e5f6-7890-abcd-ef1234567890" \
-o hello.pdf

Instead of sending the full template every time, save templates in the dashboard and reference them by ID:

Terminal window
curl -X POST https://api.binderypress.dev/v1/render \
-H "Authorization: Bearer bp_sk_live_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"templateId": "your-template-id",
"data": { "name": "World" },
"format": "pdf"
}'