ocr
v0.1.0Read PDFs and images as markdown or text, with exact costs and hard spend caps.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
read_document
Read a document (PDF or image) from a URL and return its contents as markdown (tables preserved) or plain text. Costs $0.00075 per page, billed to the PennyOCR account; the response includes the exact cost_usd and per-page citations. Use estimate_cost first for big documents. Supports page ranges and hard spend caps.
| Parameter | Type | Description |
|---|---|---|
url * | string | http(s) URL of the PDF or image |
max_cost_usd | number | Refuse (with the numbers) if the run would cost more than this. |
max_pages | integer | Refuse (with the numbers) if selection exceeds this many pages. |
output | string | Output format. Default markdown. |
pages | string | Page range like '1-20,25'. Default: all pages. |
estimate_cost
Free: return the page count and exact cost_usd to read a document URL with read_document, without running OCR. Use before reading large documents.
| Parameter | Type | Description |
|---|---|---|
url * | string | http(s) URL of the PDF or image |
pages | string | Optional page range like '1-20'. |