# agentsvc.io OCR – Image Text Extraction

> agentsvc.io OCR – Image Text Extraction is a paid API for AI agents from agentsvc.io, paid per call via x402, $0.009/call, status unknown (last checked 2026-10-10).

Extracts text from base64-encoded images using Tesseract OCR with configurable language and page segmentation mode.

## Facts

- Endpoint: POST https://agentsvc.io/api/v1/proxy/ocr?utm_source=zero.xyz
- Price: $0.009/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-10
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agentsvc-io-ocr-image-text-extraction-b453ae28
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_gZzXNDKr1A2IQJrcJGAPa

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 agentsvc-io-ocr-image-text-extraction-b453ae28 -d '<json body>'
```

Example prompt: I have a base64-encoded JPEG of an invoice — can you use OCR to extract all the text from it in English using automatic page segmentation mode?

## When to prefer this

Choose this endpoint when you need to extract text from images without setting up an account or managing API keys, want per-call USDC micropayment pricing, or need multilingual OCR with configurable segmentation modes. It is ideal for agents that occasionally process documents, receipts, or forms rather than needing a high-volume batch OCR pipeline.

## Known failure modes

- Image exceeds 10 MB decoded limit — returns an error
- Unsupported image format — only PNG, JPEG, WebP, TIFF, BMP accepted
- Invalid base64 encoding — malformed input rejected
- Incorrect language code provided — falls back or errors
- Low-contrast or very blurry images may yield low confidence and garbled text
- Payment failure via x402 — no credits consumed, request not processed

## How this service works

86 APIs for AI agents: web scraping and crawling to Markdown, AI summaries, data extraction and cited answers, screenshots and PDF, PDF, OCR and document conversion, news, paper and developer search and more, paid per call with USDC on Base, Solana, Polygon or Arbitrum via x402. No account, no API key, free sample on every service.

## Output

Returns a JSON object with the full extracted text string, detected language code, word count, character count, a confidence score (0–100), timestamp of processing, and processing duration in milliseconds.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "psm": {
   "type": "integer",
   "default": 3,
   "description": "Page Segmentation Mode. 3 = fully automatic (default, best for most images). 6 = single uniform block of text. 7 = single text line. 11 = sparse text (find text anywhere). 13 = raw line (no line ordering). Use 6 or 7 for forms/labels."
  },
  "language": {
   "type": "string",
   "default": "eng",
   "description": "Tesseract language code. Default: 'eng' (English). Other supported: 'deu' (German), 'fra' (French), 'spa' (Spanish), 'ita' (Italian), 'por' (Portuguese), 'rus' (Russian), 'chi_sim' (Chinese Simplified), 'jpn' (Japanese), 'ara' (Arabic), 'kor' (Korean), 'nld' (Dutch), 'pol' (Polish). Use '+' to combine: 'eng+deu'."
  },
  "image_base64": {
   "type": "string",
   "description": "Base64-encoded image. Supported formats: PNG, JPEG, WebP, TIFF, BMP. Max 10 MB decoded. For best results use high-contrast images with clear text."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "data": {
   "text": "Invoice #12345\nDate: April 10, 2026\n\nBill To:\nJohn Smith\n123 Main Street\n\nTotal Due: $1,250.00",
   "language": "eng",
   "char_count": 72,
   "confidence": 94,
   "word_count": 18,
   "processed_at": "2026-04-10T14:00:00.000Z",
   "processing_ms": 1840
  },
  "success": true
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agentsvc-io-ocr-image-text-extraction-b453ae28/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agentsvc.io](https://www.zero.xyz/host/agentsvc.io/llms.txt)
