NeuroLate

Create a chapter from uploaded images

POST
/ext/v1/chapters/from-uploads

The same as POST /ext/v1/chapters, but the images are already uploaded file by file with POST /ext/v1/uploads; uploadIds lists them in reading order. Recommended for large chapters and slow or unstable connections: a cut-off file is sent again on its own, and this request is small.

Safe to repeat with a new Idempotency-Key or none (the same key answers DUPLICATE_REQUEST): when these uploads already became this chapter (same project and number, exactly these images), it answers 200 with that chapter and starts nothing again — check pipeline, or use POST /ext/v1/chapters/{id}/pipeline. NUMBER_TAKEN right after a timed-out attempt may be that attempt still running: wait a few seconds and repeat. Upload and assembling are free.

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

application/json
  1. body

A chapter from images uploaded with POST /ext/v1/uploads, and optional processing steps.

projectId?string
Formatuuid
number?number

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

readingDirection?|

Default — the project's.

Value in"LTR""RTL"
uploadIds?array<>

uploadIds of the uploaded images, in reading order, up to 500.

Items1 <= items <= 500
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

Repeat: the chapter was already created from these uploads; pipeline — its latest processing.

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/from-uploads' \
  -H 'Content-Type: application/json' \
  -d '{}'
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"
  }
}