A REST API and an MCP server. Render thousands of docs from your code, your AI agent, or your CRM in three lines.
All API requests require a platform API key sent in the
X-API-Key
header. API access is available on the Pro plan and above.
Create and manage keys in Settings, Platform API Keys.
Keys use the format
br_live_.... The full key is shown only once at creation time. Store it
securely.
curl -X POST https://api.bulkrender.com/api/documents/generate \ -H "Content-Type: application/json" \ -H "X-API-Key: YOUR_MCP_TOKEN_HERE"
/api/documents/generate
Generate a single document from a template. Pass the template ID and a data object with key-value pairs matching your template variables.
| Field | Type | Required | Description |
|---|---|---|---|
| templateId | string (uuid) | Yes | Template to generate from |
| data | object | Yes | Key-value pairs for template variables. For loop blocks, use arrays of objects. |
| outputFormat | string | No | "docx" (default, 1 credit) or "pdf" (2 credits) |
| name | string | No | Custom filename. Auto-generated if omitted. |
| recipientEmailField | string | No | Field name in data containing recipient email for auto-delivery. Defaults to "email". |
curl -X POST https://api.bulkrender.com/api/documents/generate \
-H "Content-Type: application/json" \
-H "X-API-Key: YOUR_API_KEY" \
-d '{
"templateId": "c5f2e8a1-...",
"data": {
"name": "John Doe",
"company": "Acme Inc",
"items": [
{ "product": "Widget", "quantity": "10", "price": "$9.99" }
]
},
"outputFormat": "docx"
}'
{
"status": "success",
"data": {
"id": "d4e5f6a7-...",
"name": "Invoice - John Doe",
"file_type": "docx",
"file_size": 24832,
"downloadUrl": "https://s3.amazonaws.com/your-bucket/docs/Invoice-John-Doe.docx?X-Amz-Expires=3600&...",
"created_at": "2026-05-17T10:30:00.000Z",
"expires_at": "2026-06-16T10:30:00.000Z"
}
}
downloadUrl in the response is
a signed download link that expires in 1 hour. The underlying
file remains stored for your plan's retention period. Call
GET /documents/:id again to get
a fresh URL.
/api/documents/generate-batch
Generate multiple documents from the same template. Each record in the array produces one document. The result is a downloadable ZIP archive.
| Field | Type | Required | Description |
|---|---|---|---|
| templateId | string (uuid) | Yes | Template to generate from |
| records | array | Yes | Array of data objects, one per document |
| outputFormat | string | No | "docx" (default) or "pdf" |
| recipientEmailField | string | No | Field name for per-record email delivery |
| Plan | Max Records per Batch |
|---|---|
| Pro | 100 |
| Enterprise | 500 |
| Custom | 1,000 |
curl -X POST https://api.bulkrender.com/api/documents/generate-batch \
-H "Content-Type: application/json" \
-H "X-API-Key: YOUR_API_KEY" \
-d '{
"templateId": "c5f2e8a1-...",
"records": [
{ "name": "Alice Smith", "email": "alice@example.com" },
{ "name": "Bob Jones", "email": "bob@example.com" }
],
"outputFormat": "docx",
"recipientEmailField": "email"
}'
{
"status": "success",
"data": {
"batchId": "b8c9d0e1-...",
"downloadUrl": "https://s3.amazonaws.com/your-bucket/batches/batch-b8c9d0e1.zip?X-Amz-Expires=3600&...",
"count": 2,
"totalSize": 49152,
"documents": [
{ "name": "Alice Smith", "key": "...", "size": 24576 },
{ "name": "Bob Jones", "key": "...", "size": 24576 }
],
"deliverySummary": { "sent": 2, "failed": 0, "skipped": 0 }
}
}
All API responses follow a consistent JSON structure.
{ "status": "success", "data": { ... } }
{ "status": "error", "message": "Description of what went wrong" }
Generation endpoints return credit information in response headers:
| Header | Description |
|---|---|
| X-Credits-Used | Credits consumed by this request |
| X-Credits-Remaining | Credits remaining after this request |
The API uses standard HTTP status codes. Errors always return
a JSON body with
status: "error"
and a
message
field.
| Code | Meaning | Common Causes |
|---|---|---|
| 400 | Bad Request | Missing templateId or data, data payload too large (>1MB), batch size exceeds plan limit |
| 401 | Unauthorized | Missing X-API-Key header, invalid or expired API key |
| 403 | Forbidden | Insufficient credits, permission denied (role too low) |
| 429 | Too Many Requests | Rate limit exceeded (30 requests/minute) |
| 500 | Server Error | Internal error during document generation |
HTTP/1.1 403 Forbidden
{
"status": "error",
"message": "Insufficient credits. You need 2 credits for PDF. You have 0 credits."
}
API requests are rate-limited to 30 requests per minute per organization. The limit applies across all API keys in your organization.
Rate limit headers are included in every response:
RateLimit-Limit,
RateLimit-Remaining,
RateLimit-Reset.
Each document generation costs credits based on format:
| Format | Cost | Notes |
|---|---|---|
| docx | 1 credit | Native Word format |
| 2 credits | Includes DOCX generation + PDF conversion |
For batch requests, total credits = number of records × credit cost per format. Example: 50 PDF documents = 100 credits.
To safely retry requests without generating duplicate
documents, include an
Idempotency-Key
header with a unique value (e.g., a UUID).
If the same key is sent again within 24 hours, the API returns the original response instead of generating a new document. No additional credits are charged.
curl -X POST https://api.bulkrender.com/api/documents/generate \
-H "Content-Type: application/json" \
-H "X-API-Key: YOUR_API_KEY" \
-H "Idempotency-Key: 550e8400-e29b-41d4-a716-446655440000" \
-d '{ "templateId": "c5f2e8a1-...", "data": { "name": "John Doe" } }'
BulkRender ships a native MCP server so you can generate documents directly from Claude, Cursor, Windsurf, Cline, or any MCP-compatible assistant. No API calls, no boilerplate — just ask.
Go to Settings, Integrations, open the AI Assistants section, and click Generate MCP URL. Copy it immediately — it is only shown once.
Add to your app's MCP config file. Paste your MCP URL directly — no environment variables needed:
{
"mcpServers": {
"bulkrender": {
"url": "https://mcp.bulkrender.com/mcp/YOUR_MCP_URL"
}
}
}
Go to Settings, Integrations, Add MCP and paste your MCP URL.
claude mcp add bulkrender --scope user -- npx mcp-remote YOUR_MCP_URL
Verify:
claude mcp list
should show
bulkrender ✓ Connected
| Tool | Description | Credits |
|---|---|---|
| list_templates | List all templates with their variable schemas | 0 |
| get_template | Get template details and variable schema | 0 |
| generate_document | Generate a single document (DOCX or PDF) | 1-2 |
| generate_batch | Generate documents for multiple records (up to 500) | 1-2 each |
| check_credits | Check remaining credits | 0 |
| refresh_document_url | Get a fresh signed download URL for an existing document | 0 |
| create_template_from_docx | Create a reusable template from a DOCX URL | 0 |
| submit_feedback | Report feature requests or issues to the support team | 0 |
DOCX = 1 credit. PDF = 2 credits. Rate limit: 30 requests/min per organisation.
Agents with no BulkRender account can generate documents and pay per session. Connect using the public MCP URL — no API key needed:
https://mcp.bulkrender.com/mcp/acp
| Tool | Description | Cost |
|---|---|---|
| acp_list_public_templates | List 5 built-in templates (invoice, quote, contract, report, proposal) with field names | Free |
| acp_create_session | Create a checkout session. Pass records[] with one data object per document. Returns checkout_url for browser payment | - |
| acp_get_session | Poll until completed. Returns download_url per doc and zip_download_url (24h expiry) | Free |
| submit_feedback | Report feature requests or issues to the support team | Free |
Pricing: $0.10/credit. DOCX = 1 credit, PDF = 2 credits. Minimum charge $1.00 (covers up to 10 DOCX or 5 PDF docs). Unused credit is yours if you sign up.
The assistant calls
list_templates
to find the template, then
generate_document
or
generate_batch, and returns a signed download URL valid for 1 hour.