generate_texture
Create UV-mapped textures for untextured 3D meshes from text descriptions using cloud AI; requires a Meshy API key and internet.
Instructions
Cloud AI texture generation (requires Meshy API key + internet).
For instant offline textures without any API, use
``apply_procedural_texture`` (multicolor) or
``apply_geometric_texture`` (relief) from kiln-pro.
Takes any untextured mesh (STL, OBJ, GLB) and generates a
UV-mapped texture based on the text description. The textured
model can then be processed with ``auto_multicolor_from_texture``
(Kiln Pro) for multi-material printing.
Requires a Meshy API key (``KILN_MESHY_API_KEY``).
Args:
mesh_path: Absolute path to the mesh file (STL, OBJ, GLB, FBX).
prompt: Text description of the desired texture (max 600 chars).
E.g. "smooth matte wood grain with dark walnut finish".
style: Art style — ``"realistic"`` (default) or ``"2.5d-cartoon"``.
provider: Generation provider. Currently only ``"meshy"`` supports
retexturing.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"mesh_path": "<mesh_path>",
"prompt": "<prompt>"
},
"name": "generate_texture"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| style | No | Art style — ``"realistic"`` (default) or ``"2.5d-cartoon"``. Default: "realistic". | |
| prompt | Yes | Text description of the desired texture (max 600 chars). E.g. "smooth matte wood grain with dark walnut finish". | |
| provider | No | Generation provider. Currently only ``"meshy"`` supports retexturing. Default: "meshy". | |
| mesh_path | Yes | Absolute path to the mesh file (STL, OBJ, GLB, FBX). |