Meshy 7
This guide shows how to generate 3D assets using the Meshy 7 model via the Leonardo.AI REST API.
Sample Request
curl --request POST \
--url https://cloud.leonardo.ai/api/rest/v2/generations \
--header 'accept: application/json' \
--header 'authorization: Bearer <YOUR_API_KEY>' \
--header 'content-type: application/json' \
--data '
{
"model": "meshy/meshy-7",
"public": false,
"parameters": {
"prompt": "A stylized fantasy knight in silver armor with a blue cape",
"quantity": 1,
"output_format": "glb",
"topology": "quad",
"target_polycount": 30000,
"geometry_resolution": "standard",
"symmetry_mode": "auto",
"pose_mode": "a-pose",
"should_texture": true,
"enable_pbr": true,
"enable_rigging": true,
"rigging_height_meters": 1.8,
"enable_animation": true,
"animation_action_id": 0
}
}
'Recipe
API Request Endpoint, Headers, Parameters
Endpoint
https://cloud.leonardo.ai/api/rest/v2/generationsHeaders
--header "accept: application/json" \
--header "authorization: Bearer <YOUR_API_KEY>" \
--header "content-type: application/json"Body Parameters
| Parameter | Type | Definition |
|---|---|---|
animation_action_id | integer | ID of the animation to apply from the Meshy animation library. 0 is Idle. Range: 0–696. Default is 92. Applies only when enable_animation is true. |
enable_animation | boolean | Applies an animation from the Meshy animation library to the rigged character. Requires enable_rigging to be true. Default is false. |
enable_pbr | boolean | Adds metallic, roughness, and normal maps for physically based rendering. Applies only when should_texture is true. Default is false. |
enable_rigging | boolean | Adds a humanoid skeleton to the mesh so that it can be animated. Works best with humanoid characters that have clearly defined limbs. Default is false. |
geometry_resolution | string | Geometry detail level. Valid values are standard and 2k (captures finer surface detail). Default is standard. |
guidances.image_reference | array | Reference images of the object to generate. Maximum 4 items. Each item includes an image object and an optional order (integer, minimum 0). image.type accepts UPLOADED, GENERATED, VARIATION, URL, or BASE64. Use image.id for UPLOADED, GENERATED, and VARIATION, image.url for URL, and image.data (base64-encoded image bytes) for BASE64. |
model | string | Specifies the model used for generation. Set to meshy/meshy-7. |
output_format | string | Mesh file format for the generated 3D asset. Set to glb. |
pose_mode | string | Pose constraint for character meshes. Valid values are none, a-pose, and t-pose. A-pose and T-pose make the mesh easier to rig and animate. Default is none. |
prompt | string | Describes the object to generate. Required when no image references are provided. When image references are provided, the prompt guides the texturing. Maximum 600 characters. |
public | boolean | Controls whether the generated asset is public (true) or private (false). |
quantity | integer | Number of assets generated per request. Set to 1. |
rigging_height_meters | number | Approximate height of the character in meters. Scales the skeleton that rigging adds. Minimum 0.1. Default is 1.7. Applies only when enable_rigging is true. |
should_texture | boolean | Adds a base color texture to the generated mesh. When false, the mesh is untextured geometry. Default is true. |
symmetry_mode | string | Symmetry of the generated mesh. Valid values are auto (decides from the input), on (enforces symmetry), and off (disables symmetry). Default is auto. |
target_polycount | integer | Target number of polygons in the generated mesh. Range: 1000–300000, in multiples of 1000. Default is 30000. |
topology | string | Type of faces in the generated mesh. Valid values are quad (quadrilateral faces, smoother surfaces) and triangle (triangular faces, more detailed geometry). Default is triangle. |
Constraints
promptis required whenguidances.image_referenceis not provided, and accepts up to 600 characters.guidances.image_referenceaccepts up to 4 reference images per request.quantityis fixed at1. Only a single asset is generated per request.output_formatis fixed atglb.target_polycountaccepts values from1000to300000in multiples of1000.enable_pbrapplies only whenshould_textureistrue.enable_animationrequiresenable_riggingto betrue.animation_action_idapplies only whenenable_animationistrue.rigging_height_metersapplies only whenenable_riggingistrue.
Updated about 15 hours ago
Did this page help you?
