# PDF Extract API OCR

> PDF Extract API OCR is a paid API for AI agents from ocr-api.pdfextractapi.workers.dev, paid per call via x402, $0.02/call, status unknown (last checked 2026-09-15).

Extracts text from images, photos, screenshots, or scanned documents using optical character recognition (OCR).

## Facts

- Endpoint: POST https://ocr-api.pdfextractapi.workers.dev/ocr
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/pdf-extract-api-ocr-c9dca671
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_fEmhW_CgfR0sI5DuCdf-z

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 pdf-extract-api-ocr-c9dca671 -d '<json body>'
```

Example prompt: Can you extract all the text from this scanned document image I'm uploading? I need the raw text content from the photo.

## When to prefer this

Choose this endpoint when you need a simple, pay-per-call OCR service that accepts raw image file uploads (photos, screenshots, scans) and returns extracted text, without needing to set up a full OCR SDK or manage API keys beyond x402 micropayment. Ideal for lightweight agent workflows processing occasional documents at $0.02 per call.

## Known failure modes

- Image file not provided or malformed binary input returns an error
- Unreadable or very low-resolution images may produce garbled or incomplete text output
- Non-image file formats uploaded as the file field may cause processing failures
- Network or Cloudflare Worker timeout for very large image files
- Payment not fulfilled (x402) results in a 402 Payment Required response before processing

## How this service works

Extract text from an image (photo, screenshot, or scanned document) via OCR.

## Output

Returns the extracted text content recognized from the submitted image file, converted from visual/binary input into machine-readable plain text.

## 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": {
     "required": [
      "file"
     ],
     "properties": {
      "file": {
       "type": "string",
       "format": "binary"
      }
     }
    },
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "POST"
     ],
     "type": "string"
    },
    "bodyType": {
     "enum": [
      "json",
      "form-data",
      "text"
     ],
     "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/pdf-extract-api-ocr-c9dca671/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from ocr-api.pdfextractapi.workers.dev](https://www.zero.xyz/host/ocr-api.pdfextractapi.workers.dev/llms.txt)
