# X402 Cloud PDF Invoice to JSON

> X402 Cloud PDF Invoice to JSON is a paid API for AI agents from api.x402cloud.space, paid per call via x402, $0.015/call, status unknown (last checked 2026-10-01).

Extracts structured invoice data (vendor, date, total, taxes, line items) from a PDF URL into a JSON object

## Facts

- Endpoint: POST https://api.x402cloud.space/v1/pdf/invoice-to-json?utm_source=zero.xyz
- Price: $0.015/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-01
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x402-cloud-pdf-invoice-to-json-8418a9fd
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_-Zbh_o4KmgaQQrgEQY5_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 x402-cloud-pdf-invoice-to-json-8418a9fd -d '<json body>'
```

Example prompt: Can you parse this invoice PDF at https://example.com/invoices/INV-1001.pdf and extract the vendor, date, total, taxes, currency, and all line items into structured JSON? The document is in English.

## When to prefer this

Use this endpoint when you need to automatically extract structured invoice or receipt data from a PDF file accessible via a public URL, especially in agent workflows, accounts-payable automation, or RAG pipelines that need machine-readable invoice fields without manual data entry. Pay-per-call USDC pricing via x402 makes it suitable for autonomous agents without subscription setup.

## Known failure modes

- PDF URL is not publicly accessible or returns 404 — extraction fails
- PDF is scanned image with poor OCR quality — low confidence score returned
- PDF is not an invoice or receipt — fields may return mostly null
- Unsupported language without language_hint — reduced accuracy
- Malformed or password-protected PDF — parsing error returned

## How this service works

X402 Cloud AI Inference Endpoints is an agent-ready x402 API provider for Gemini, image, audio, video, realtime, and specialized AI inference workflows. We expose pay-per-call USDC endpoints designed for autonomous AI agents, application backends, trading bots, creative automation, and RAG systems with some of the lowest x402 AI inference prices available in the market.

## Output

Returns a JSON object containing: invoice_number, vendor, date, total, taxes, currency, confidence score (0–1), and an array of line_items each with description, quantity, and amount. Fields may be null if not found in the PDF.

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "date": "2026-06-01",
  "taxes": 10,
  "total": 128.5,
  "vendor": "Example Inc.",
  "currency": "USD",
  "confidence": 0.9,
  "line_items": [
   {
    "amount": 99,
    "quantity": 1,
    "description": "Subscription"
   }
  ],
  "invoice_number": "INV-1001"
 },
 "outputSchema": {
  "type": "object",
  "$defs": {
   "InvoiceLineItem": {
    "type": "object",
    "title": "InvoiceLineItem",
    "required": [
     "description"
    ],
    "properties": {
     "amount": {
      "anyOf": [
       {
        "type": "number"
       },
       {
        "type": "null"
       }
      ],
      "title": "Amount",
      "default": null
     },
     "quantity": {
      "anyOf": [
       {
        "type": "number"
       },
       {
        "type": "null"
       }
      ],
      "title": "Quantity",
      "default": null
     },
     "description": {
      "type": "string",
      "title": "Description"
     }
    }
   }
  },
  "title": "PdfInvoiceOutput",
  "properties": {
   "date": {
    "anyOf": [
     {
      "type": "string"
     },
     {
      "type": "null"
     }
    ],
    "title": "Date",
    "default": null
   },
   "taxes": {
    "anyOf": [
     {
      "type": "number"
     },
     {
      "type": "null"
     }
    ],
    "title": "Taxes",
    "default": null
   },
   "total": {
    "anyOf": [
     {
      "type": "number"
     },
     {
      "type": "null"
     }
    ],
    "title": "Total",
    "default": null
   },
   "vendor": {
    "anyOf": [
     {
      "type": "string"
     },
     {
      "type": "null"
     }
    ],
    "title": "Vendor",
    "default": null
   },
   "currency": {
    "anyOf": [
     {
      "type": "string"
     },
     {
      "type": "null"
     }
    ],
    "title": "Currency",
    "default": null
   },
   "confidence": {
    "type": "number",
    "title": "Confidence",
    "default": 0,
    "maximum": 1,
    "minimum": 0
   },
   "line_items": {
    "type": "array",
    "items": {
     "$ref": "#/$defs/InvoiceLineItem"
    },
    "title": "Line Items"
   },
   "invoice_number": {
    "anyOf": [
     {
      "type": "string"
     },
     {
      "type": "null"
     }
    ],
    "title": "Invoice Number",
    "default": null
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/x402-cloud-pdf-invoice-to-json-8418a9fd/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.x402cloud.space](https://www.zero.xyz/host/api.x402cloud.space/llms.txt)
