Detect text blocks: masks and/or text
Finds text blocks and returns their masks and/or text, in reading order.
- PAGE — we find the blocks. TEXT on a page runs as MASK_AND_TEXT (see
modeApplied). - BLOCK — the whole image is one block; we find the text shape inside it.
- With
masks— one block per mask, nothing outside them; images without masks are skipped.
Pages and BLOCK images: blocks without text are dropped and free (MASK mode reads no text and returns every mask). Your mask always comes back and is charged, even with no text (textStatus EMPTY).
Billing per returned block: mask — api_ocr_mask (not in TEXT mode), text — api_ocr_text (not in MASK mode). Before the work a hold is charged, after it the actual cost (see Billing).
apiKeyAuthorizationBearer <nlk_… (team API key)>Idempotency-Key?stringUp to 255 characters, e.g. a UUID. A repeat with the same key is not done: 409 DUPLICATE_REQUEST.
length <= 255multipart/form-data- body
images*array<>mode?string"MASK_AND_TEXT""MASK_AND_TEXT""MASK""TEXT"language*LanguageSource language, not UND.
"AR""AZ""BE""BG""BN""BS""CS""DA""DE""EL""EN""ES""ET""FA""FI""FR""HE""HI""HR""HU""HY""ID""IT""JA""KA""KK""KO""KY""LT""LV""MK""MN""MR""MS""NE""NL""NO""PL""PT""RO""RU""SK""SL""SQ""SR""SV""SW""TA""TE""TG""TH""TL""TR""UK""UND""UR""UZ""VI""ZH"type*stringSets the reading order of blocks.
"MANGA""WEBTOON"readingDirection?stringDefault — RTL for language=JA with type=MANGA, LTR otherwise.
"LTR""RTL"masks?stringMasks to read, JSON text (see the overview).
kind?stringApplies to every image; default — by size (see the overview).
"BLOCK""PAGE"Blocks of every image.
application/json- response
requestId?stringRequest id — the same as the X-Request-Id header.
uuidimages?array<>usage?What the request cost. A line = price item × quantity; cost = sum of lines.
curl -X POST 'https://api.neurolate.com/ext/v1/ocr' \ -F 'images=[ "string"]' \ -F 'language=AR' \ -F 'type=MANGA'{ "requestId": "d385ab22-0f51-4b97-9ecd-b8ff3fd4fcb6", "images": [ { "index": 0, "width": 0, "height": 0, "modeApplied": "MASK_AND_TEXT", "blocks": [ { "number": 0, "maskIndex": 0, "text": "string", "furigana": [ { "start": 0, "end": 0, "reading": "string" } ], "mask": [ { "outer": [ [ 0 ] ], "exclude": [ [ [ 0 ] ] ] } ], "bbox": { "x": 0, "y": 0, "width": 0, "height": 0 }, "textStatus": "OK", "error": { "code": "string", "message": "string" } } ], "error": { "code": "string", "message": "string" } } ], "usage": { "cost": 0, "items": [ { "item": "string", "name": "string", "unit": "BLOCK", "quantity": 0, "amount": 0 } ] }}Current key GET
Key name, spending limit and how much of it is used. Free.
Default rates GET
The platform's default rates for everything a key can be charged for, and the token price in each currency. No key needed. A team may have its own rates — `GET /ext/v1/prices` shows yours. A rate may change at any time. Free. **Доступ:** Без токена, роут открыт всем.