POST /api/verify-image
Lift the reference token off a receipt screenshot, then cross-check it against the upstream verifier.
For when you don't have a receipt URL, just a screenshot. Useful for telebirr app success screens, downloaded PDF invoices, or any photo a user shares as proof of payment.
The endpoint runs a Gemini-based detector over the image, identifies which
provider it came from, lifts the upstream-lookup reference, and, when the
provider is supported, chains into POST /api/verify so the
same response also includes the authoritative bank-side receipt.
The detector's output is not a receipt. It only carries the provider, the
tokens it read, a reference and a confidence. The real receipt fields (payer, amount, date, status)
live in upstream.result.receipt, fetched directly from the bank. If you
need verified data, that's the field to read.
Request
| Field | Type | Description |
|---|---|---|
images | Array<{ imageBase64 }> | 1–5 images of the same transaction. Each imageBase64 is the raw base64 string (no data: prefix needed; both forms work). |
imageBase64 | string | Single-image shorthand. Equivalent to images: [{ imageBase64 }]. |
Webhook
Add "webhookUrl": "https://..." to the body and links.et also POSTs the result to your server once the read is done, signed and retried. The call still answers as usual. See Webhooks.
Paid to you
Add "expect": { "receiverAccount": "0911000000", "receiverName": "<your name>", "amount": 1500 } to the body, with any one field or all three, and the response carries a top-level receiverCheck saying whether the payment went to you, and a top-level amountCheck saying whether it was the right amount. They are the same objects, decided the same way, as on POST /api/verify.
They are compared with what the bank said, never with what the picture shows, because a forged screenshot can print any receiver and any amount. So the two checks are only there when upstream.result.ok is true, or when the receipt came out of a Bank of Abyssinia QR. Without a bank answer there is neither, and the payment is not confirmed either way.
Limits
- 5 images per request, 5 MB base64 per image (≈ 3.75 MB raw).
- One screenshot read per request regardless of image count. When the chain
goes on to fetch a receipt we have not seen before, that fetch also counts
as one verification, the same as a
POST /api/verifycall. - Per-plan screenshot allowance. Every plan caps screenshot reads per month
(see Rate limits). Past it the endpoint returns 429 with
error.code = "image_cap_reached"and aRetry-Afterheader. - Service-wide backstop: 2,000 OCR calls per rolling 24 hours across all
keys. Reaching it returns 429 with
error.code = "ocr_daily_cap_reached"and aRetry-Afterheader. It sits far above any single plan, so it bites on runaway usage, not on a busy day. The landing-page demo has its own budget of 200 calls per day, and its reads count toward the 2,000 too.
What happens to the screenshot
The image you send is kept until you ask us to delete it. It is kept so the read is auditable: you can see the exact image behind any call on your dashboard, and we can tell why a screenshot was misread rather than guessing and improve the reader. It lives in a private bucket, is never served publicly, and is readable only by you and Odit staff. We keep one backup copy on a server we operate, under the same rules.
To delete screenshots, ask from the Screenshots page, one read at a time or all at once. They are deleted for good 30 days later, and you can keep them until then. The backup copy goes the same night, and after that we can no longer look into a read that came back wrong. The record of the read (its time, outcome and any receipt) stays, and it still counts toward your screenshot allowance.
If you are passing along screenshots that belong to your own users, this is
worth reflecting in your own privacy notice. Send a receipt link or reference
to /api/verify instead if you would rather nothing was kept.
Multi-image semantics
Multiple images of the same transaction (front + back of a PDF, pages of an invoice) all work; the detector picks the clearest reference it can see. Sending multiple images of different transactions is unsupported; you'll get whichever reference looks most prominent.
Response
detected: what the OCR pulled off the screenshot
| Field | Type | Notes |
|---|---|---|
provider | string | Which known provider issued the screenshot: a provider key such as "telebirr", "cbe" or "boa", or "none" when nothing matched. |
tokens | array of { label, value } | Every identifier-looking token read off the screen, with the label it sat next to ("inline" when it had none). |
reference | string | null | The upstream-lookup token (telebirr "Transaction Number" / "Invoice No.", CBE "Reference", etc.). |
url | string | null | Full receipt URL if printed in plain text on screen (not decoded from QR). |
confidence | number (0–1) | Detector's confidence that reference is the exact upstream-lookup token. |
upstream: the cross-check against the bank
Always present. Tells you what happened with the chained verification.
attempted | reason | When |
|---|---|---|
true | n/a | The detector identified a supported provider and the chained verifyWithCache returned. Inspect upstream.result.ok to know whether the bank confirmed it. |
false | unsupported_provider | Detector returned provider: "none" (random photo, unrecognised bank). |
false | no_reference | Provider identified, but no reference token was readable. |
false | provider_needs_full_url | CBE/BOA/Zemen/Awash without a printed URL; we can't construct the lookup URL from a reference alone. For CBE that is an FT reference without the 8 account digits. |
false | verifier_threw | The upstream verifier itself errored. upstream.error carries the message; upstream.url shows what URL was attempted. |
Three more things the table leaves out:
attempted: truealso carriesvia:"qr"(a QR code in the picture),"printed"(a URL printed on screen) or"reference"(built from a token).attempted: falsewithreason: "qr_receipt"is a Bank of Abyssinia slip whose QR code carries the receipt itself. It comes back inupstream.receipt, and no bank is asked.- Past your verification cap, a receipt we have not seen comes back as
attempted: truewithresult.quotaExceeded: trueandresult.ok: false. The response is still a200, and no bank was asked.
When attempted: true the inner result has the same shape as
POST /api/verify plus a cached flag; cache hits return in
under 50 ms because the shared receipts_cache table is the same one the URL
verifier writes to.
Currently auto-verifiable providers
A screenshot is verified end-to-end whenever links.et can build the bank's lookup URL from it. There are three ways, tried in this order:
- A QR code in the picture that holds a receipt link. This works for every supported provider, even when the detector could not tell which bank it is.
- A receipt URL printed on screen as text.
- A token whose shape gives it away. A telebirr reference is enough on
its own (
transactioninfo.ethiotelecom.et/receipt/<ref>). So are a CBE Receipt ID (v2-…), a CBE reference with its 8 account digits, a Zemen link token, a Bank of Abyssinia reference with its 5 digits, a Dashen reference and an Ahadu token.
When none of the three works you get provider_needs_full_url: call
POST /api/verify with the receipt URL yourself.
Errors
| Status | error.code | Meaning |
|---|---|---|
| 400 | invalid_json | Body wasn't valid JSON. |
| 400 | invalid_request | Neither images nor imageBase64 was supplied, an image is empty, or there are more than 5. |
| 400 | image_too_large | At least one image is over the 5 MB base64 cap. |
| 400 | not_an_image | Not a picture (a video, PDF or text). error.detected says which, error.index which image. |
| 401 | missing_key / invalid_key / revoked_key | Same auth gate as /api/verify. See Authentication. |
| 429 | rate_limited | Per-key minute bucket. Retry-After header carries seconds. |
| 429 | ocr_daily_cap_reached | Shared 2,000/day OCR budget has been spent across all keys + the demo. Retry-After carries seconds. |
| 503 | ai_not_configured | AI_GATEWAY_API_KEY is missing from the server env. |
| 502 | detection_failed | The AI gateway errored. No upstream verify is attempted. Not counted against your allowance. |
Examples
Single screenshot (curl)
Use only the verified upstream receipt
Try it
The landing page has a drag-and-drop / paste-with-⌘V demo of the same endpoint at links.et. Drop a telebirr screenshot and you'll see the detection row, then the green "Verified at the source" card when the upstream confirms.