Hunyuan3D-2
Hunyuan3D 2.0 enables the creation of high-quality 3D models with intricate details. Produce assets that are visually appealing and suitable for professional use.
1import requests
2import json
3
4url = "https://api.segmind.com/v1/hunyuan-3d-2"
5headers = {
6 "x-api-key": "YOUR_API_KEY",
7 "Content-Type": "application/json"
8}
9
10data = {
11 "image": "https://i.ibb.co/8nbymYTS/hunyuan-image.png",
12 "octree_resolution": "256",
13 "num_inference_steps": 30,
14 "guidance_scale": 5.5,
15 "seed": 12467,
16 "face_count": 40000,
17 "texture": false,
18 "mesh": null
19}
20
21response = requests.post(url, headers=headers, json=data)
22
23if response.status_code == 200:
24 result = response.json()
25 print(json.dumps(result, indent=2))
26else:
27 print(f"Error: {response.status_code}")
28 print(response.text) 1import requests
2import json
3
4url = "https://api.segmind.com/v1/hunyuan-3d-2"
5headers = {
6 "x-api-key": "YOUR_API_KEY",
7 "Content-Type": "application/json"
8}
9
10data = {
11 "image": "https://i.ibb.co/8nbymYTS/hunyuan-image.png",
12 "octree_resolution": "256",
13 "num_inference_steps": 30,
14 "guidance_scale": 5.5,
15 "seed": 12467,
16 "face_count": 40000,
17 "texture": false,
18 "mesh": null
19}
20
21response = requests.post(url, headers=headers, json=data)
22
23if response.status_code == 200:
24 result = response.json()
25 print(json.dumps(result, indent=2))
26else:
27 print(f"Error: {response.status_code}")
28 print(response.text)API Endpoint
https://api.segmind.com/v1/hunyuan-3d-2Parameters
meshrequiredstring (uri)GLB file, only needed if modifying existing mesh
nullface_countoptionalintegerOnly used if texture=true, maximum number of faces in the mesh.
40000Range: 5000 - 100000guidance_scaleoptionalnumberScale for classifier-free guidance
5.5Range: 1 - 15imageoptionalstring (uri)Input Image.
num_inference_stepsoptionalintegerNumber of inference steps.
30Range: 20 - 50octree_resolutionoptionalintegerHigher resolution gives betterquality but slower processing.
256256384512seedoptionalintegerSeed for image generation.
-1Range: -1 - 999999999999999textoptionalstringPrompt to render (optional when image is used)
nulltextureoptionalbooleanWhether to apply texture to the generated mesh.
falseResponse Type
Returns: 3D Model
Common Error Codes
The API returns standard HTTP status codes. Detailed error messages are provided in the response body.
Bad Request
Invalid parameters or request format
Unauthorized
Missing or invalid API key
Forbidden
Insufficient permissions
Not Found
Model or endpoint not found
Insufficient Credits
Not enough credits to process request
Rate Limited
Too many requests
Server Error
Internal server error
Bad Gateway
Service temporarily unavailable
Timeout
Request timed out