{"uid":"cap_EOTm_nKYg9cvTdYGFVXcc","slug":"arabic-pipeline-batch-document-extraction-12046a68","name":"Arabic Pipeline – Batch Document Extraction","description":"Nine micro-capabilities for Arabic-language work, sold per call over x402 in USDC on Base. No API key, no account, no subscription for the buyer: the first request returns a 402 payment challenge, the client pays it and retries. Text utilities are pure computation and cost nothing to serve.","url":"https://arabic-pipeline.arabic-pipeline.workers.dev/doc/extract/batch?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"documents":{"type":"array","items":{"type":"object","required":["document_base64"],"properties":{"id":{"type":"string","description":"Optional correlation id, echoed back in the result."},"mime_type":{"type":"string"},"document_base64":{"type":"string","description":"Base64-encoded document image or PDF."}}},"maxItems":5,"minItems":1},"mime_type":{"type":"string","description":"Default mime type for documents that omit their own."}}},"responseSchema":{"type":"json","example":{"count":2,"model":"gemini-3.6-flash","failed":1,"results":[{"id":"receipt-1","ok":true,"index":0,"document":{"date":"2026-10-22","items":[{"name":"منتج","price":12.5,"quantity":1}],"notes":null,"total":12.5,"currency":"SAR","merchant":"اسم المتجر","raw_text":null,"confidence":0.9,"tax_number":null,"document_type":"receipt"}},{"id":"receipt-2","ok":false,"error":"Gemini ... failed (400): image could not be read","index":1,"status":400}],"cost_usd":0.1,"endpoint":"POST /doc/extract/batch","succeeded":1}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.1","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.1/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.1","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.1","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_qZ8QfZ3LZfk94YKxnM_MU","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.1","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Extracts structured data (merchant, date, items, totals, tax number, currency) from up to 5 Arabic document images or PDFs in a single batch call using Gemini vision.","exampleAgentPrompt":"Extract the merchant name, date, line items, total, and currency from these 3 Arabic receipt images I'm uploading — return structured JSON for each one.","exampleUseCases":[{"title":"Digitize Arabic expense receipts","prompt":"I have 4 Arabic store receipts from my business trip in Riyadh — can you extract the merchant name, date, total amount, and currency from each one into structured data?"},{"title":"Parse Arabic tax invoices for accounting","prompt":"Extract the tax number, total, line items, and merchant info from these Arabic PDF invoices so I can import them into my accounting system."},{"title":"Batch OCR Arabic purchase documents","prompt":"I've got 5 Arabic document images from our supplier — extract the date, items purchased, prices, and totals from all of them in one go."}],"resultDescription":"A JSON object containing a results array (one entry per document), each with ok status, extracted fields (merchant, date, items with name/price/quantity, total, currency, tax_number, document_type, confidence score, raw_text), or an error message if extraction failed. Also includes aggregate counts of succeeded/failed documents and cost_usd.","failureModes":["Image could not be read by Gemini (400 status, unreadable or corrupt image)","Base64 decoding failure if document_base64 is malformed","Batch size exceeded if more than 5 documents are submitted","Unsupported MIME type causing model rejection","Low confidence extraction on handwritten or low-quality scans","Payment challenge (402) on first call before x402 payment is completed","Partial batch failure — some documents succeed while others return ok:false"],"whenToPreferThis":"Choose this endpoint when you need to extract structured fields from Arabic-language document images or PDFs (receipts, invoices, purchase orders) in batch — especially when no API key or subscription is desired and pay-per-call via USDC is acceptable. Prefer over generic OCR when Arabic text and structured Arabic business document fields (merchant, SAR/currency totals, tax numbers) are the target.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-31T18:37:51.749Z","isFirstParty":false,"canonicalSlug":"arabic-pipeline-batch-document-extraction-12046a68"}