generate_model_from_image
Generate a 3D model from a reference image. The agent analyzes the image to write OpenSCAD code, or uses the Meshy API for AI mesh reconstruction when configured.
Instructions
Make a 3D model from a reference image.
DEFAULT (keyless): you (the agent) can SEE the image — study it
and write the OpenSCAD yourself, then compile_scad. You do NOT
need an image-to-3D provider, and with no key configured this
tool hands the job back to your vision instead of erroring.
OPT-IN cloud path: when the user has set their OWN
KILN_MESHY_API_KEY, this submits the image to Meshy for an AI mesh
reconstruction. The image should show the object clearly against a
clean background for best results.
**EXPERIMENTAL:** AI-generated models are experimental. Always
validate the mesh before printing.
**Image tips:**
- Use a clear, well-lit photo of the object.
- Plain/solid backgrounds produce better results.
- Show the full object — avoid cropped or partial views.
- Multiple angles are not supported; use the best single view.
Args:
image_url: URL to the reference image (PNG, JPG). Must be
publicly accessible.
provider: Generation provider. Currently only ``"meshy"``
supports image-to-3D.
style: Optional style hint (``"realistic"`` or ``"sculpture"``).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| style | No | ||
| provider | No | meshy | |
| image_url | Yes |