Skip to main content
This walks through one chapter end to end. Use a test key (rl_test_…) first: it runs the whole flow, with real uploads, quotes, events and webhooks, against a fake pipeline that costs nothing. Switch to a live key when it works.
1

Get an API key

Sign in at https://relettr.com, open API keys, and create a key. Copy it now: it is shown only once.
2

Create the chapter

Declare each image in reading order (index 1..N, top to bottom), with its exact content type and size in bytes. The response contains one upload URL per file.
3

Upload the images

PUT each file to its URL with exactly the headers returned in uploads[].headers.
4

Mark uploads complete

The server checks the images, cuts them into parts and computes the exact quote. The chapter becomes ready.
5

Start

Credits for the quote are held and the chapter joins the GPU queue.
6

Poll, then download

Poll until succeeded, then fetch the result URLs.

1. Create the chapter

Idempotency-Key is required here, so a retried request never creates a second chapter.
Response (shortened):

2. Upload the images

Upload straight to storage; no Authorization header is needed on these URLs. They expire after 15 minutes. If they do, call POST /v1/chapters/{id}/upload_urls for new ones. Uploading a file again before step 3 replaces it.
The Content-Type and size must match what you declared, or storage rejects the upload. Accepted formats: PNG, JPEG, WebP. See the limits.

3. Mark uploads complete

Validation is free and usually takes a few seconds. Poll until the status is ready; the chapter now has an exact quote:

4. Start

Starting holds the quoted credits and queues the chapter. Idempotency-Key is required. Pass max_credits to refuse a quote higher than you expect.
To skip this step, create the chapter with "auto_start": true, "max_credits": 600. It then starts as soon as validation finishes, if the quote is within max_credits.

5. Poll

Poll every 30–60 s while queued and every 5–10 s while processing. Send the ETag back as If-None-Match to get a cheap 304 when nothing changed. Or skip polling and use webhooks.
Treat any status you don’t recognise as not finished and keep polling. New statuses may be added within v1.
If the chapter ends in needs_review, some zones could not be cleaned safely and exports are locked until you accept or fix them. See Chapter lifecycle.

6. Download the result

Result URLs are valid for 1 hour. Call the endpoint again for fresh ones.
By default (output.layout: "original") you get back one image per uploaded image, in the same order and at the same heights. The result also has a zip with every page plus regions.json, any warnings, and glossary_proposals for your series.

Next steps