# Pocket Network OCR & Document Parsing

> Pocket Network OCR & Document Parsing is a paid API for AI agents from agent.pocket.network, paid per call via x402, $0.005/call, status unknown (last checked 2026-10-02).

Extracts text and layout metadata from images or PDFs (or passes through raw text) and returns structured JSON with OCR results and metrics.

## Facts

- Endpoint: POST https://agent.pocket.network/v1/ocr-document-parsing?utm_source=zero.xyz
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-02
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/pocket-network-ocr-document-parsing-f3bd456f
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_hXxougrP9Sz2ZlzG7EcjR

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 pocket-network-ocr-document-parsing-f3bd456f -d '<json body>'
```

Example prompt: I have a base64-encoded scanned invoice image — can you extract all the text from it and give me the layout hints too?

## When to prefer this

Choose this endpoint when you need to extract text from scanned documents or images in a pay-per-call, no-account-required manner. It is ideal for agentic workflows that encounter PDFs or images on-demand and need text content without setting up a dedicated OCR account. The fixed per-call USDC price and deterministic engine make it suitable for cost-controlled, reproducible document pipelines.

## Known failure modes

- Invalid or malformed base64 input returns an error response
- Unsupported file format not recognized by the OCR engine
- Low-quality or unreadable images may produce incomplete or inaccurate text extraction
- Payment failure (insufficient USDC balance) results in a 402 response before processing
- Missing all three input fields (pdf, image, text) results in a validation error

## How this service works

OCR and document parsing: turn an image or PDF into extracted text with layout hints. POST /v1/ocr with a document (or raw text) in the body and get the extracted text and metrics as one JSON object. Deterministic on clean inputs at a fixed engine version. Pay per request in USDC; no account, no API key.

## Output

A JSON object containing the extracted text and layout hints from the submitted document or image, along with a portal metadata block that includes the service ID, provenance (third-party-supplier), and a schema check status.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "pdf": {
   "type": "string",
   "description": "Base64-encoded PDF."
  },
  "text": {
   "type": "string",
   "description": "Raw text (bypasses OCR)."
  },
  "image": {
   "type": "string",
   "description": "Base64-encoded image."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "data": {},
  "portal": {
   "serviceId": "ocr-document-parsing",
   "provenance": "third-party-supplier",
   "schemaCheck": "passed"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/pocket-network-ocr-document-parsing-f3bd456f/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agent.pocket.network](https://www.zero.xyz/host/agent.pocket.network/llms.txt)
