# PDF to Markdown OCR API > Send a PDF, get Markdown text back, one result per page. Pay per page from prepaid credit > ($1.00 per 1,000 pages, $0.50 for batch; $0.01 minimum per document). Use it when a program or agent needs the text of a PDF as Markdown: born-digital PDFs and clean scans of printed text. Uploads only; it never fetches URLs. Honest status: early test service on one CPU server. The current engine is Tesseract (cpu:tesseract 5.3.4) with a simple layout pass (headings, tables, two-column reading order). It reads clean printed text well. It does not handle handwriting, math, or complex layouts as well as vision-language OCR models; a GPU model is planned. No uptime guarantee yet. ## Call it ``` curl -H "Authorization: Bearer $OCR_API_KEY" -F file=@document.pdf https://192-9-246-86.sslip.io/v1/ocr ``` - Up to 10 pages: HTTP 200 with JSON `{request_id, pages, cost_usd, balance_usd, markdown, results: [{page, markdown, blocks, width, height}]}`. `markdown` joins the pages with `` markers; `blocks` carry text with pixel bounding boxes. - More than 10 pages, or `-F tier=batch`: HTTP 202 with `{job_id, status_url}`. Poll `GET /v1/jobs/{job_id}` (same key) until `status` is `succeeded` or `failed`. Results are kept for 24 hours, then deleted. - `-F tier=batch` costs half and runs behind list-tier work (async only). - `POST /v1/ocr/trial`: same as /v1/ocr without a key, up to 3 pages, 5 documents per IP address per day. Errors are JSON `{"error": {"type", "message"}}`: 400 bad or unreadable PDF (encrypted PDFs are refused), 401 missing or invalid key, 402 not enough credit, 413 file over 20 MB or over 200 pages, 429 rate or concurrency limit (see Retry-After), 503 queue full, 504 timeout. ## Get a key `curl -X POST https://192-9-246-86.sslip.io/v1/keys` returns a trial key with $0.10 of credit (limit 1 per IP address per day). ## Pay, and get your money back 1. **Free trial:** a new key comes with $0.10 of credit (`POST /v1/keys`); or try `POST /v1/ocr/trial` without a key (3 pages per document). 2. **Buy credit:** packs of $5 or $20; each dollar buys a dollar of credit (1,000 pages at list price). Status: card payments aren't open yet. 3. **Full refund, no questions:** within 30 days of a purchase, `POST /v1/billing/refund` refunds every purchase on the key in full, however much credit you used. The key's credit goes to 0. To keep that promise, sales pause (HTTP 403 `sales_paused`) whenever they could take total refunds past this beta's $200 refund budget. 4. **Limited beta:** at most 10 paying customers during this test; new buyers get HTTP 403 `beta_full` after that. - `GET /v1/account` shows the key's credit and how much is refundable. - Payments are processed by Stripe; this service never sees card numbers. - x402 (agent-native pay-per-call) comes later. ## Data handling - Documents are processed in memory and temporary files, then deleted. Sync results are not stored. Async results are deleted 24 hours after completion. - Logs and usage records hold metadata only (key id, page count, timings, user agent), never document text. ## Links - Pricing: https://192-9-246-86.sslip.io/v1/pricing (JSON), https://192-9-246-86.sslip.io/pricing.md - Policies (drafts): https://192-9-246-86.sslip.io/terms, https://192-9-246-86.sslip.io/privacy, https://192-9-246-86.sslip.io/refunds - OpenAPI: https://192-9-246-86.sslip.io/openapi.json, docs: https://192-9-246-86.sslip.io/docs - Health: https://192-9-246-86.sslip.io/healthz