generate_model
Generate a 3D model from a text prompt via external AI APIs; returns a job ID for tracking and download, ideal for custom objects without a template or image.
Instructions
Generate a 3D model from a text prompt via external AI API (Meshy/etc).
Pass ``material`` when the user has named one ("print this in
TPU") — it steers the design-intelligence prompt enrichment
toward that material's constraints. It is a design hint, not a
slicing setting; leave it empty when the material is undecided.
Start here if user has no template/image — just a text description.
For image-based generation, use ``generate_model_from_image``.
For parametric templates (local, no AI API needed), use ``generate_from_template``.
To also slice + upload in one step, use ``generate_and_print``.
**EXPERIMENTAL:** AI-generated 3D models are experimental and may not
be suitable for printing without manual review. Generated geometry
can have thin walls, non-manifold faces, floating islands, or
dimensions that exceed printer build volume. 3D printers are delicate
hardware — always validate the generated mesh before printing.
**When possible, prefer downloading proven community models from
marketplaces** (Thingiverse, MyMiniFactory) over generating new ones.
Use generation for custom/unique objects only.
Submits a generation job to the specified provider and returns a
job ID for status tracking. Use ``generation_status`` to poll for
completion, then ``download_generated_model`` to retrieve the file.
**Prompt tips for Meshy (text-to-3D AI):**
- Describe the physical object clearly: shape, size, purpose.
- Include material cues: "wooden", "metallic", "smooth plastic".
- Specify printability: "solid base", "no overhangs", "flat bottom".
- Keep prompts under 200 words for best results (max 600 chars).
- Good example: "A phone stand with a curved cradle, flat rectangular
base, and angled back support. Smooth plastic surface."
- Bad example: "make me something cool" (too vague).
**For OpenSCAD**, the prompt must be valid OpenSCAD code. The job
completes synchronously and the result is immediately available.
Args:
prompt: Text description (or OpenSCAD code for ``openscad``).
provider: Generation provider: ``"meshy"``, ``"gemini"``,
``"tripo3d"``, ``"stability"`` (cloud, each needs its own
key) or ``"openscad"`` (local, keyless). Default
``"meshy"``.
format: Desired output format (``"stl"``). Default: ``"stl"``.
style: Optional style hint: ``"realistic"`` or ``"sculpture"``
for ``"meshy"``; ``"organic"``, ``"mechanical"`` or
``"decorative"`` for ``"gemini"``. Ignored by other
providers.
material: Material the generated model is meant to print in,
kept with the result for the slice; ``"PLA"`` by default.MAKE DOORS: design_session, Kiln's front door for making an object, is not installed here (signed in to Kiln it runs on Kiln's servers). On this install compile_scad IS the make → preview → iterate loop: make it, show the preview, iterate.
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": {
"prompt": "<prompt>"
},
"name": "generate_model"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| style | No | Optional style hint: ``"realistic"`` or ``"sculpture"`` for ``"meshy"``; ``"organic"``, ``"mechanical"`` or ``"decorative"`` for ``"gemini"``. Ignored by other providers. | |
| format | No | Desired output format (``"stl"``). Default: ``"stl"``. Default: "stl". | |
| prompt | Yes | Text description (or OpenSCAD code for ``openscad``). | |
| material | No | Material the generated model is meant to print in, kept with the result for the slice; ``"PLA"`` by default. Default: "". | |
| provider | No | Generation provider: ``"meshy"``, ``"gemini"``, ``"tripo3d"``, ``"stability"`` (cloud, each needs its own key) or ``"openscad"`` (local, keyless). Default ``"meshy"``. Default: "meshy". |