application/problem+json). The shape:
status and on the code inside errors. The code strings are stable; title/detail/message are for humans and may be reworded. (Responses also carry a type URI, per the RFC 7807 default for the status code.)
Status codes at a glance
| Status | Meaning | code(s) | errors array? |
|---|---|---|---|
400 | Malformed or incomplete request | — | no |
401 | Authentication failed | — | no |
402 | Monthly quota reached | quota.exceeded | yes |
413 | Request body too large | — | no |
422 | Template unusable | template.* | yes |
429 | Rate limit / playground cap | rate_limit.exceeded | yes |
500 | Unexpected server error | — | no |
400 Bad Request
Two cases, distinguished bytitle:
The body isn’t valid JSON, or can’t be parsed into a template. Malformed JSON, wrong field types, or a missing/unknown node type — an unknown type is rejected here by the parser, before validation. detail carries the parser’s message.
template field.
errors array. Fix the request shape and retry.
A missing
data is not a 400 — data defaults to empty, so the request proceeds and any unfilled {{tokens}} surface as a 422 missing-data (or it renders, if the template has no tokens).401 Unauthorized
The API key is missing, malformed, or revoked. The response carries aWWW-Authenticate: Bearer header; the body is a Problem Details document without an errors array, so branch on the status code. The request never reaches the renderer, so no quota or rate budget is spent.
See Authentication.
402 Payment Required
Your plan’s monthly document quota is used up. The request is blocked, not billed — Tipar never charges overage you didn’t choose.413 Payload Too Large
The request body exceeded the cap — 4 MB for/generate, 256 KB for the playground. Almost always an oversized base64 image; downscale it before encoding.
422 Unprocessable Entity
The body was valid JSON and well-formed, but the template couldn’t produce a document. This is the error you’ll meet while building templates. Every problem is reported at once, so one response shows everything to fix. Thecode tells you which kind:
- Missing data
- Structural
- Render failure
A Fix: add the missing fields to
{{path}} in the template has no matching value in data. One entry per missing path; the path is in message.data, or correct the path in the template.Render failures surface as
422, not 500. A genuine 500 from /generate is rare and should be treated as a bug — please report it.429 Too Many Requests
You exceeded a rate limit. The response carries aRetry-After header (seconds).
Retry-After seconds and retry.
500 Internal Server Error
An unexpected server-side failure. Recoverable template and render problems are reported as4xx (mostly 422), so a 500 is unusual — retry, and if it persists, check status or report it.
Handling errors well
Branch on code, show message
Switch on
status and errors[].code in code; surface message/title to humans.Respect Retry-After
On
429, wait the header’s seconds before retrying rather than hammering.Treat 422 as a dev-time signal
Missing-data and structural
422s mean a template/data mismatch — fix the template, not the runtime.Don't retry 4xx blindly
400/401/402/422 won’t succeed on retry without a change. Only 429 (and transient 500) are worth retrying as-is.