Docs
Reference
Limits, errors, and the files that describe the API. Look things up here when you need them.
1.0 What are the limits?
- Files: JPEG, PNG, TIFF, or WebP, up to 20 MB each. A TIFF has one page; a WebP is a still image.
- A job has up to 200 pages.
- A page that fails or is cancelled costs nothing.
- Each API key can have its own limits in credits: a read, a job, and a day.
GET /v1/models lists the models with their price in credits a page and their limits. GET /v1/packs lists the credit packs. Both are public.
GET /v1/account shows the balance, the credits reserved for running jobs, and the limits of your key. GET /v1/usage lists every change, newest first.
2.0 What if a call fails?
Every error has a field called next. It tells your program what to do. Errors are application/problem+json with code, detail, request_id, and next.
next | What to do | Example codes |
|---|---|---|
retry_after | Wait for Retry-After seconds, then send the same request again. | rate_limited, service_busy, page_not_ready |
top_up | Buy credits. | insufficient_credits |
raise_limit | Use a key with a higher limit, or split the work. | spend_limit_exceeded |
new_quote | Ask for a new quote. | quote_expired, quote_used |
finalize_upload, upload_again | Finalize the upload, or upload the file again. | upload_not_finalized, upload_mismatch |
shrink_file, split_job | Send a smaller file, or fewer pages in one job. | file_too_large, too_many_pages |
authenticate, use_other_key | Send a valid key, or a key with the needed scope. | unauthenticated, forbidden_scope |
fix_request | Change the request. Sending it again unchanged fails again. | invalid_request, not_found |
An object of another account answers the same 404 not_found as an id that does not exist.
A failed page has error.code: image_unreadable, image_too_large, image_multiple_pages (a multi-page TIFF or an animated WebP), image_mismatch, reader_failed, or reader_timeout.
3.0 What does a waiting page show?
While a page waits for a reader, the page and its job carry a wait object. When the reader starts the page, wait goes away. Lists of jobs and pages do not include it.
| Field | Meaning |
|---|---|
reason: reader_starting | No reader is ready, and one is starting. A cold start often takes 1.5 to 2.5 minutes. |
reason: reader_busy | Readers are up, and the page waits in their queue. |
since | When the page was sent to the reader. |
estimate_seconds | Seconds until the reader starts the page. It is an estimate, not a promise. It is at least 10 for reader_starting and null for reader_busy. |
Poll at the interval in the Retry-After header.
4.0 How do I send a correction?
A correction is a corrected text of a page that the API read. With it, you give us the page image, our reading, and your text to improve our models. Send a correction only after the account holder accepted the contribution terms.
POST /v1/jobs/{id}/pages/{n}/correctionswith{"text":{"sha256":"<hex>","bytes":N},"terms":"contribution-1"}. The page must have succeeded, and its files must still exist.- Send the UTF-8 text with
PUTtoput_url, with exactlyput_headers. POST /v1/corrections/{id}/finalize. The correction is nowstored. A newer correction of the same page replaces it.
GET /v1/corrections lists your corrections. DELETE /v1/corrections/{id} withdraws one, and DELETE /v1/corrections withdraws all. We delete the copies within 24 hours.
5.0 Where is the full contract?
- openapi.yaml: every path, parameter, and schema (OpenAPI 3.1).
- page-result-1.json: the JSON Schema of a page result. The paths
/v1/jobs/{id}/pages/{n}/textand…/resultredirect to the links of a page. - llms.txt: a short summary for agents.
- Questions and reports of abuse: contact@13fragments.com.
Next: Glossary