{"uid":"cap_3Rgz-1yDJhdnnlSnh2ysE","slug":"delx-pdf-ocr-dea42a4d","name":"Delx PDF OCR","description":"Delx is an independent AI agent lab building and studying continuity, recovery, verifiable work and governed exchange for autonomous systems.","url":"https://api.delx.ai/api/v1/x402/pdf-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."},"max_chars":{"type":"integer","default":200000,"maximum":200000,"minimum":1,"description":"Maximum UTF-8 characters returned; OCR remains bounded."},"max_pages":{"type":"integer","default":10,"maximum":10,"minimum":1,"description":"Maximum PDF pages to render and OCR."},"pdf_base64":{"type":"string","maxLength":5592406,"minLength":1,"description":"One base64-encoded PDF up to 4 MiB decoded; application/pdf data URIs are accepted."},"file_base64":{"type":"string","maxLength":5592406,"minLength":1,"description":"Alias for pdf_base64."}}},"responseSchema":{"type":"json","example":{"psm":6,"text":"--- Page 1 ---\nPrinted text recognized from a scanned PDF","bytes":48210,"chars":51,"model":"tesseract-5+poppler","scope":"pdf_ocr","schema":"delx/ocr/v1","language":"eng","provider":"first-party","truncated":false,"confidence":94.12,"attribution":"Text recognized locally by Delx with Tesseract and Poppler; no document is stored, fetched, or sent to a third-party provider.","document_id":"pdf_ocr_6fd2b8d1b8ddf0f3e9a9b2c4d5e6f708","total_pages":1,"input_sha256":"6fd2b8d1b8ddf0f3e9a9b2c4d5e6f7081234567890abcdef1234567890abcdef","output_sha256":"c5f7b2d4c1e7a0f9b6d2e8c3a4f5b6071234567890abcdef1234567890abcdef","pages_observed":1,"words_observed":9,"sale_price_usdc":0.01,"upstream_cost_usd":0,"gross_margin_floor_usd":0.0095275}},"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_--vwry70k6CGb5pktBhXk","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":"Performs OCR on up to 10 pages of a base64-encoded scanned PDF, returning extracted text, confidence scores, page counts, and a SHA-256 receipt for $0.01 USDC via x402.","exampleAgentPrompt":"Can you OCR this scanned PDF for me — here's the base64 content — and pull out all the text from up to 10 pages using page segmentation mode 6?","exampleUseCases":[{"title":"Digitizing scanned invoice for accounting","prompt":"I have a scanned invoice as a base64 PDF — can you run OCR on it (up to 5 pages, PSM mode 6) and give me the extracted text so I can process the line items?"},{"title":"Extracting text from a printed form","prompt":"Here's a base64-encoded scanned government form, please OCR it using page segmentation mode 6 and return all the text from the first 3 pages with a confidence score."},{"title":"Archiving printed research documents","prompt":"I've got a base64 PDF of a scanned academic paper — can you OCR all 10 pages using PSM 3 and return the full extracted text along with the SHA-256 receipt?"}],"resultDescription":"Returns extracted UTF-8 text (bounded by max_chars up to 200,000 characters), per-page or aggregate confidence scores, total page count processed, and a SHA-256 receipt confirming the OCR job — all without storing the document or calling external vision APIs.","failureModes":["PDF exceeds 4 MiB decoded size — request rejected","More than 10 pages requested (max_pages capped at 10)","Invalid or corrupt base64 PDF data — parsing error returned","max_chars or max_pages outside allowed range — validation error","Payment not received or x402 flow fails — unauthorized response","Non-PDF file format submitted — unsupported format error"],"whenToPreferThis":"Choose this endpoint when you need to OCR a scanned PDF (image-based, not text-layer PDFs) without sending it to a third-party cloud vision service, when you need a verifiable SHA-256 receipt of the OCR job, or when cost predictability matters ($0.01 USDC flat per call). Prefer the sibling Delx PDF Text Extraction endpoint instead if the PDF already has a selectable text layer — OCR is unnecessary in that case.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-12T06:49:21.525Z","isFirstParty":false,"canonicalSlug":"delx-pdf-ocr-dea42a4d"}