# agent402.tools Document Intelligence

> agent402.tools Document Intelligence is a paid API for AI agents from agent402.tools, paid per call via x402, $0.024/call, status unknown (last checked 2026-09-15).

Converts any PDF or image URL into structured data including metadata, extracted text, page slices, OCR output, and decoded barcodes/QR codes

## Facts

- Endpoint: POST https://agent402.tools/api/skill/document-intel
- Price: $0.024/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agent402-tools-document-intelligence-02529933
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_p4VtlK8TDcK_Dk0uC3Xyw

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 agent402-tools-document-intelligence-02529933 -d '<json body>'
```

Example prompt: Can you extract all the text, metadata, and any barcodes from this invoice PDF at https://example.com/invoice.pdf and give me the structured output?

## When to prefer this

Use this endpoint when you need reliable, deterministic extraction from PDFs or document images — including scanned docs needing OCR or images with barcodes/QR codes — and want structured output without guessing from a vision LLM. Ideal for invoice processing, document digitization, and barcode reading workflows.

## Known failure modes

- URL is unreachable or returns a non-200 response — document cannot be fetched
- URL points to an unsupported file format (not PDF or image) — processing fails
- Scanned document quality too low for reliable OCR — partial or empty text extraction
- Payment of 0.2 USDC not completed — request rejected with 402 status
- Large or multi-hundred-page PDF may timeout or return partial results

## How this service works

Bundled execution of the Document intelligence workflow - Turn any PDF or image URL into structured data - metadata, extracted text, sliced page ranges, OCR for scanned docs, decoded barcodes / QR codes - without falling back to a vision LLM guess. Built for the messy 30% of documents where pdf-to-markdown alone returns nothing useful.

## Output

Returns structured data from the document including extracted text content, document metadata, sliced page ranges, OCR results for scanned pages, and decoded barcode/QR code values — all without relying on a vision LLM for guessing

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "url": {
   "type": "string",
   "description": "PDF or image URL to process (e.g. https://example.com/invoice.pdf)"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "args": {
   "url": "https://agent402.tools/fixtures/sample-invoice.pdf"
  },
  "pack": "document-intel",
  "steps": [
   {
    "ok": true,
    "slug": "pdf-info",
    "result": {}
   },
   {
    "ok": true,
    "slug": "pdf-to-markdown",
    "result": {}
   },
   {
    "ok": true,
    "slug": "pdf-extract-pages",
    "result": {}
   },
   {
    "ok": true,
    "slug": "image-ocr",
    "result": {}
   },
   {
    "ok": true,
    "slug": "barcode-decode",
    "result": {}
   },
   {
    "ok": true,
    "slug": "pdf-merge",
    "result": {}
   },
   {
    "ok": true,
    "slug": "images-to-pdf",
    "result": {}
   }
  ],
  "summary": "7/7 steps succeeded"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agent402-tools-document-intelligence-02529933/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agent402.tools](https://www.zero.xyz/host/agent402.tools/llms.txt)
