generate_texture
Generate UV-mapped textures for untextured 3D meshes from a text prompt using AI. Requires Meshy API key. Supports realistic and cartoon styles.
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.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| style | No | realistic | |
| prompt | Yes | ||
| provider | No | meshy | |
| mesh_path | Yes |