PDF/UA validator
Send a PDF and get every PDF/UA-1 or PDF/UA-2 failure in it, each with its veraPDF rule id.
To fix a PDF, use Remediate.
POST https://api.fare.dev/v1/pdf/validate
Request
Send your key in the X-API-Key header and the PDF as the raw request body, up to 50 MB.
| Name | Required | What it is |
|---|---|---|
| profile | Nooptional | ua1 for PDF/UA-1, ua2 for PDF/UA-2, or auto. Without one, we use the part the file claims in its metadata, and PDF/UA-1 if it claims none. |
| body | Yesrequired | The PDF file itself, sent as the request body with Content-Type: application/pdf. |
Try it
Each successful call costs 2¢. A call that fails isn't billed.
curl -X POST "https://api.fare.dev/v1/pdf/validate?profile=ua1" \
-H "X-API-Key: $FARE_KEY" \
-H "Content-Type: application/pdf" \
--data-binary @report.pdf
{
"profile": "PDF/UA-1",
"compliant": false,
"failed_rules": ["7.1-t03", "7.3-t01"],
"violations": [
{ "rule": "7.1-t03", "message": "Content is neither tagged nor marked as an Artifact." },
{ "rule": "7.3-t01", "message": "Figure has no Alt or ActualText." }
],
"rule_set": "veraPDF validation profiles"
}
What you get back
| Field | What it is |
|---|---|
| profile | The part checked: PDF/UA-1 or PDF/UA-2. |
| compliant | true when no rule failed. |
| failed_rules | The ids of the rules that failed, each listed once. |
| violations | Each failure, with its rule id and a message. Repeats of one rule stop at 50. |
| rule_set | Where the rule ids come from: the veraPDF validation profiles. |
How validation works
Our own engine reads the file's structure and checks it against the PDF/UA rules. Rule ids follow the veraPDF validation profiles, so results compare directly with veraPDF. A file gets 60 seconds.
| Profile | Checks |
|---|---|
| ua1 | PDF/UA-1 (ISO 14289-1) |
| ua2 | PDF/UA-2 (ISO 14289-2) |
| auto | The part the file claims |
Errors
| Status | Code | Message |
|---|---|---|
| 400 | not_pdf | Send the PDF file as the request body. |
| 400 | invalid_profile | profile must be ua1, ua2 or auto |
| 413 | file_too_large | The body is larger than 50 MB. |
| 422 | unreadable_pdf | The file could not be read as a PDF. |
| 504 | timeout | Validation took longer than 60 seconds. |
| 401 | missing_key | Send your API key in the X-API-Key header. |
| 401 | invalid_key | That API key is not valid. |
| 402 | payment_required | Add a card at https://fare.dev/app/billing to use this key. |
| 429 | rate_limited | This key allows 10 requests per second. |
None of these are billed. Branch on the code, not the message: codes never change meaning within /v1.
For agents
The MCP tool validate_pdf_ua takes a public https url or pdf_base64, and an optional profile. It runs this same call on the key your agent connects with, and it's billed the same way.
claude mcp add --transport http fare https://api.fare.dev/mcp