{"uid":"cap__Q334gTHYYQ_HeUb7wa49","slug":"structdoc-invoice-extractor-56f0eef8","name":"StructDoc Invoice Extractor","description":"Turn any document into structured data for AI agents — OCR, layout-to-Markdown, tables, key-value, invoice/receipt fields — from PDF/images in 100+ languages. Pay per call via x402 (USDC). No API keys.","url":"https://structdoc-api.hp-vladic.workers.dev/invoice","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"url":{"type":"string","description":"Document URL (PDF/image)"},"pages":{"type":"string","description":"Page range e.g. \"1-5\""},"base64":{"type":"string","description":"Base64 document bytes (≤~6MB)"},"features":{"type":"string","description":"languages,barcodes,keyValuePairs"},"queryFields":{"type":"string","description":"custom fields, comma-separated ≤8"}}},"responseSchema":{"type":"json","example":{"model":"prebuilt-layout","pages":1,"format":"markdown","content":"# ..."}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.08","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.08/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.08","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.08","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_f8cMlOJohenFLDuY1ZRtP","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.08","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Extracts structured invoice and receipt fields (line items, totals, vendor info, dates) from uploaded PDF or image documents using OCR and AI layout analysis.","exampleAgentPrompt":"I just got an invoice PDF from Acme Corp — can you pull out the vendor name, invoice number, line items, and total amount so I can enter it into our accounting system?","exampleUseCases":[{"title":"Expense report processing for travel receipts","prompt":"I have a folder of receipt images from our team's business trip — can you extract the vendor names, amounts, and dates from each one so I can compile them into an expense report?"},{"title":"Accounts payable invoice digitization","prompt":"We're switching to a new accounting platform and need to digitize all our pending invoices. Can you go through each PDF and pull out the vendor info, invoice numbers, line items, and totals so we can bulk import them?"},{"title":"Recurring vendor billing verification","prompt":"I need to check if our monthly subscription invoices from Stripe match what we're expecting. Can you extract the charges and line items from the latest PDF invoice and give me a clean breakdown?"}],"resultDescription":"A JSON object containing the detected model name (prebuilt-layout), page count, output format (markdown), and a structured content string with extracted invoice fields such as vendor name, invoice number, date, line items, subtotals, taxes, and grand total rendered as Markdown.","failureModes":["Unsupported file format returns an error — only PDF and common image formats (JPEG, PNG, TIFF) are accepted","Low-quality or blurry scans may result in incomplete or inaccurate field extraction","Documents in languages outside the 100+ supported set may yield poor results","Oversized files or very long multi-page documents may time out","Payment failure via x402/USDC results in 402 response before processing begins","Handwritten invoices may have lower accuracy than printed ones"],"whenToPreferThis":"Choose this endpoint when you need to extract structured invoice or receipt fields — vendor, totals, line items, dates — from a PDF or image document without managing API keys, via a pay-per-call x402/USDC model. Ideal for AP automation, expense digitization, or feeding invoice data into downstream systems. Prefer over generic OCR when you specifically need invoice/receipt semantic fields structured automatically.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T06:35:17.132Z","isFirstParty":false}