# Visual API – PDF OCR & Text Extraction

> Visual API – PDF OCR & Text Extraction is a paid API for AI agents from visual.hugen.tokyo, paid per call via x402, $0.05/call, status unknown (last checked 2026-09-15).

Extracts text and metadata from a PDF at a given URL using OCR, returning page count, character count, and parsed content.

## Facts

- Endpoint: GET https://visual.hugen.tokyo/visual/ocr
- Price: $0.05/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/visual-api-pdf-ocr-text-extraction-c00bb9d5
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_HGfQX9sMK16VrFMW6R5jW

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 visual-api-pdf-ocr-text-extraction-c00bb9d5
```

Example prompt: Extract all the text from this PDF — https://example.com/report.pdf — and give me the page count and total character count, checking up to 100 pages.

## When to prefer this

Use this endpoint when you need to extract text from a PDF available at a public URL without setting up any browser or document-processing infrastructure. It is especially useful for scanned PDFs requiring OCR. Prefer it over screenshot endpoints when the goal is textual content extraction rather than visual capture.

## Known failure modes

- URL is not a valid or accessible PDF — returns error or empty result
- PDF exceeds max_pages limit causing partial extraction
- Scanned PDF with no detectable text returns has_text: false with zero characters
- Network timeout reaching the provided PDF URL
- PDF is password-protected or encrypted and cannot be parsed

## How this service works

OCR extraction from scanned PDF documents (English). Uses Tesseract to read text from image-based pages that have no embedded text layer. Returns structured text and metadata. Ideal for invoices, receipts, contracts, and legacy documents. $0.05 per extraction.

## Output

Returns a JSON object with metadata (page_count, file_size_bytes), summary_stats (has_text boolean, ocr_pages count, total_characters count), and the extracted text content from the PDF.

## Example request

```json
{
 "url": "https://example.com",
 "max_pages": 1
}
```

## Request schema (JSON Schema)

```json
{
 "properties": {
  "input": {
   "required": [
    "method"
   ]
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "metadata": {
   "page_count": 3,
   "file_size_bytes": 1548290
  },
  "summary_stats": {
   "has_text": true,
   "ocr_pages": 3,
   "total_characters": 2840
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/visual-api-pdf-ocr-text-extraction-c00bb9d5/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from visual.hugen.tokyo](https://www.zero.xyz/host/visual.hugen.tokyo/llms.txt)
