Hunyuan 3D V3.1 API guide
Hunyuan 3D V3.1 API: Generate a 3D asset from a text prompt or an image with Hunyuan 3D V3.1. Choose text-to-3D or image-to-3D and provide the required input for that mode.
Model overview
Generate a 3D asset from a text prompt or an image with Hunyuan 3D V3.1. Choose text-to-3D or image-to-3D and provide the required input for that mode.
API integration
| Documentation | Value |
|---|---|
| API invocation identifier | hunyuan3d-v3.1 |
| Integration | Async task API |
Use this invocation identifier in API requests. Check your authorized model catalog for access. Follow the Quickstart for your first complete call.
Request parameters
Select a mode to highlight its required inputs. Mode selection does not change the API field names.
Studio presets describe the form setup, not guaranteed server defaults. Send preset values explicitly to reproduce them.
Required for Text to 3D.
Additional requirements depend on other values. See model rules.
Text description of the 3D content to generate (max 200 UTF-8 characters)
Length: maximum 200.
Required for Image to 3D.
Additional requirements depend on other values. See model rules.
Front view image of the object to convert into a 3D model (128-5000px, max 8MB, JPG/PNG/WEBP)
Media types: image/jpeg, image/png, image/webp.
Standard quantity control field. The allowed range for this item is 1-6.
Repeats MuseSpark execution within one logical task. This is separate from a model-native output count.
Value: minimum 1; maximum 6.
Studio preset: 1.
No parameters match. Clear the search or reset the filters.
Model rules
Input modes
Select a mode by supplying its required public inputs. The mode identifier describes a documentation/form choice; do not send input_mode as a model parameter.
| Mode | Required inputs |
|---|---|
| Text to 3D | prompt |
| Image to 3D | image |
- When
imageis omitted, provideprompt; keepprompt, when supplied, at least 1. - When
imageis provided, omitprompt. - When the input mode is Text to 3D, omit
image. - When the input mode is Image to 3D, provide
image; omitprompt.
Parameter meaning
- Text to 3D: Describe the object shape, material, style, details and pose. For a character, include the intended orientation or stance.
Reference media
- Image to 3D: Use a clear, well-lit image with an uncluttered background. A three-quarter view helps the model recover the object geometry. The image URL must be publicly accessible.
batch_size controls repeated MuseSpark executions. Output grouping, sequential image generation, and video shot count are separate concepts.
Request examples
Replace example media URLs and YOUR_... input identifiers with your own valid resources. Examples are checked against the exported item schema; media access and paid execution are separate runtime checks.
Set MUSESPARK_API_KEY and a stable MUSESPARK_REQUEST_ID before submitting. Preserve the request ID for retries of the same request and use a new ID for new work. Python examples use requests; JavaScript examples use Node.js 20 or later. The standalone Quickstart includes task polling and recovery.
Text to 3D
curl --fail-with-body 'https://api.musespark.ai/api/v1/openapi/task' \
-H "Authorization: Bearer $MUSESPARK_API_KEY" \
-H "X-Idempotency-Key: $MUSESPARK_REQUEST_ID" \
-H 'Content-Type: application/json' \
-d '{
"item_key": "hunyuan3d-v3.1",
"parameters": {
"batch_size": 1,
"prompt": "A paper city under soft morning light"
}
}'Parameters used: batch_size · prompt.
Image to 3D
curl --fail-with-body 'https://api.musespark.ai/api/v1/openapi/task' \
-H "Authorization: Bearer $MUSESPARK_API_KEY" \
-H "X-Idempotency-Key: $MUSESPARK_REQUEST_ID" \
-H 'Content-Type: application/json' \
-d '{
"item_key": "hunyuan3d-v3.1",
"parameters": {
"batch_size": 1,
"image": "YOUR_IMAGE"
}
}'Parameters used: batch_size · image.
Output
The result is a textured 3D mesh. Save the model asset URLs from the completed MuseSpark task before using them in a 3D pipeline.
The result is a textured 3D mesh. Save the model asset URLs from the completed MuseSpark task before using them in a 3D pipeline.
Creation returns a task ID inside data. Poll that task until completion, then save data.result.output_urls and any data.result.batch_results. See the task lifecycle for terminal states, result retention, and errors.
Troubleshooting
For rejected inputs, check the field type, accepted values, and conditional requirements in Request parameters and Model rules. Correct the affected fields before submitting again.
If creation times out, preserve the request identity and any known task ID. Follow Errors, timeouts and retries before submitting again.
Related docs
The public input snapshot was exported on 2026-11-09. Current prices and availability are listed in the model center.