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.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | http(s) URL of the PDF or image | |
| pages | No | Page range like '1-20,25'. Default: all pages. | |
| output | No | Output format. Default markdown. | |
| max_pages | No | Refuse (with the numbers) if selection exceeds this many pages. | |
| max_cost_usd | No | Refuse (with the numbers) if the run would cost more than this. |