# SecondEyes AI Document Extraction

> SecondEyes AI Document Extraction is a paid API for AI agents from secondeyesai.com, paid per call via x402, $0.050000/call, status unknown (last checked 2026-09-13).

Extracts structured, arithmetic-reconciled data from invoices, contracts, or generic documents provided as a PDF/doc URL, charging only when extraction fully reconciles.

## Facts

- Endpoint: GET https://secondeyesai.com/api/bar/x402/extract
- Price: $0.050000/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/secondeyesai-com-f540aef5
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_-J20F-YuC87NvLjd6RD9n

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 secondeyesai-com-f540aef5
```

Example prompt: Pull all the structured data out of this invoice PDF — https://example.com/invoice-2024-001.pdf — and make sure the line items, subtotals, taxes, and grand total actually reconcile before you give me the result.

## When to prefer this

Prefer this endpoint when you need verified, arithmetic-correct extraction from financial or legal documents (invoices, contracts) and want a pay-on-success guarantee — you only pay $0.10 USDC when the extraction fully reconciles. Ideal for agentic workflows where silent extraction errors would cause downstream problems.

## Known failure modes

- Math reconciliation failure: totals do not add up — returns discrepancy details, no charge applied
- Schema validation failure: extracted fields do not conform to expected schema — returns error with specifics, no charge
- Unparseable date or non-ISO-4217 currency encountered — extraction rejected with explanation
- Inaccessible or invalid document URL — returns fetch error
- Unsupported file format — returns format error

## How this service works

doc-extract: structured, arithmetic-reconciled extraction of an invoice, contract, or generic document from a PDF/doc URL. Evidence-only (schema-valid, totals reconcile, dates parse, ISO-4217 currency). Charges only when the extraction reconciles; on a math/schema failure it returns the discrepancy and does not settle.

## Output

Returns a schema-valid structured extraction of the document with reconciled arithmetic totals, parsed ISO-8601 dates, and ISO-4217 currency codes. If math or schema validation fails, returns the specific discrepancy and does NOT charge the $0.10 USDC fee.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "properties": {
   "type": "string"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "data": {
   "tax": 1.6,
   "buyer": "Globex Inc",
   "dates": {
    "due_date": "2026-02-14",
    "issue_date": "2026-01-15"
   },
   "total": 21.6,
   "vendor": "Acme LLC",
   "currency": "USD",
   "subtotal": 20,
   "line_items": [
    {
     "qty": 2,
     "desc": "Widget",
     "amount": 20,
     "unit_price": 10
    }
   ]
  },
  "tool": "doc-extract",
  "doc_type": "invoice",
  "validated": true,
  "attestation": {
   "basis": "evidence-only",
   "claims": [
    "schema-valid structured output",
    "line items sum to subtotal",
    "subtotal + tax reconciles to total"
   ]
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/secondeyesai-com-f540aef5/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from secondeyesai.com](https://www.zero.xyz/host/secondeyesai.com/llms.txt)
