{"uid":"cap_gZzXNDKr1A2IQJrcJGAPa","slug":"agentsvc-io-ocr-image-text-extraction-b453ae28","name":"agentsvc.io OCR – Image Text Extraction","description":"86 APIs for AI agents: web scraping and crawling to Markdown, AI summaries, data extraction and cited answers, screenshots and PDF, PDF, OCR and document conversion, news, paper and developer search and more, paid per call with USDC on Base, Solana, Polygon or Arbitrum via x402. No account, no API key, free sample on every service.","url":"https://agentsvc.io/api/v1/proxy/ocr?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"psm":{"type":"integer","default":3,"description":"Page Segmentation Mode. 3 = fully automatic (default, best for most images). 6 = single uniform block of text. 7 = single text line. 11 = sparse text (find text anywhere). 13 = raw line (no line ordering). Use 6 or 7 for forms/labels."},"language":{"type":"string","default":"eng","description":"Tesseract language code. Default: 'eng' (English). Other supported: 'deu' (German), 'fra' (French), 'spa' (Spanish), 'ita' (Italian), 'por' (Portuguese), 'rus' (Russian), 'chi_sim' (Chinese Simplified), 'jpn' (Japanese), 'ara' (Arabic), 'kor' (Korean), 'nld' (Dutch), 'pol' (Polish). Use '+' to combine: 'eng+deu'."},"image_base64":{"type":"string","description":"Base64-encoded image. Supported formats: PNG, JPEG, WebP, TIFF, BMP. Max 10 MB decoded. For best results use high-contrast images with clear text."}}},"responseSchema":{"type":"json","example":{"data":{"text":"Invoice #12345\nDate: April 10, 2026\n\nBill To:\nJohn Smith\n123 Main Street\n\nTotal Due: $1,250.00","language":"eng","char_count":72,"confidence":94,"word_count":18,"processed_at":"2026-04-10T14:00:00.000Z","processing_ms":1840},"success":true}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.009","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.009/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.009","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.009","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_XBxpz6gkjcYhNaw5Fxe4u","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.009","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Extracts text from base64-encoded images using Tesseract OCR with configurable language and page segmentation mode.","exampleAgentPrompt":"I have a base64-encoded JPEG of an invoice — can you use OCR to extract all the text from it in English using automatic page segmentation mode?","exampleUseCases":[{"title":"Invoice data extraction for accounting","prompt":"I have a photo of a paper invoice encoded in base64 — extract all the text from it in English so I can pull out the line items and total amount due."},{"title":"Multilingual form digitization","prompt":"I've got a scanned German government form as a base64 PNG. Can you OCR it using the 'deu' language setting and single uniform block mode (PSM 6) so I can read the field values?"},{"title":"Receipt text reading for expense tracking","prompt":"Here's a base64-encoded JPEG of a restaurant receipt. Run OCR on it with English and automatic segmentation so I can see the itemized charges."}],"resultDescription":"Returns a JSON object with the full extracted text string, detected language code, word count, character count, a confidence score (0–100), timestamp of processing, and processing duration in milliseconds.","failureModes":["Image exceeds 10 MB decoded limit — returns an error","Unsupported image format — only PNG, JPEG, WebP, TIFF, BMP accepted","Invalid base64 encoding — malformed input rejected","Incorrect language code provided — falls back or errors","Low-contrast or very blurry images may yield low confidence and garbled text","Payment failure via x402 — no credits consumed, request not processed"],"whenToPreferThis":"Choose this endpoint when you need to extract text from images without setting up an account or managing API keys, want per-call USDC micropayment pricing, or need multilingual OCR with configurable segmentation modes. It is ideal for agents that occasionally process documents, receipts, or forms rather than needing a high-volume batch OCR pipeline.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-10T12:42:22.460Z","isFirstParty":false,"canonicalSlug":"agentsvc-io-ocr-image-text-extraction-b453ae28"}