{"uid":"cap_zhN_VNHrIgPaM622dmTjF","slug":"brainiac-invoice-data-extraction-api-f085f00e","name":"BRAINIAC Invoice Data Extraction API","description":"Pay-per-call APIs for AI agents: OFAC sanctions screening, compliance checks, token security, and Base chain data via x402. No account. Fixed USDC price. MCP-ready.","url":"https://www.brainiac.software/api/v1/accounts-payable/invoice-data-extract?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"file":{"type":"object","required":["mediaType","fileBase64"],"properties":{"filename":{"type":"string","maxLength":180,"minLength":1},"mediaType":{"enum":["application/pdf","text/plain","text/csv"],"type":"string"},"fileBase64":{"type":"string","maxLength":12000000,"minLength":1}},"additionalProperties":false},"invoice":{"type":"object","properties":{"tax":{"type":"number","maximum":1000000000000,"minimum":-1000000000000},"lines":{"type":"array","items":{"type":"object","required":["description"],"properties":{"sku":{"type":"string","maxLength":80,"minLength":1},"tax":{"type":"number","maximum":1000000000000,"minimum":-1000000000000},"amount":{"type":"number","maximum":1000000000000,"minimum":-1000000000000},"quantity":{"type":"number","maximum":1000000000,"minimum":-1000000000},"unitPrice":{"type":"number","maximum":1000000000000,"minimum":-1000000000000},"description":{"type":"string","maxLength":300,"minLength":1}},"additionalProperties":false},"maxItems":200},"total":{"type":"number","maximum":1000000000000,"minimum":-1000000000000},"dueDate":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"taxRate":{"type":"number","maximum":100,"minimum":0},"currency":{"type":"string","pattern":"^[A-Za-z]{3}$"},"discount":{"type":"number","maximum":1000000000000,"minimum":-1000000000000},"poNumber":{"type":"string","maxLength":80,"minLength":1},"shipping":{"type":"number","maximum":1000000000000,"minimum":-1000000000000},"subtotal":{"type":"number","maximum":1000000000000,"minimum":-1000000000000},"invoiceDate":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"paymentTerms":{"type":"string","maxLength":120,"minLength":1},"supplierName":{"type":"string","maxLength":200,"minLength":1},"invoiceNumber":{"type":"string","maxLength":80,"minLength":1}},"additionalProperties":false}}},"responseSchema":{"type":"json","example":{"fields":[{"name":"supplierName","value":"Northwind Paper Ltd","status":"extracted","evidence":"Northwind Paper Ltd"},{"name":"invoiceNumber","value":"INV-100","status":"extracted","evidence":"INV-100"},{"name":"invoiceDate","value":"2026-10-01","status":"extracted","evidence":"2026-10-01"},{"name":"dueDate","value":null,"status":"unavailable","evidence":null},{"name":"currency","value":"USD","status":"extracted","evidence":"Currency: USD"},{"name":"poNumber","value":"PO-55","status":"extracted","evidence":"PO-55"},{"name":"paymentTerms","value":"Net 30","status":"extracted","evidence":"Net 30"},{"name":"subtotal","value":"55","status":"extracted","evidence":"55.00"},{"name":"discount","value":null,"status":"unavailable","evidence":null},{"name":"shipping","value":null,"status":"unavailable","evidence":null},{"name":"tax","value":"0","status":"extracted","evidence":"0.00"},{"name":"taxRate","value":null,"status":"unavailable","evidence":null},{"name":"total","value":"55","status":"extracted","evidence":"55.00"}],"source":"document","findings":[{"code":"due_date_unparsed","detail":"The document due date \"02/11/2026\" was not an unambiguous calendar date. Slash dates were not guessed.","severity":"unavailable"}],"checkedAt":"2026-11-02T19:00:00.000Z","limitations":["No payment was initiated.","Tax rules, purchase orders, supplier records, and payment terms are not invented when they are absent.","Only the invoice, purchase order, and prior invoices in this request are compared.","Labeled document lines are read as printed. A missing label is left unavailable.","CSV is read as text. Columns are not mapped unless the file uses labeled lines or description, quantity, unit price, and amount."],"paymentInitiated":false}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.06","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.06/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.06","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.06","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_MoWxkf2CuH3yFReswR4GK","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.06","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Extracts structured invoice fields (supplier, amounts, dates, line items, etc.) from uploaded PDF, plain text, or CSV invoice documents using AI, returning per-field extraction status and evidence.","exampleAgentPrompt":"Can you extract all the structured data from this invoice PDF — supplier name, invoice number, date, due date, line items, tax, and total — and tell me which fields you were able to find versus which ones were missing?","exampleUseCases":[{"title":"Automated AP invoice ingestion","prompt":"I just received a supplier invoice as a PDF attachment. Can you extract the invoice number, supplier name, due date, line items, subtotal, tax, and total from it so I can enter it into our accounting system?"},{"title":"Invoice validation before payment","prompt":"Here's an invoice PDF from a vendor. Can you parse out the structured fields — especially the total, tax rate, PO number, and payment terms — so I can verify everything looks correct before we approve it?"},{"title":"CSV invoice data extraction","prompt":"I have a CSV file from a supplier that's supposed to be an invoice. Can you read through it and extract the description, quantity, unit price, and amounts for each line item, plus the overall total and currency?"}],"resultDescription":"A JSON object with a 'fields' array where each entry contains the field name, extracted value, extraction status ('extracted' or 'unavailable'), and the evidence text from the document that supported the extraction. Also includes 'findings' (warnings or issues encountered, like ambiguous date formats), 'limitations' (scope disclaimers), 'source' (always 'document'), and a 'checkedAt' timestamp. No payment is initiated by the API.","failureModes":["File too large (base64 exceeds 12,000,000 chars) — request rejected","Unsupported media type — only PDF, plain text, and CSV accepted","Ambiguous or slash-format dates not parsed — field returned as 'unavailable' with a finding","Field not present in document — status 'unavailable' with null value and null evidence","CSV without labeled columns — line items may not be mapped correctly","Malformed base64 encoding — file cannot be decoded","Invoice fields that require external data (tax rules, supplier records) — left unavailable, not invented"],"whenToPreferThis":"Use this endpoint when you need to extract structured invoice data from documents (PDF, text, or CSV) in a pay-per-call, no-account-required workflow. It is well-suited for accounts payable automation, invoice validation pipelines, and situations where you want explicit per-field confidence and evidence provenance. Prefer this over generic OCR when you need invoice-specific fields (PO number, payment terms, line items, tax rate) with status and evidence annotations. The x402/USDC micropayment model (Base blockchain) makes it ideal for agents that need usage-based billing without API key management.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-11-17T00:37:20.982Z","isFirstParty":false,"canonicalSlug":"brainiac-invoice-data-extraction-api-f085f00e"}