# Document Extraction Hub – OCR

> Document Extraction Hub – OCR is a paid API for AI agents from doc.halowerk.com, paid per call via x402, $0.006/call, status unknown (last checked 2026-09-15).

Extracts full text, typed layout blocks with bounding boxes, tables as matrix and markdown, and decoded QR/barcodes from images, scans, screenshots, or PDFs.

## Facts

- Endpoint: POST https://doc.halowerk.com/ocr
- Price: $0.006/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/document-extraction-hub-ocr-54b6daca
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_xD6hpFoz_Haqn2fuxNqAs

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 document-extraction-hub-ocr-54b6daca -d '<json body>'
```

Example prompt: Can you extract all the text, tables, and any barcodes from this scanned invoice image? Here's the URL: https://example.com/invoice-scan.jpg — it's a JPEG and I need both English and German text recognized.

## When to prefer this

Choose this endpoint when you need to extract structured content — text, tables, layout, or barcodes — from images or PDFs in a single call. It is especially useful when multiple output types (text + tables + barcodes) are needed simultaneously from a single document. Prefer it over generic OCR when bounding-box layout information or decoded barcode content is required alongside text. Supports both URL-based and base64 inputs.

## Known failure modes

- MIME type mismatch between declared mime and actual file bytes — request refused
- URL is not publicly accessible or returns a non-200 status — fetch failure
- PDF page range exceeds 50 pages per call — rejected
- Both url and image_base64 supplied simultaneously — rejected
- Neither url nor image_base64 supplied — rejected
- Language not in installed models (only deu and eng supported) — unsupported language error
- Payment not provided or invalid x402 payment — payment failure

## How this service works

Read a picture, a scan or a screenshot: full text in reading order, typed blocks with their box on the page, tables as a matrix plus markdown, and every QR code and barcode with its decoded content.

## Output

Returns full text in reading order, layout blocks each with their bounding box on the page, tables as both a matrix and in markdown format, and every QR code and barcode with its decoded string content — scoped to whichever output types were requested via the 'want' parameter.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "url": {
   "type": "string",
   "format": "uri",
   "description": "Public http or https URL of the picture or PDF. Use this or \"image_base64\", not both."
  },
  "mime": {
   "enum": [
    "image/png",
    "image/jpeg",
    "image/webp",
    "application/pdf"
   ],
   "type": "string",
   "description": "Media type of the input. Checked against the actual bytes; a mismatch is refused rather than worked around."
  },
  "want": {
   "type": "array",
   "items": {
    "enum": [
     "text",
     "tables",
     "codes",
     "layout"
    ],
    "type": "string"
   },
   "default": [
    "text",
    "tables",
    "codes",
    "layout"
   ],
   "description": "Which parts of the answer to compute. The price does not change with it; asking for less is simply faster."
  },
  "pages": {
   "anyOf": [
    {
     "type": "string"
    },
    {
     "type": "array",
     "items": {
      "type": "integer",
      "minimum": 1
     }
    }
   ],
   "description": "Optional page range for PDF input, for example \"1-5\" or \"2,4,7\". At most 50 pages per call. Not allowed for a single image."
  },
  "languages": {
   "type": "array",
   "items": {
    "enum": [
     "deu",
     "eng"
    ],
    "type": "string"
   },
   "default": [
    "deu",
    "eng"
   ],
   "description": "Languages to read, default deu plus eng. Installed models: deu, eng."
  },
  "image_base64": {
   "type": "string",
   "description": "The picture or PDF as base64. Use this or \"url\", not both."
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/document-extraction-hub-ocr-54b6daca/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from doc.halowerk.com](https://www.zero.xyz/host/doc.halowerk.com/llms.txt)
