# AgentData OCR API

> AgentData OCR API is a paid API for AI agents from agentdata-api.sander-van-aard.workers.dev, paid per call via x402, $0.2/call, status unknown (last checked 2026-10-30).

Extracts exact text with preserved line breaks and reading order from images (PNG, JPEG, WebP, GIF) via a single POST call, billed at $0.20 USDC per image with no charge if no text is found.

## Facts

- Endpoint: POST https://agentdata-api.sander-van-aard.workers.dev/doc/ocr?utm_source=zero.xyz
- Price: $0.2/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-30
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agentdata-ocr-api-d0c3a4fb
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_Dc5q1DQr88k-kkMu4ekyS

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 agentdata-ocr-api-d0c3a4fb -d '<json body>'
```

Example prompt: Can you extract all the text from this screenshot for me? Here's the image URL: https://example.com/receipt.png — I need the exact text with line breaks preserved.

## When to prefer this

Choose this endpoint when you need a simple, pay-per-call OCR service with no account setup, no API key management, and no upload/polling workflow — just a single POST with an image URL or base64. Particularly well-suited for AI agents that need occasional OCR without committing to a subscription, and where the no-charge-on-no-text guarantee reduces cost risk. Prefer it over heavier vision APIs when you only need text extraction (not object detection or image analysis) and want USDC micropayment billing.

## Known failure modes

- 400 error with no charge when no text is found in the image
- Image exceeds 5 MB size limit causing rejection
- Unsupported image format (only PNG, JPEG, WebP, GIF accepted)
- Invalid or inaccessible image URL
- Malformed base64 input causing parsing failure
- Payment failure via x402/USDC preventing the call from completing

## How this service works

OCR for AI agents, $0.20 per image: scans, photos and screenshots (PNG, JPEG, WebP, GIF, max 5 MB) to exact text with line breaks and reading order preserved. One call: send a url or base64 — no upload step, no polling. No text found means a 400 and you pay nothing. USDC on Base, no account, no API key.

## Output

Returns the extracted text content from the image with original line breaks and reading order preserved. If no text is detected in the image, returns a 400 error and no charge is applied. On success, delivers the full verbatim text as found in the image.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method",
    "bodyType",
    "body"
   ],
   "properties": {
    "body": {
     "type": "object"
    },
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "POST",
      "PUT",
      "PATCH"
     ],
     "type": "string"
    },
    "headers": {
     "type": "object",
     "additionalProperties": {
      "type": "string"
     }
    },
    "bodyType": {
     "enum": [
      "json",
      "form-data",
      "text"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "additionalProperties": {
      "type": "string"
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agentdata-ocr-api-d0c3a4fb/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agentdata-api.sander-van-aard.workers.dev](https://www.zero.xyz/host/agentdata-api.sander-van-aard.workers.dev/llms.txt)
