AdaPDF REST API & Integration Guide
Automate PDF accessibility compliance across your CMS, CI/CD deployment pipelines, and digital archives. Fully compliant with PDF/UA-1 (ISO 14289-1), WCAG 2.1/2.2 Level AAA, and Section 508.
1. Overview & Base URLs
The AdaPDF API operates as a secure REST interface accepting standard multipart/form-data and application/json payloads. All documents are remediated using a non-destructive tag tree engine, preserving original visual geometries, kerning, and images.
2. Authentication
Authenticate requests by including your secret API Key in the HTTP headers. We support both custom headers and standard Bearer tokens:
X-API-Key: ada_live_YOUR_SECRET_KEY
# Header Option B (Bearer Authorization):
Authorization: Bearer ada_live_YOUR_SECRET_KEY
3. Rate Limits & Quota Gating
Each API key is provisioned with a sliding-window rate limit of 60 requests per minute. If exceeded, the server returns 429 Too Many Requests with a Retry-After response header indicating seconds to wait.
Every processed page deducts 1 Page Credit from your balance. If your account runs out of credits, requests return 402 Payment Required with a link to top up.
4. Multi-Seat Organization Quotas
Under our Professional Plan (3 Team Member Seats) and Agency Plan (10 Team Member Seats), multiple developers and services can integrate with AdaPDF using their own accounts without sharing credentials:
Includes 600 shared pages/month. Up to 3 team members have separate API keys drawing from the same pool.
Includes 2,500 shared pages/month. Up to 10 team members collaborate with unattended folder and API access.
5. Endpoints Reference
/api/v1/unattended/remediate
Submit a PDF document for full accessibility remediation. Executes synchronously for documents up to 15 pages, or asynchronously for larger documents and whenever async=1 or webhook_url is specified.
Form Parameters (multipart/form-data):
file(Required): Binary PDF file.title(Optional): Document title injected into PDF/UA XMP metadata.lang(Optional, default 'en-US'): BCP-47 primary natural language code.default_alt(Optional): Fallback alt-text for untagged figures.enable_ocr(Optional): Set totrueto perform OCR on unsearchable scanned pages.async(Optional): Set to1to force asynchronous execution (returns 202 Accepted).webhook_url(Optional): Webhook destination URL invoked upon job completion.
Synchronous 200 OK Response:
{
"status": "success",
"doc_id": "8f3e1a02_budget.pdf",
"pages_processed": 6,
"pre_score": 42,
"post_score": 100,
"is_compliant_wcag_aa": true,
"download_url": "https://adapdf.io/download/remediated_8f3e1a02_budget.pdf",
"report_url": "https://adapdf.io/report/remediated_8f3e1a02_budget.pdf"
}
/api/v1/jobs/{job_id}
Poll status and retrieval links for asynchronous background jobs.
{
"job_id": "job_9f4e2b810ac3",
"status": "completed",
"total_pages": 48,
"completed_pages": 48,
"percent_complete": 100,
"post_score": 98,
"download_url": "https://adapdf.io/download/remediated_9f4e2b810ac3.pdf",
"report_url": "https://adapdf.io/report/remediated_9f4e2b810ac3.pdf"
}
/api/health
Liveness and readiness health probe.
{
"status": "ok",
"app": "AdaPDF Workbench",
"version": "1.2.1",
"database": "connected"
}
6. Webhooks
When you specify a webhook_url in your remediation request, AdaPDF delivers an HTTP POST request immediately upon job completion with the event remediation.completed:
{
"event": "remediation.completed",
"job_id": "job_9f4e2b810ac3",
"status": "completed",
"total_pages": 84,
"pre_score": 38,
"post_score": 98,
"download_url": "https://adapdf.io/download/remediated_budget.pdf",
"report_url": "https://adapdf.io/report/remediated_budget.pdf"
}
7. Implementation Examples
import requests
API_KEY = "ada_live_YOUR_KEY"
with open("minutes.pdf", "rb") as f:
resp = requests.post(
"https://adapdf.io/api/v1/unattended/remediate",
headers={"X-API-Key": API_KEY},
files={"file": f},
data={"title": "City Council Minutes", "lang": "en-US"}
)
print(resp.json())
curl -X POST https://adapdf.io/api/v1/unattended/remediate \
-H "X-API-Key: ada_live_YOUR_KEY" \
-F "[email protected]" \
-F "title=City Council Minutes" \
-F "lang=en-US"
8. Native CLI & Hot-Folder Watcher
For terminal servers and unattended folder monitoring, use the included CLI tool:
# Audit a PDF from the terminal
python -m ada_pdf.cli audit document.pdf --json
# Batch remediate a directory of files
python -m ada_pdf.cli batch ./input_folder -o ./output_folder
# Continuous hot-folder watcher daemon
python -m ada_pdf.cli unattended --input-dir /mnt/inbox --watch
9. Status Codes Reference
| Code | Status | Meaning & Solution |
|---|---|---|
200 |
OK | Document remediated synchronously. Download link ready. |
202 |
Accepted | Asynchronous remediation task queued. Poll status URL. |
401 |
Unauthorized | Invalid or missing API key. Verify X-API-Key header. |
402 |
Payment Required | Insufficient page quota. Upgrade subscription or top up credits. |
422 |
Unprocessable | Document is password-protected or DRM encrypted. |
429 |
Too Many Requests | Rate limit exceeded (>60 req/min). Wait for Retry-After. |