NeuroLate

Process a chapter

POST
/ext/v1/chapters/{id}/pipeline

Starts assemble and/or ocr on an uploaded chapter. On an assembled chapter assemble is skipped and OCR reads only pages not read yet, so it is safe to repeat. Runs in the background — poll GET /ext/v1/chapters/{id}/pipeline.

OCR is charged once per chapter, for the whole chapter, at the team's chapter rate (chapter_processing for a webtoon, chapter_processing_page for manga); repeat runs are free, and so is a chapter whose OCR was already paid on the website. 402 means the balance or key limit can't cover that price. The charge happens while processing runs and shows in GET /ext/v1/requests/{id} of the request that started it; it is final once the processing is DONE or FAILED.

Authorization

apiKey
headerAuthorizationBearer <nlk_… (team API key)>

Path Parameters

id*string
Formatuuid

Header Parameters

Idempotency-Key?string

Up to 255 characters, e.g. a UUID. A repeat with the same key is not done: 409 DUPLICATE_REQUEST.

Lengthlength <= 255

Request Body

application/json
  1. body

Processing steps; at least one must be true.

assemble?boolean

Build pages from the images: a webtoon strip is sliced into about pages pages, a manga image is one page.

width?|

Page width: webtoon 600–800 (default 690), manga 600–1500 (default — the typical image width).

Formatint32
Range600 <= value <= 1500
pages?|

Webtoon only, required with assemble: about how many pages to slice into.

Formatint32
Range1 <= value <= 500
ocr?boolean

Find and read text on every page not read yet. Needs assemble until the chapter is assembled.

language?Language

Source language for ocr, not UND. Default — the project's (required if the project has none); a passed value is saved to the project.

Value in"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"

Response Body

Processing started.

application/json
  1. response

Processing of a chapter.

id?string
Formatuuid
chapterId?string
Formatuuid
requestId?|

The request that started the processing; its cost — GET /ext/v1/requests/{requestId}. null — started on the website.

Formatuuid
status?string

DONE may still have items with ERROR, BUSY or PAYMENT_REQUIRED — check items.

Value in"RUNNING""DONE""FAILED"
wave?integer

Current stage: -1 — queued (starts within seconds), 0 — assemble, 1 — OCR; higher — steps started on the website.

Formatint32
failure?|

FAILED only: PAYMENT_REQUIRED — balance or key limit ran out on the way; ASSEMBLE_FAILED — pages could not be built.

Value in"PAYMENT_REQUIRED""ASSEMBLE_FAILED"
items?array<>

One line per step × page. FINISHED means the operation ended; whether text was found is in the chapter's ocrDone.

createdAt?string
Formatdate-time
updatedAt?string
Formatdate-time
finishedAt?|
Formatdate-time
Example Request
curl -X POST 'https://api.neurolate.com/ext/v1/chapters/497f6eca-6276-4993-bfeb-53cbbbba6f08/pipeline' \
  -H 'Content-Type: application/json' \
  -d '{}'
Example Response
{
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "chapterId": "2a48aff7-27e7-4ab6-9471-1ee9c5632811",
  "requestId": "d385ab22-0f51-4b97-9ecd-b8ff3fd4fcb6",
  "status": "RUNNING",
  "wave": 0,
  "failure": "PAYMENT_REQUIRED",
  "items": [
    {
      "step": "ASSEMBLE",
      "pageId": "347b9bf8-fe00-46f6-b8ca-1e06b3bd5809",
      "status": "DISPATCHED"
    }
  ],
  "createdAt": "2019-08-24T14:15:22Z",
  "updatedAt": "2019-08-24T14:15:22Z",
  "finishedAt": "2019-08-24T14:15:22Z"
}