Reference
Edit materials
GET /v1/edit-materials returns, page by page and in catalog order, the materials and textures available for mask editing. The list can be filtered by category (wood, stone, paint…) or by name. Pass the id of a material in the material field of a modify layer of an edit.curl "https://api.renderthink.com/v1/edit-materials?category=wood&lang=en&limit=20" \-H "Authorization: Bearer $RENDERTHINK_API_KEY"
URL parameters:
| Name | Type | Description |
|---|---|---|
category | string | id of a category (see “Categories” below): only the materials of this category and its subcategories are returned. |
search | string | Text searched in the material names, in any language, ignoring accents. 100 characters at most. |
limit | integer | Number of objects per page, from 1 to 100. Default: 20. |
after | string | id of the last object of the previous page (see Pagination). |
lang | string | Language of names: en or fr. Default: en. |
category and search can be combined. Key permission: edits.A list of
edit_material objects:json{"object": "list","data": [{"object": "edit_material","id": "mat_4Zq8nV2bXk7pLr9TcW3yHd","name": "Light oak","image_url": "https://cdn.renderthink.com/...","thumbnail_url": "https://cdn.renderthink.com/...","category": "wood"}],"has_more": true}
| Field | Type | Description |
|---|---|---|
object | string | Always edit_material. |
id | string | Material identifier (mat_…), passed in the material field of a layer. |
name | string | Name in the requested language, or in the catalog's original language if untranslated. |
image_url | string | Public URL of the material image. |
thumbnail_url | string or null | Public URL of a thumbnail, to show in a list of choices; null if the material has none. |
category | string or null | id of its category (see “Categories”), or null if it has none. |
GET /v1/edit-material-categories returns the main material categories (wood, stone, paint…) that hold at least one material, subcategories included, in catalog order and in a single page. Their id is stable: it is the value of the category filter.curl "https://api.renderthink.com/v1/edit-material-categories?lang=en" \-H "Authorization: Bearer $RENDERTHINK_API_KEY"
URL parameter:
lang, the language of names, en (default) or fr. Key permission: edits.json{"object": "list","data": [{ "object": "edit_material_category", "id": "wood", "name": "Wood" },{ "object": "edit_material_category", "id": "stone", "name": "Stone" }],"has_more": false}
| Field | Type | Description |
|---|---|---|
object | string | Always edit_material_category. |
id | string | Stable identifier (wood, stone…). |
name | string | Name in the requested language. |
| Status | Code | Cause |
|---|---|---|
| 400 | parameter_invalid | limit outside 1 to 100, after malformed or unknown, category that is not a category id, search longer than 100 characters, or lang other than en or fr. |
Errors shared by every route (key, permissions, limits) are in Errors.