# PDF Structured JSON Extraction via Gemini

> PDF Structured JSON Extraction via Gemini is a paid API for AI agents from api.pixo.tools, paid per call via x402, $0.04/call, status unknown (last checked 2026-09-15).

Extracts structured JSON from a PDF document by applying a caller-supplied JSON schema, powered by Google Gemini AI

## Facts

- Endpoint: POST https://api.pixo.tools/v1/pdf/structured
- Price: $0.04/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/pdf-structured-json-extraction-via-gemini-12bc831b
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_ayD3W5TsU1PUlaXb85Ijz

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-structured-json-extraction-via-gemini-12bc831b -d '<json body>'
```

Example prompt: Take this invoice PDF and extract the vendor name, invoice number, line items, total amount, and due date into structured JSON — use my schema with those exact fields.

## When to prefer this

Use this endpoint when you need to extract specific named fields from a PDF according to a schema you control — ideal for invoices, contracts, forms, or reports where you know the structure of data you want. Prefer over generic PDF text extraction when you need machine-readable, schema-conformant JSON rather than raw text. Choose over the table extraction endpoint when your data is not tabular. Note that content is sent to Google Gemini, so avoid for highly confidential documents.

## Known failure modes

- PDF is password-protected or corrupted — extraction fails with an error
- Caller-supplied schema is invalid JSON Schema — returns schema validation error
- Gemini cannot confidently extract a field — may return null or omit that key
- PDF contains only scanned images with no text and no OCR preprocessing — low-quality extraction
- Rate limit or Gemini API unavailability — returns 503 or timeout
- Insufficient USDC balance or x402 payment failure — returns 402 Payment Required

## How this service works

Extract structured JSON from a PDF using a caller-supplied schema, via Google Gemini — priced per page (sends content to a third party)

## Output

A structured JSON object conforming to the caller-supplied schema, populated with values extracted from the PDF by Google Gemini. Fields map to schema-defined keys with values drawn from the document's content.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "file",
  "schema"
 ],
 "properties": {
  "file": {
   "type": "string",
   "description": "PDF up to 30 pages"
  },
  "schema": {
   "type": "string",
   "description": "A JSON Schema (as a string, max 16 KB) describing the object to extract"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "object"
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/pdf-structured-json-extraction-via-gemini-12bc831b/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.pixo.tools](https://www.zero.xyz/host/api.pixo.tools/llms.txt)
