Render limits and error codes
pdfrender's limits and error codes, from 400 external_resource_blocked to 504 render_timeout, with the fix for each.
Last updated
| Limits per render | 2 MB of HTML, 50 pages, 20 s with a key, 8 s without |
|---|---|
| Other input limits | 256 KB through the MCP tool, 100 KB in the free tool |
Every error is application/problem+json with a stable code member.
Branch on code, because the detail text can change.
| Status | code |
Cause | Fix |
|---|---|---|---|
| 400 | external_resource_blocked |
The HTML references http(s), file or ftp URLs or uses @import; detail lists them |
Inline them as data: URIs (how) |
| 413 | html_too_large |
The html field is over 2 MB of UTF-8 |
Shrink inlined images and fonts |
| 422 | too_many_pages |
The layout has more than 50 pages | Split the document |
| 422 | validation_error |
html is empty or the body is not valid JSON; errors names the field |
Fix the request body |
| 504 | render_timeout |
The render took over 20 s with a key or 8 s without, including time in the queue | Split or shorten the document |
| 500 | render_failed |
The renderer failed on this document | Retry once, then simplify the document |
| 429 | rate_limited |
The per-minute limit is used up | Wait for Retry-After seconds |
| 429 | daily_limit |
The 10 free renders a day without a key are used up | Send an API key, or wait for Retry-After seconds |
| 429 | render_busy |
Without a key, one render runs at a time, and another one is running | Retry in a few seconds, or use an API key |
| 402 | credits_exhausted |
The month's credits and the day's free renders are spent | See plans |
| 403 | feature_not_available |
pdf_variant was set without a paid plan |
Open upgrade_url, or leave out pdf_variant |
| 503 | service_unavailable |
A backend service is down | Retry later |
Relative URLs are the one silent case: they are dropped without an error. The free tool shows its errors as text on the page.
Next step
FAQ
- Am I charged for a failed render?
- No. Rejected and failed calls cost no credits. Only a delivered PDF costs 1 credit.
- What is the maximum number of pages in one PDF?
- 50 pages, counted after layout. A longer document fails with status 422 (too_many_pages).