promptstring必填
Text description of the 3D object to generate. Up to 1024 characters.
tencent/hunyuan-3d/v3/text-to-3dHunyuan 3D 3.0 by Tencent generates a textured, low-poly, or geometry-only 3D model from a text prompt.
试用该模型
选择一个示例,将其输入和结果加载到 playground 中。
{
"prompt": "A vintage red rotary telephone with a coiled cord"
}Hunyuan 3D 3.0 by Tencent generates a textured, low-poly, or geometry-only 3D model from a text prompt.
| Field | Type | Default | Notes |
|---|---|---|---|
prompt | string, required | — | Text description of the 3D object to generate. Up to 1024 characters. |
generate_type | Normal / LowPoly / Geometry | Normal | Normal: textured model. LowPoly: polygon reduction. Geometry: white model without texture. |
enable_pbr | boolean | false | Generate PBR materials (metallic, roughness, normal maps). Ignored for Geometry output. |
face_count | integer 40000–1500000 | — | Target polygon face count (40,000-1,500,000). Leave empty for the default of 500,000. |
polygon_type | triangle / quadrilateral | triangle | Polygon type. Only takes effect when Generate Type is LowPoly. |
url: Main 3D file (GLB unless another export format is selected).thumbnail: Preview image rendered by the provider.$0.63 per request with default settings. Price by option (other settings at default):
| Option | Price |
|---|---|
| enable_pbr on | $0.81 |
| enable_pbr off | $0.63 |
| generate_type = Normal | $0.63 |
| generate_type = LowPoly | $0.72 |
| generate_type = Geometry | $0.45 |
| Failed runs are not charged. |
Other Tencent 3D endpoints: tencent/hunyuan-3d/3.0/image-to-3d, tencent/hunyuan-3d/3.1/part, tencent/hunyuan-3d/3.1/pro/image-to-3d, tencent/hunyuan-3d/3.1/pro/text-to-3d.
开始构建
通过 SandBase Unified Run API 提交此模型。
# The quoted heredoc keeps Unicode and shell metacharacters unchanged.
result=$(curl --fail-with-body --silent \
-X POST "https://api.sandbase.ai/v1/run" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
--data-binary @- <<'SANDBASE_JSON'
{
"model": "tencent/hunyuan-3d/v3/text-to-3d",
"prompt": "A rustic wooden treasure chest with metal bands and ornate lock",
"enable_pbr": false,
"face_count": 500000,
"polygon_type": "triangle",
"generate_type": "Normal"
}
SANDBASE_JSON
)
run_id=$(printf '%s' "$result" | jq -r .id)
for attempt in $(seq 1 120); do
status=$(printf '%s' "$result" | jq -r .status)
case "$status" in completed|failed|timeout) break ;; esac
sleep 2
result=$(curl --fail-with-body --silent \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
"https://api.sandbase.ai/v1/run/$run_id")
done
status=$(printf '%s' "$result" | jq -r .status)
[ "$status" = completed ] || { echo "Generation ended: $status" >&2; exit 1; }
printf '%s\n' "$result"创建一个 SandBase API 密钥,并将其设置到服务器环境中。所有请求都使用 Bearer 身份验证。
export SANDBASE_API_KEY="YOUR_API_KEY"请将密钥保存在服务器端。不要在浏览器代码中暴露它,也不要提交到仓库。
使用此模型 ID 及其输入向 /v1/run 发送 POST 请求。上方的请求示例包含提交和轮询。
使用返回的运行 ID 轮询,直到状态为 completed、failed 或 timeout。仅在 completed 后读取输出。
curl "https://api.sandbase.ai/v1/run/$RUN_ID" \
-H "Authorization: Bearer $SANDBASE_API_KEY"在模型的 image、video 或 audio 字段中传入一个可公开访问的文件 URL。支持的格式和限制显示在每个 Playground 输入项旁边。
在 Playground 中支持的图片字段上使用上传或替换控件。视频 URL 字段接受托管的 driving video;这并不表示支持视频上传。
promptstring必填Text description of the 3D object to generate. Up to 1024 characters.
enable_pbrbooleanGenerate PBR materials (metallic, roughness, normal maps). Ignored for Geometry output.
默认值:false
face_countintegerTarget polygon face count (40,000-1,500,000). Leave empty for the default of 500,000.
最小值:40000
最大值:1500000
polygon_typestringPolygon type. Only takes effect when Generate Type is LowPoly.
默认值:"triangle"
可选值:"triangle", "quadrilateral"
generate_typestringNormal: textured model. LowPoly: polygon reduction. Geometry: white model without texture.
默认值:"Normal"
可选值:"Normal", "LowPoly", "Geometry"
{
"model": "tencent/hunyuan-3d/v3/text-to-3d",
"prompt": "A rustic wooden treasure chest with metal bands and ornate lock",
"enable_pbr": false,
"face_count": 500000,
"polygon_type": "triangle",
"generate_type": "Normal"
}已完成的运行会在输出中展示结果。以下内容是该模型保存的示例,而不是新的生成结果。
[
{
"poster": "https://static.sandbase.ai/examples/22003e9c-9594-44af-ba64-e21cbf96d8c5/output/e92d18df-2657-479e-a8fa-3ca14c7f4b42.png",
"thumbnail": "https://static.sandbase.ai/examples/22003e9c-9594-44af-ba64-e21cbf96d8c5/output/e92d18df-2657-479e-a8fa-3ca14c7f4b42.png",
"url": "https://static.sandbase.ai/examples/22003e9c-9594-44af-ba64-e21cbf96d8c5/output/05198c59-b9e3-4e2e-8a91-630470d87905.glb"
}
]