{"uid":"cap_vFYgwCiF9FBPNfSm6WMyk","slug":"delx-commerce-image-ocr-tesseract-e836ef97","name":"Delx Commerce — Image OCR (Tesseract)","description":"Pay-per-result APIs for agents. No signup. Exact price. Verifiable delivery. USDC on Base + Solana via x402.","url":"https://commerce.delx.ai/api/v1/x402/image-ocr?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"psm":{"enum":[3,6,11],"type":"integer","default":6,"description":"Tesseract page segmentation mode for machine-printed text."},"image":{"type":"string","maxLength":8388608,"minLength":1,"description":"Alias for image_base64."},"max_chars":{"type":"integer","default":200000,"maximum":200000,"minimum":1,"description":"Maximum UTF-8 characters returned; OCR remains bounded."},"image_base64":{"type":"string","maxLength":8388608,"minLength":1,"description":"One base64-encoded PNG, JPEG, or WebP image up to 6 MiB decoded; image/* data URIs are accepted."}}},"responseSchema":{"type":"json","example":{"psm":6,"text":"Printed text recognized from the image","bytes":48210,"chars":39,"model":"tesseract-5","scope":"image_ocr","schema":"delx/ocr/v1","language":"eng","provider":"first-party","truncated":false,"confidence":96.42,"attribution":"Text recognized locally by Delx with Tesseract; no image is stored, fetched, or sent to a third-party provider.","document_id":"image_8b4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f","total_pages":1,"input_sha256":"8b4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f901234567890abcdef1234567890ab","output_sha256":"c5f7b2d4c1e7a0f9b6d2e8c3a4f5b6071234567890abcdef1234567890abcdef","pages_observed":1,"words_observed":7,"sale_price_usdc":0.01,"upstream_cost_usd":0,"gross_margin_floor_usd":0.0097375}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.01","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.01/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_UXGYiQ2DobYNgas2_7BI4","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.01","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Extracts text from a base64-encoded PNG, JPEG, or WebP image using Tesseract 5, with no image stored or forwarded to third parties.","exampleAgentPrompt":"Can you read all the printed text out of this image for me? Here's the base64-encoded JPEG — use page segmentation mode 6 and return the full text.","exampleUseCases":[{"title":"Receipt text extraction for expense tracking","prompt":"I've got a photo of a receipt encoded in base64 — can you pull out all the printed text so I can log the line items and total for my expense report? Use segmentation mode 6."},{"title":"Scanned form digitization","prompt":"Here's a base64 PNG of a scanned paper form. Extract all the printed text from it so I can parse the fields programmatically — use Tesseract psm 3 for a full-page layout."},{"title":"Screenshot text capture for data pipeline","prompt":"I have a base64-encoded WebP screenshot from our internal dashboard. Can you OCR the printed text out of it and give me the raw string along with the confidence score?"}],"resultDescription":"Returns a JSON object containing the recognized UTF-8 text, confidence score (0–100), word and character counts, model name ('tesseract-5'), document_id, SHA-256 hashes of input and output for verifiability, a truncated flag, total pages, and an attribution note confirming no image is stored or sent to third parties.","failureModes":["Image exceeds 6 MiB decoded size — request rejected","Neither 'image' nor 'image_base64' field provided — validation error","Invalid base64 encoding — decoding failure","Unsupported image format (not PNG, JPEG, or WebP) — processing error","psm value not in allowed enum [3, 6, 11] — validation error","max_chars set to 0 or above 200000 — clamped or rejected","Payment not included or insufficient USDC — 402 Payment Required"],"whenToPreferThis":"Choose this endpoint when you need fast, verifiable, privacy-preserving OCR on a single machine-printed image and want no image data leaving to a third-party cloud service. It is ideal for agentic pipelines that require cryptographic proof of input/output (SHA-256 hashes), pay-per-call billing in USDC without a subscription, and a deterministic Tesseract result with a confidence score. Prefer alternatives (e.g. GPT-4o vision, Google Document AI) when handwritten text, complex layouts, or multi-language support beyond English are required.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-01T00:53:57.910Z","isFirstParty":false,"canonicalSlug":"delx-commerce-image-ocr-tesseract-e836ef97"}