Skip to content
Lumean

Pagination

How to page through API lists. Regular lists end at last_page; the voice catalog ends by has_more.

Every API list counts pages from one. Regular lists share a single response shape and end at last_page. The voice catalog GET /voices?provider=… signals the next page with the has_more flag, and its total can be null. The chunking preview returns its counters in a separate object.

Regular lists

{
  "items": [ /* … */ ],
  "current_page": 1,
  "last_page": 5,
  "per_page": 20,
  "total": 93
}

This object is returned in data by GET /orders, GET /templates, GET /templates/browse, GET /voices/library, GET /voices/public, and the voice clone lists (GET /voices/cartesia/clones, GET /voices/fishaudio/clones). The counters sit next to items; there is no separate data.meta.

The query parameters are page (starting at 1) and per_page. The list ends when current_page equals last_page.

GET /templates without parameters is answered like ?page=1&per_page=30: the first page of root templates, newest first. Until 06.11.2026 such a request returned an array of all templates in data. That mode has been removed, so code that reads data as an array now gets an object. Add ?page=1, read data.items and walk the pages. Find a template by name with search, by service with service, inside a folder with folder_id.

The voice catalog

{
  "provider": "elevenlabs",
  "items": [ /* … */ ],
  "page": 1,
  "per_page": 30,
  "total": null,
  "has_more": true
}

GET /voices?provider=… pages the same way, with page from 1 and per_page, but answers in its own shape.

Regular listsVoice catalog
Page numbercurrent_pagepage
Page countlast_pagenone
totalalways a numbera number or null
End of listcurrent_page equals last_pagehas_more: false

ElevenLabs does not report how many voices there are, so its total is null. End the loop by has_more for every provider: then one piece of code walks any provider's catalog.

The ElevenLabs catalog depends on an external API and returns 503 with reason: provider_unavailable when that API is unavailable. Store the page number so you can resume from the same place.

GET /orders/chunks/preview/{previewId} puts its counters in a separate data.page object.

FieldMeaning
data.page.current_pagepage number, from 1
data.page.per_pagepage size: 100 by default, 500 at most
data.page.totalnumber of chunks in the split, across all pages
data.page.has_morewhether more pages follow. There is no last_page here

The neighboring data.summary field describes the whole text, not the current page, so do not add it up across pages. {previewId} is a sha256 of 64 hex characters, not a UUID.

Lists without pages

OperationWhat data holds
GET /orders/{order}/itemsan array of all of the order's chunks, including retries
GET /usage, GET /voices/tagsan array of entries
GET /voices/filtersprovider and filters: the provider's filter descriptions with values and counts
GET /servicesa map of service code → description

These operations ignore the page parameter.

Page size and defaults

OperationParametersRangeDefault
GET /orderspage, per_pagepage ≥ 1, per_page 1..10020
GET /templatespage, per_pagepage ≥ 1, per_page 1..3030
GET /templates/browsepage, per_pagepage ≥ 1, per_page 1..10015
GET /orders/chunks/preview/{previewId}page, per_pagepage ≥ 1, per_page 1..500100
GET /voices?provider=…page, per_pagepage ≥ 1, per_page 1..50 for ElevenLabs, 1..100 for the others30
GET /voices/library, /voices/publicpage, per_pagepage ≥ 1, per_page 1..10020
GET /voices/{provider}/clonespage, per_pagepage ≥ 1, per_page 1..10020

An out-of-range value returns 422 with the field in errors. The exception is per_page on GET /voices/library and GET /voices/public: the server replaces a value outside 1..100 with the nearest bound, without an error. A non-integer per_page still returns 422 there.

422422 — request not accepted
What happened

The request was not accepted and nothing was created. A field error arrives in the common envelope: {"success": false, "message": "…", "errors": {"field": ["…"]}}.

What to do right now

First check whether the body has errors. If it does, fix the listed fields. If there is no errors but there is a reason, the request fields are not the problem: the same body gets the same refusal. Open the page for that code.

Open the code page

There is no cursor pagination

Responses have no cursor, next_cursor or next_page_url. The pag=cursor parameter passes validation and does not return 422, but the server ignores it and returns the regular paged shape. Page through lists with page and per_page.

How to walk an entire list

Paged results are not a consistent snapshot: the data changes while you move through the pages. GET /orders returns the newest orders first. One new order shifts the results by one position, so a record on a page boundary shows up twice or not at all.

  1. Remove duplicates by id on the client. This works with every response shape.
  2. Narrow the selection so it does not grow while you walk it. GET /orders has the status, task_type[] and template_id filters. A selection by a terminal status barely changes, while status=in_progress changes all the time.
  3. Stop on an end-of-list signal, not a counter: current_page equals last_page, or has_more is false. total is recalculated on every request. It works for a progress indicator, not for an exit condition.
  4. Use larger pages. per_page=100 instead of 20 cuts the number of requests fivefold, and with it the chance of a 429 along the way.
  5. Pause between pages. Walking a large catalog is a common way to hit the key's request rate limit. See Limits and the 429 code.

Do

Keep a set of the ids you have seen, page until has_more is false or current_page equals last_page, and after a 503 from the catalog, resume from the same page.

Don't

Compute the page count once as Math.ceil(total / per_page) and iterate blindly. total goes stale during the walk, and the ElevenLabs catalog has none at all.

This page for AI

Open .mdllm.md

Updated 11/09/2026 · API version 1.0.0