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.
NameTypeDescription
limitintegerNumber of objects per page, from 1 to 100. Default: 20.
afterstringid 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.
RoutePagination
GET /v1/generationslimit, after, type and status filters (see Generations).
GET /v1/edit-materialslimit, after, category and search filters (see Edit materials).
GET /v1/edit-material-categoriesNone: every category in a single response, has_more is false.
GET /v1/stylesNone: 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 received
curl "https://api.renderthink.com/v1/edit-materials?limit=100&after=mat_4Zq8nV2bXk7pLr9TcW3yHd" \
-H "Authorization: Bearer $RENDERTHINK_API_KEY"