{"uid":"cap_ayD3W5TsU1PUlaXb85Ijz","slug":"pdf-structured-json-extraction-via-gemini-12bc831b","name":"PDF Structured JSON Extraction via Gemini","description":"Extract structured JSON from a PDF using a caller-supplied schema, via Google Gemini — priced per page (sends content to a third party)","url":"https://api.pixo.tools/v1/pdf/structured","method":"POST","headers":{},"bodySchema":{"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"}}},"responseSchema":{"type":"object"},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.04","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.04/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.04","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.04","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_znblLIW4jz1hGXDI3nlOP","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.04","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Extracts structured JSON from a PDF document by applying a caller-supplied JSON schema, powered by Google Gemini AI","exampleAgentPrompt":"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.","exampleUseCases":[{"title":"Extract loan application form fields","prompt":"I have a stack of loan application PDFs from customers. Can you pull out their name, income, credit score, employment status, and loan amount into JSON records using this schema so I can load them into our underwriting database?"},{"title":"Parse employment contracts into key terms","prompt":"Go through these employment contract PDFs and extract the employee name, job title, base salary, start date, and any non-compete clauses into structured JSON. I need it organized so I can compare offers across candidates."},{"title":"Automate insurance claim data entry","prompt":"These insurance claim PDFs are piling up. Extract the claim number, claimant name, incident date, damage description, and claimed amount into JSON format matching my schema — that way I can automatically feed them into our claims management system."}],"resultDescription":"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.","failureModes":["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"],"whenToPreferThis":"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.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T18:32:47.840Z","isFirstParty":false}