# Delx PDF OCR

> Delx PDF OCR is a paid API for AI agents from api.delx.ai, paid per call via x402, $0.01/call, status unknown (last checked 2026-10-12).

Performs OCR on up to 10 pages of a base64-encoded scanned PDF, returning extracted text, confidence scores, page counts, and a SHA-256 receipt for $0.01 USDC via x402.

## Facts

- Endpoint: POST https://api.delx.ai/api/v1/x402/pdf-ocr?utm_source=zero.xyz
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-12
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/delx-pdf-ocr-dea42a4d
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_3Rgz-1yDJhdnnlSnh2ysE

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability delx-pdf-ocr-dea42a4d -d '<json body>'
```

Example prompt: Can you OCR this scanned PDF for me — here's the base64 content — and pull out all the text from up to 10 pages using page segmentation mode 6?

## When to prefer this

Choose this endpoint when you need to OCR a scanned PDF (image-based, not text-layer PDFs) without sending it to a third-party cloud vision service, when you need a verifiable SHA-256 receipt of the OCR job, or when cost predictability matters ($0.01 USDC flat per call). Prefer the sibling Delx PDF Text Extraction endpoint instead if the PDF already has a selectable text layer — OCR is unnecessary in that case.

## Known failure modes

- PDF exceeds 4 MiB decoded size — request rejected
- More than 10 pages requested (max_pages capped at 10)
- Invalid or corrupt base64 PDF data — parsing error returned
- max_chars or max_pages outside allowed range — validation error
- Payment not received or x402 flow fails — unauthorized response
- Non-PDF file format submitted — unsupported format error

## How this service works

Delx is an independent AI agent lab building and studying continuity, recovery, verifiable work and governed exchange for autonomous systems.

## Output

Returns extracted UTF-8 text (bounded by max_chars up to 200,000 characters), per-page or aggregate confidence scores, total page count processed, and a SHA-256 receipt confirming the OCR job — all without storing the document or calling external vision APIs.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "psm": {
   "enum": [
    3,
    6,
    11
   ],
   "type": "integer",
   "default": 6,
   "description": "Tesseract page segmentation mode for machine-printed text."
  },
  "max_chars": {
   "type": "integer",
   "default": 200000,
   "maximum": 200000,
   "minimum": 1,
   "description": "Maximum UTF-8 characters returned; OCR remains bounded."
  },
  "max_pages": {
   "type": "integer",
   "default": 10,
   "maximum": 10,
   "minimum": 1,
   "description": "Maximum PDF pages to render and OCR."
  },
  "pdf_base64": {
   "type": "string",
   "maxLength": 5592406,
   "minLength": 1,
   "description": "One base64-encoded PDF up to 4 MiB decoded; application/pdf data URIs are accepted."
  },
  "file_base64": {
   "type": "string",
   "maxLength": 5592406,
   "minLength": 1,
   "description": "Alias for pdf_base64."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "psm": 6,
  "text": "--- Page 1 ---\nPrinted text recognized from a scanned PDF",
  "bytes": 48210,
  "chars": 51,
  "model": "tesseract-5+poppler",
  "scope": "pdf_ocr",
  "schema": "delx/ocr/v1",
  "language": "eng",
  "provider": "first-party",
  "truncated": false,
  "confidence": 94.12,
  "attribution": "Text recognized locally by Delx with Tesseract and Poppler; no document is stored, fetched, or sent to a third-party provider.",
  "document_id": "pdf_ocr_6fd2b8d1b8ddf0f3e9a9b2c4d5e6f708",
  "total_pages": 1,
  "input_sha256": "6fd2b8d1b8ddf0f3e9a9b2c4d5e6f7081234567890abcdef1234567890abcdef",
  "output_sha256": "c5f7b2d4c1e7a0f9b6d2e8c3a4f5b6071234567890abcdef1234567890abcdef",
  "pages_observed": 1,
  "words_observed": 9,
  "sale_price_usdc": 0.01,
  "upstream_cost_usd": 0,
  "gross_margin_floor_usd": 0.0095275
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/delx-pdf-ocr-dea42a4d/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.delx.ai](https://www.zero.xyz/host/api.delx.ai/llms.txt)
