Skip to main content

generate_model

Auto-generated from the Python tool registry. Do not hand-edit outside <!-- examples:start --><!-- examples:end --> blocks — the generator (tools/generate_docs_reference.py) will overwrite them.

Group: asset_gen  ·  Module: services.tools.generate_model

Description​

Generate 3D models with AI providers (Tripo, Meshy) and import them into the Unity project. Bring-your-own-key: provider keys live in the editor's secure store and never cross the bridge.

ACTIONS:

  • generate: Submit a generation job (text->3D or image->3D). Returns { job_id } immediately; poll with the status action. Params: provider, mode (text|image), prompt, image_path|image_url, format (glb|fbx|obj|usdz), target_size, texture, tier, model, name, output_folder.
  • status: Poll an async job by job_id -> { state, progress, assetPath?, error? }.
  • cancel: Cancel an in-flight job by job_id.
  • list_providers: List configured 3D providers and capabilities (no key values).

Parameters​

NameTypeRequiredDescription
actionLiteral['generate', 'status', 'cancel', 'list_providers']yesAction to perform.
providerstr | None—Provider id (tripo, meshy).
modestr | None—Generation mode: text or image.
promptstr | None—Text prompt for text->3D.
image_pathstr | None—Path to a source image for image->3D.
image_urlstr | None—URL of a source image for image->3D.
formatstr | None—Output model format: glb, fbx, obj, or usdz.
target_sizefloat | None—Normalize the largest dimension to this size (meters).
texturebool | None—Whether to generate textures for the model.
tierstr | None—Provider quality/cost tier.
modelstr | None—Provider model id/version (e.g. Tripo v3.1, Meshy meshy-6). Omit for the GUI-selected default.
namestr | None—Base name for the imported asset.
output_folderstr | None—Destination folder under Assets/ for the import.
job_idstr | None—Job id for status/cancel.

Returns​

A dict containing the Unity response. The exact shape depends on the action.

Examples​

No examples yet. Add usage examples here — they will be preserved across regenerations.