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, 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 | NoneProvider id (tripo, meshy).
modestr | NoneGeneration mode: text or image.
promptstr | NoneText prompt for text->3D.
image_pathstr | NonePath to a source image for image->3D.
image_urlstr | NoneURL of a source image for image->3D.
formatstr | NoneOutput model format: glb, fbx, obj, or usdz.
target_sizefloat | NoneNormalize the largest dimension to this size (meters).
texturebool | NoneWhether to generate textures for the model.
tierstr | NoneProvider quality/cost tier.
namestr | NoneBase name for the imported asset.
output_folderstr | NoneDestination folder under Assets/ for the import.
job_idstr | NoneJob 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.