Open in the interactive docs · markdown for agents: https://neuraldeep.tech/docs/ocr.md

OCR · document recognition

With the same key — OCR for PDFs and images (PNG/JPG/WEBP/BMP/TIFF). Endpoints under /v1/ocr/*. Available on all plans, with a bucket separate from chat — the limit is counted in pages.

Works asynchronously: upload a document → get a job → poll the status (no more than once per second) → fetch the result as markdown/json/text. For coordinate-based markup there's a PNG preview of the page (same coordinate system as bbox). There is one profile, fast: the former pro is retired, a request with it silently runs as fast. Remaining pages: GET /v1/ocr/quota or GET /v1/ocr/balance. When pages run out you get 429 with a quota_exceeded body and Retry-After.

Input limits.

# 1. upload (returns {"id":"job_...","page_count":N})
curl https://api.neuraldeep.tech/v1/ocr/extract \
  -H "Authorization: Bearer $YOUR_KEY" \
  -F "[email protected]"
# (page range: -F 'page_ranges=1-5,8')

# 2. job status
curl https://api.neuraldeep.tech/v1/ocr/jobs/job_123 \
  -H "Authorization: Bearer $YOUR_KEY"

# 3. result as markdown
curl "https://api.neuraldeep.tech/v1/ocr/jobs/job_123/result?format=markdown" \
  -H "Authorization: Bearer $YOUR_KEY"
import time, httpx

H = {"Authorization": "Bearer $YOUR_KEY"}
# 1. upload
with open("invoice.pdf", "rb") as f:
    job = httpx.post(
        "https://api.neuraldeep.tech/v1/ocr/extract",
        headers=H, files={"file": f},
    ).json()
jid = job["id"]
print("pages:", job["page_count"], "charged:", job["scan_pages_charged"])

# 2. polling (once per second)
while True:
    st = httpx.get(f"https://api.neuraldeep.tech/v1/ocr/jobs/{jid}", headers=H).json()
    if st["status"] == "completed":
        break
    time.sleep(1)

# 3. result
res = httpx.get(
    f"https://api.neuraldeep.tech/v1/ocr/jobs/{jid}/result",
    params={"format": "markdown"}, headers=H,
).json()
print(res["content"])

Status, result and preview don't consume the limit; you pay only for pages at upload.

Reference sections (markdown for agents)