Core concepts
Pagination
List routes return a
list object, with cursor-based pagination.json{"object": "list","data": [],"has_more": true}
data holds the objects of the page; has_more is true if more objects follow.| Name | Type | Description |
|---|---|---|
limit | integer | Number of objects per page, from 1 to 100. Default: 20. |
after | string | id of the last object received: the page starts after it. |
As long as
has_more is true, request the next page by passing in after the id of the last object received. A value out of bounds, malformed or not in the list gets 400 parameter_invalid, and param names the parameter at fault.| Route | Pagination |
|---|---|
GET /v1/generations | limit, after, type and status filters (see Generations). |
GET /v1/edit-materials | limit, after, category and search filters (see Edit materials). |
GET /v1/edit-material-categories | None: every category in a single response, has_more is false. |
GET /v1/styles | None: every style in a single response, has_more is false. |
curl "https://api.renderthink.com/v1/edit-materials?limit=100" \-H "Authorization: Bearer $RENDERTHINK_API_KEY"# Next page: after = the id of the last object receivedcurl "https://api.renderthink.com/v1/edit-materials?limit=100&after=mat_4Zq8nV2bXk7pLr9TcW3yHd" \-H "Authorization: Bearer $RENDERTHINK_API_KEY"