Skip to content

Pagination

Cursor pagination of Slicer API lists — the limit and cursor parameters, the nextCursor field and examples that walk through every page.

On this page

Long lists — projects and wallet transactions — come in pages. Pagination is cursor-based: each page tells you where the next one starts, and you simply pass that value to the next request.

Parameters and response

Parameter Value
limitpage size, 1 to 100; 20 by default
cursorthe nextCursor value from the previous page; omit it for the first page
Response of GET /v1/projects?limit=2
{
  "ok": true,
  "data": {
    "items": [
      { "id": 318, "title": "A reel in 3 minutes", "status": "succeeded" },
      { "id": 311, "title": "New collection overview", "status": "succeeded" }
    ],
    "nextCursor": "Mg"
  }
}

nextCursor: null means there are no more pages. A cursor is an opaque string: don't parse it or build it yourself. A damaged cursor gets 400 bad_cursor.

Paginated lists:

  • GET /v1/projects — projects, newest first; filters status (all, ready, active, failed, draft — drafts of projects without the AI director) and q — search by title;
  • GET /v1/wallet/transactions — wallet transactions, newest first.

Other lists (versions, project history, publications, webhooks, deliveries) are short and come as a plain array.

Walk through every page

curl
JavaScript
Python
Terminal
CURSOR=""
while :; do
  PAGE=$(curl -s "https://api.slicer.media/v1/projects?limit=100&status=ready${CURSOR:+&cursor=$CURSOR}" \
    -H "Authorization: Bearer $SLICER_TOKEN")
  echo "$PAGE" | jq -r '.data.items[] | "\(.id)\t\(.title)"'
  CURSOR=$(echo "$PAGE" | jq -r '.data.nextCursor // empty')
  [ -z "$CURSOR" ] && break
done

What's next