generate_model
Create a 3D model from a text description. Submit the prompt, get a job ID, and retrieve the file when ready.
Instructions
Generate a 3D model from a text prompt via external AI API (Meshy/etc).
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 backend — ``"meshy"`` (cloud AI) or
``"openscad"`` (local parametric). Default: ``"meshy"``.
format: Desired output format (``"stl"``). Default: ``"stl"``.
style: Optional style hint (``"realistic"`` or ``"sculpture"``
for Meshy). Ignored by OpenSCAD.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| style | No | ||
| format | No | stl | |
| prompt | Yes | ||
| provider | No | meshy |