# Delx Commerce — Image OCR (Tesseract)

> Delx Commerce — Image OCR (Tesseract) is a paid API for AI agents from commerce.delx.ai, paid per call via x402, $0.01/call, status unknown (last checked 2026-10-01).

Extracts text from a base64-encoded PNG, JPEG, or WebP image using Tesseract 5, with no image stored or forwarded to third parties.

## Facts

- Endpoint: POST https://commerce.delx.ai/api/v1/x402/image-ocr?utm_source=zero.xyz
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-01
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/delx-commerce-image-ocr-tesseract-e836ef97
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_vFYgwCiF9FBPNfSm6WMyk

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-commerce-image-ocr-tesseract-e836ef97 -d '<json body>'
```

Example prompt: Can you read all the printed text out of this image for me? Here's the base64-encoded JPEG — use page segmentation mode 6 and return the full text.

## When to prefer this

Choose this endpoint when you need fast, verifiable, privacy-preserving OCR on a single machine-printed image and want no image data leaving to a third-party cloud service. It is ideal for agentic pipelines that require cryptographic proof of input/output (SHA-256 hashes), pay-per-call billing in USDC without a subscription, and a deterministic Tesseract result with a confidence score. Prefer alternatives (e.g. GPT-4o vision, Google Document AI) when handwritten text, complex layouts, or multi-language support beyond English are required.

## Known failure modes

- Image exceeds 6 MiB decoded size — request rejected
- Neither 'image' nor 'image_base64' field provided — validation error
- Invalid base64 encoding — decoding failure
- Unsupported image format (not PNG, JPEG, or WebP) — processing error
- psm value not in allowed enum [3, 6, 11] — validation error
- max_chars set to 0 or above 200000 — clamped or rejected
- Payment not included or insufficient USDC — 402 Payment Required

## How this service works

Pay-per-result APIs for agents. No signup. Exact price. Verifiable delivery. USDC on Base + Solana via x402.

## Output

Returns a JSON object containing the recognized UTF-8 text, confidence score (0–100), word and character counts, model name ('tesseract-5'), document_id, SHA-256 hashes of input and output for verifiability, a truncated flag, total pages, and an attribution note confirming no image is stored or sent to third parties.

## 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."
  },
  "image": {
   "type": "string",
   "maxLength": 8388608,
   "minLength": 1,
   "description": "Alias for image_base64."
  },
  "max_chars": {
   "type": "integer",
   "default": 200000,
   "maximum": 200000,
   "minimum": 1,
   "description": "Maximum UTF-8 characters returned; OCR remains bounded."
  },
  "image_base64": {
   "type": "string",
   "maxLength": 8388608,
   "minLength": 1,
   "description": "One base64-encoded PNG, JPEG, or WebP image up to 6 MiB decoded; image/* data URIs are accepted."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "psm": 6,
  "text": "Printed text recognized from the image",
  "bytes": 48210,
  "chars": 39,
  "model": "tesseract-5",
  "scope": "image_ocr",
  "schema": "delx/ocr/v1",
  "language": "eng",
  "provider": "first-party",
  "truncated": false,
  "confidence": 96.42,
  "attribution": "Text recognized locally by Delx with Tesseract; no image is stored, fetched, or sent to a third-party provider.",
  "document_id": "image_8b4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f",
  "total_pages": 1,
  "input_sha256": "8b4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f901234567890abcdef1234567890ab",
  "output_sha256": "c5f7b2d4c1e7a0f9b6d2e8c3a4f5b6071234567890abcdef1234567890abcdef",
  "pages_observed": 1,
  "words_observed": 7,
  "sale_price_usdc": 0.01,
  "upstream_cost_usd": 0,
  "gross_margin_floor_usd": 0.0097375
 }
}
```

## More

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