Tripo H3.1

This guide shows how to generate 3D assets using the Tripo H3.1 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": "tripo3d/tripo-h3.1",
  "public": false,
  "parameters": {
    "prompt": "A weathered wooden treasure chest with iron fittings and a brass lock",
    "quantity": 1,
    "output_format": "glb",
    "geometry_resolution": "standard",
    "should_texture": true,
    "texture_quality": "hd",
    "enable_pbr": true,
    "seed": 12345
  }
}
'

API Request Endpoint, Headers, Parameters

Endpoint

https://cloud.leonardo.ai/api/rest/v2/generations

Headers

--header "accept: application/json" \
--header "authorization: Bearer <YOUR_API_KEY>" \
--header "content-type: application/json"

Body Parameters

ParameterTypeDefinition
enable_pbrbooleanAdds metallic, roughness, and normal maps for physically based rendering. Applies only when should_texture is true. Default is true.
geometry_resolutionstringGeometry detail level. Valid values are standard and detailed (captures finer surface detail). Default is standard.
guidances.image_referencearrayReference 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.
modelstringSpecifies the model used for generation. Set to tripo3d/tripo-h3.1.
output_formatstringMesh file format for the generated 3D asset. Set to glb.
promptstringDescribes the object to generate. Required when no image references are provided. Not used when image references are provided. Maximum 1024 characters.
publicbooleanControls whether the generated asset is public (true) or private (false).
quantityintegerNumber of assets generated per request. Set to 1.
seedintegerSeed value for generation. Range: 0–2147483647.
should_texturebooleanAdds a texture to the generated mesh. When false, the mesh is untextured geometry. Default is true.
texture_qualitystringResolution of the texture. Valid values are standard and hd (sharper, more detailed texture). Applies only when should_texture is true. Default is standard.

Constraints

  • prompt is required when guidances.image_reference is not provided, and accepts up to 1024 characters.
  • prompt is not used when guidances.image_reference is provided.
  • guidances.image_reference accepts up to 4 reference images per request.
  • quantity is fixed at 1. Only a single asset is generated per request.
  • output_format is fixed at glb.
  • seed accepts values from 0 to 2147483647.
  • texture_quality and enable_pbr apply only when should_texture is true.

Did this page help you?