Document Recognition API
One cent per document, the same price at any volume, and charged only when a document is actually recognised: every response carries a billed flag, and…
Developer tools#documents--productivity
Fork copies the collection into your workspace, without the publisher's secrets, so you can add your own key and send requests. Star saves it to your starred APIs (Account › Marketplace) and helps others find it.
Overview
One cent per document, the same price at any volume, and charged only when a document is actually recognised: every response carries a billed flag, and no_document_found, unreadable, unsupported_document and rejected cost nothing. Every account gets 100 free documents every month, used before paid credits; after those, each recognised document costs one cent.
This document is generated from the Zod schemas in packages/contracts and the routes in apps/api (pnpm generate); it is the source of truth for the public API. Types, documentation, SDKs and contract tests are derived from it. Do not edit it by hand: change the schemas or routes and regenerate.
Endpoints 6
scans
- GETList recent scans
/v1/scansThe account's scans, most recent first, as history rows, one page at a time. Only scans made with a live key and kept under a non-zero retention window are… - POSTRecognize a document
/v1/scansRuns recognition synchronously on one image and returns the extracted data. One credit is charged only when the scan is billable, drawn from the month's free… - GETFetch a previous scan
/v1/scans/:idReturns a scan made earlier with a live key and kept under a non-zero retention window, while that window lasts; anything else is 404. The image crops are… - DELETEDelete a stored scan
/v1/scans/:idDeletes a scan the account still holds, before its retention window would have ended: the stored result, its history row and its thumbnail. It cannot be…
account
- GETBalance and usage for the current period
/v1/usageThe credits available to the key's account and the scans made in the current usage period, counted by status. The balance has two parts: the free credits, 100…
client tokens
- POSTIssue a short-lived client token
/v1/client-tokensIssues a client token: a short-lived credential that can call POST /v1/scans and nothing else. Call it from your server with your API key and hand the token…
API details
- Base URL
https://api.doc.cheap- Authentication
- A bearer token in the Authorization header
- Operations
- 6 operations on 4 pathsGET 3POST 2DELETE 1
- Main resources
- scans 4account 1client tokens 1
- Response formats
application/json- Description format
- OpenAPI 3.1.0, API version
1.94.3 - Links
- OpenAPI document
- Listed from
- Doc's published OpenAPI description
How to test the Document Recognition API in Swastik Codes
- Open the APISelect “Fork & run in Swastik Codes” on this page. Sign in or create a free account if asked.
- Fork it into your workspaceChoose a workspace. You get your own copy of the Document Recognition API collection, without the publisher's secrets.
- Add your credentialsThis API uses A bearer token in the Authorization header. Add yours in the collection's variables or an environment; the requests already reference it.
- Send a requestPick an endpoint, for example “List recent scans” (GET /v1/scans), and press Send. Check the response, add tests and run the whole collection with the runner.
Frequently asked questions
What is the Document Recognition API?
One cent per document, the same price at any volume, and charged only when a document is actually recognised: every response carries a billed flag, and… It is listed under Developer tools and has 6 endpoints.
Who publishes the Document Recognition API?
It is listed from Doc's public API description (an OpenAPI document), not published by Doc on Swastik Codes. Anyone who controls doc.cheap can claim the profile by adding a DNS TXT record.
What is the base URL of the Document Recognition API?
Requests go to https://api.doc.cheap. Endpoint paths are added to this base URL.
How do I authenticate with the Document Recognition API?
With A bearer token in the Authorization header.
How many endpoints does the Document Recognition API have?
6 operations on 4 paths (3 GET, 2 POST, 1 DELETE). The largest groups are scans, account, client tokens.
Is forking the Document Recognition API free?
Yes. Forking copies the collection into your workspace for free. It has been starred 0 times and forked 0 times.