{"uid":"cap_R7IkUJ1b6MQqLmKq4rr5s","slug":"agent402-tools-image-ocr-125ea5f6","name":"agent402.tools Image OCR","description":"Extract text from a PNG or JPEG image - full text, overall confidence and per-line bounding boxes - from a URL or base64 payload, Tesseract on-device (no upstream API). Default English; other ISO 639-2 languages on request. Use it when an agent needs the words in a screenshot, scan or photo.","url":"https://agent402.tools/api/image-ocr","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"url":{"type":"string","description":"HTTPS URL to fetch the image from (max 8 MB). Either this or image is required."},"lang":{"type":"string","description":"Language code, ISO 639-2. Default 'eng'. Supported: eng, spa, fra, deu, ita, por, nld, rus, pol, tur, chi_sim, chi_tra, jpn, kor, ara, hin, tha, vie, ukr, ell."},"image":{"type":"string","description":"Base64 PNG/JPEG (data: URL prefix accepted). Either this or url is required."}}},"responseSchema":{"type":"json","example":{"lang":"eng","text":"Mild Splendour of the various-vested Night!\nMother of wildly-working visions! hail!","lines":[{"bbox":{"x0":24,"x1":658,"y0":12,"y1":48},"text":"Mild Splendour of the various-vested Night!","confidence":92.1},{"bbox":{"x0":24,"x1":612,"y0":56,"y1":92},"text":"Mother of wildly-working visions! hail!","confidence":91.5}],"source":"tesseract.js (Tesseract WASM, Apache-2.0)","lineCount":2,"confidence":91.8}},"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_M6QZQK-fTUSasue0eoRxW","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 PNG or JPEG image using Tesseract.js, returning the full extracted text, an overall confidence score, and per-line bounding boxes — no API key required.","exampleAgentPrompt":"Can you read all the text out of this image for me — here's the URL: https://example.com/receipt.jpg — and also tell me how confident it is? It's in English.","exampleUseCases":null,"resultDescription":"Returns the full extracted text string, an overall confidence score from 0 to 100, and an array of per-line bounding boxes indicating the position of each line of recognized text within the image.","failureModes":["Image URL is inaccessible, returns an error fetching the resource","Image exceeds 8 MB size limit, rejected","Neither image nor url field is provided, returns validation error","Unsupported language code provided, falls back or errors","Low-quality or blurry image results in low confidence and garbled text","Non-image content at URL (e.g. HTML page) causes processing failure"],"whenToPreferThis":"Choose this endpoint when you need server-side OCR without managing an API key or paying per-character fees to a cloud vision provider. It is ideal for extracting text from receipts, scanned documents, screenshots, or signage images in one of 20+ supported languages, especially when you need per-line bounding box coordinates alongside the text and a confidence metric. Prefer it over cloud OCR APIs when privacy, cost simplicity ($0.01/call flat), or avoiding third-party data sharing matters.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T12:41:44.421Z","isFirstParty":false}