NeuroLate

Upload a chapter

POST
/ext/v1/chapters

Creates a chapter from source images (in reading order, up to 500) and optionally starts processing: assemble and ocr, as in POST /ext/v1/chapters/{id}/pipeline. Processing runs in the background — poll GET /ext/v1/chapters/{id}/pipeline. Manga images must be single pages or two-page spreads: height ≤ 2.5 × width and width ≤ 2 × height.

Upload and assembling are free. If processing could not start (e.g. 402), the chapter is still created: 201 with pipelineError. A chapter never assembled is deleted after 2 days.

Authorization

apiKey
headerAuthorizationBearer <nlk_… (team API key)>

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

multipart/form-data
  1. body
images*array<>
projectId*string
Formatuuid
number*number

Chapter number, ≥ 0, may be fractional (e.g. 12.5); unique among the project's active chapters.

readingDirection?string

Default — the project's.

Value in"LTR""RTL"
assemble?boolean

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

Defaultfalse
width?integer

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

Range600 <= value <= 1500
pages?integer

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

Range1 <= value <= 500
ocr?boolean

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

Defaultfalse
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

Chapter created; pipeline — the started processing, or pipelineError — why it did not start.

application/json
  1. response
requestId?string

Request id — the same as the X-Request-Id header; the OCR cost of this chapter shows up under it.

Formatuuid
chapter?
images?integer

How many source images were uploaded.

Formatint32
pipeline?|null
pipelineError?|null
Example Request
curl -X POST 'https://api.neurolate.com/ext/v1/chapters' \  -F 'images=[  "string"]' \  -F 'projectId=5a8591dd-4039-49df-9202-96385ba3eff8' \  -F 'number=0'
Example Response
{  "requestId": "d385ab22-0f51-4b97-9ecd-b8ff3fd4fcb6",  "chapter": {    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",    "projectId": "5a8591dd-4039-49df-9202-96385ba3eff8",    "number": 0,    "type": "MANGA",    "readingDirection": "LTR",    "status": "CREATED",    "archived": true,    "pages": 0,    "ocrDone": 0,    "createdAt": "2019-08-24T14:15:22Z"  },  "images": 0,  "pipeline": {    "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"  },  "pipelineError": {    "code": "INVALID_PAGINATION",    "message": "string",    "index": 0,    "detail": "string"  }}