Skip to main content
POST
Runs OCR (RapidOCR/ONNX) against an image and returns the extracted text. This same engine also runs automatically on images attached to tracked posts: each image produces an ocr_result event delivered through your configured channels, keyword-filtered like any other delivery — so a keyword that only appears inside an image still triggers a delivery.

Request

Provide exactly one of:
string
The http(s) URL of the image to process (max 10 MB).
string
The image itself, as a data: URI (data:image/png;base64,...) or a raw base64 string.

Response

object
text (all lines joined with newlines), lines (per-line text + score), elapsed_ms (OCR service time), total_ms (end-to-end time).
string
Status message describing the result

ocr_result event payload

Automatic OCR results are dispatched as their own events — event is the category discriminator. A post’s images are OCR’d together (a Telegram album sends up to 4 at once), so one event covers the batch: images are the URLs, text is every image’s text joined, and texts indexes text per image (aligned 1:1 with images). source_event_id points back at the originating post — join it to the SourceEvent you already received by its id.
keyword_matches appears only for API keys with registered keywords. Over WebSocket, subscribe with ?types=ocr_result (or include it in a comma-separated list) to receive these — see WebSocket.