Cursor-based pagination for list endpoints
Jul 15, 2024
1 minute read
All list endpoints now support cursor-based pagination. Previously, list endpoints returned all results in a single response — which doesn't scale as the number of models and predictions grows.
Paginated responses include next_cursor and next_url fields for navigating between pages. Page size is configurable via the page_size query parameter.
1# Fetch the first page of public models2curl "https://api.wrift.ai/v1/models?page_size=10" \3 -H "Authorization: Bearer $WRIFTAI_ACCESS_TOKEN"45# Fetch the next page using the cursor6curl "https://api.wrift.ai/v1/models?page_size=10&cursor=eyJpZCI6..." \7 -H "Authorization: Bearer $WRIFTAI_ACCESS_TOKEN"
See the API reference for the full list of paginated endpoints and response structure.