Renders a PDF synchronously. The connection stays open until the file is ready (up to the render timeout). The response body is raw PDF bytes, not JSON.
Request
Path parameters
ID of your template from the dashboard or Studio URL.
Your API key. You can use Authorization: Bearer <key> instead.
Must be application/json.
Body
JSON object whose keys match the placeholders in your template. Example: { "customer": { "name": "Acme" } }.
Same data as a JSON string (escaped JSON). Use either data or jsonData. If both are sent, jsonData wins.
Response
HTTP 200: PDF file
Successful responses are binary PDF, with headers similar to:
Content-Type: application/pdf
Content-Disposition: attachment; filename="your-template-name.pdf"
Cache-Control: no-store
Error responses
JSON shape (except some low-level failures):
{
"error": "Short explanation."
}
Some responses also include hint, and quota exhaustion returns used, limit, remaining, and resetAt. See Errors.
| Status | When |
|---|
| 400 | Bad JSON, or data / jsonData not a plain object |
| 401 | Missing or invalid API key |
| 404 | Template not found or not owned by your account |
| 413 | Body or field exceeds size limits |
| 422 | Template or data breaks complexity rules |
| 429 | Rate limit, monthly page quota, or transient render-service queue saturation |
| 500 | Internal server error |
| 502 | PDF service unavailable |
| 504 | Render took too long |
Examples
curl -X POST https://pdfgorilla.io/api/v1/templates/TEMPLATE_ID/generate \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"data": {"customer": {"name": "Acme Corp"}}}' \
--output out.pdf
Rate limits
| Identity | Sync generate |
|---|
| API key | 60 per minute |
| Dashboard session | 20 per minute |
Job quotas and payload limits are described in Limits.