pbrboolean
PBR material maps (base color, metallic, roughness, normal). true also turns texture on.
默认值:true
tripo3d/tripo-h3.1/image-to-3dTripo H3.1 by Tripo3D - convert 2D images into 3D models with AI. Generate textured 3D assets from single photos for games, AR/VR, e-commerce, and digital content creation.
试用该模型
PNG、JPEG、WebP 或 GIF · 最大 20 MiB
选择一个示例,将其输入和结果加载到 playground 中。
{
"image": "https://static.sandbase.ai/examples/33fdcc66-c331-4b8f-a4b0-95e695982eee/input/bb9227a2-ef6e-4c7d-afa4-073779ff3a60.png"
}Tripo H3.1 (v3.1-20260211) is Tripo's recommended high-detail model, with HD geometry, quad, smart low-poly and part generation.
| Field | Type | Default | Notes |
|---|---|---|---|
image | string, required | — | URL of the input image for 3D model creation. |
texture | boolean | true | Generate textures. Set texture and pbr to false for bare geometry (cheaper). |
pbr | boolean | true | PBR material maps (base color, metallic, roughness, normal). true also turns texture on. |
texture_quality | fast / standard / detailed / extreme | standard | fast and standard cost the same; detailed (HD) and extreme (8K) are add-ons. |
geometry_quality | standard / detailed | standard | detailed (Ultra) adds mesh detail and is billed as an add-on. |
quad | boolean | false | Quad topology instead of triangles. Output becomes FBX; 10,000 faces when face_limit is unset. |
smart_low_poly | boolean | false | Hand-crafted style low-poly topology (500-20,000 faces). Best for simple objects; billed as an add-on. |
generate_parts | boolean | false | Editable segmented parts. Requires texture=false and pbr=false; billed as an add-on. |
face_limit | integer | — | Maximum face count, up to 2,000,000 (detailed geometry) or 1,500,000; 10,000-150,000 typical for quad. Adaptive when unset. |
texture_alignment | original_image / geometry | original_image | original_image keeps textures close to the input image; geometry favors the mesh. |
orientation | default / align_image | default | align_image rotates the model to match the input image (needs texture). |
enable_image_autofix | boolean | false | Enhance the input image before generation. |
seed | integer | — | Seed for geometry generation (Tripo model_seed). Same seed and input give the same mesh. |
texture_seed | integer | — | Seed for texture generation. Keep seed and change texture_seed for new textures on the same geometry. |
texture_version | v3.5-20260815 / v3.0-20250812 / v2.5-20250123 | — | Texture model. v3.5-20260815 is current (v3.0-20250812 runs as v3.5); v2.5-20250123 is the legacy texture model and the default for v2.5 geometry. |
delight | boolean | false | Remove baked-in lighting from the reference image before texturing (texture v3.5). |
export_uv | boolean | true | UV-unwrap during generation. false is faster and smaller; UVs are then made during texturing. |
export_orientation | +x / -x / +y / -y | — | Forward axis of the exported model. Leave unset if you will post-process the model. |
compress | geometry | — | geometry applies meshopt compression to reduce file size. |
auto_size | boolean | false | Scale the model to real-world size in meters. |
url: 3D model (GLB; FBX when quad is on).thumbnail: Preview render.$0.30 textured (standard or fast texture), $0.20 untextured (texture and pbr false).
| Add-on | Price |
|---|---|
| texture_quality = detailed | +$0.10 |
| texture_quality = extreme | +$0.20 |
| geometry_quality = detailed | +$0.20 |
| quad | +$0.05 |
| smart_low_poly | +$0.10 |
| generate_parts | +$0.20 |
| Failed runs are not charged. |
开始构建
选择任一受支持的 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": "tripo3d/tripo-h3.1/image-to-3d",
"pbr": true,
"quad": false,
"image": "https://static.sandbase.ai/examples/tripo3d/tripo-h3.1/image-to-3d/input_image_0.png",
"delight": false,
"texture": true,
"auto_size": false,
"export_uv": true,
"orientation": "default",
"generate_parts": false,
"smart_low_poly": false,
"texture_quality": "standard",
"geometry_quality": "standard",
"texture_alignment": "original_image",
"enable_image_autofix": false
}
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;这并不表示支持视频上传。
pbrbooleanPBR material maps (base color, metallic, roughness, normal). true also turns texture on.
默认值:true
quadbooleanQuad topology instead of triangles. Output becomes FBX; 10,000 faces when face_limit is unset.
默认值:false
seedintegerSeed for geometry generation (Tripo model_seed). Same seed and input give the same mesh.
imagestring必填URL of the input image for 3D model creation.
delightbooleanRemove baked-in lighting from the reference image before texturing (texture v3.5).
默认值:false
texturebooleanGenerate textures. Set texture and pbr to false for bare geometry (cheaper).
默认值:true
compressstringgeometry applies meshopt compression to reduce file size.
可选值:"geometry"
auto_sizebooleanScale the model to real-world size in meters.
默认值:false
export_uvbooleanUV-unwrap during generation. false is faster and smaller; UVs are then made during texturing.
默认值:true
face_limitintegerMaximum face count, up to 2,000,000 (detailed geometry) or 1,500,000; 10,000-150,000 typical for quad. Adaptive when unset.
最大值:2000000
orientationstringalign_image rotates the model to match the input image (needs texture).
默认值:"default"
可选值:"default", "align_image"
texture_seedintegerSeed for texture generation. Keep seed and change texture_seed for new textures on the same geometry.
generate_partsbooleanEditable segmented parts. Requires texture=false and pbr=false; billed as an add-on.
默认值:false
smart_low_polybooleanHand-crafted style low-poly topology (500-20,000 faces). Best for simple objects; billed as an add-on.
默认值:false
texture_qualitystringfast and standard cost the same; detailed (HD) and extreme (8K) are add-ons.
默认值:"standard"
可选值:"fast", "standard", "detailed", "extreme"
texture_versionstringTexture model. v3.5-20260815 is current (v3.0-20250812 runs as v3.5); v2.5-20250123 is the legacy texture model and the default for v2.5 geometry.
可选值:"v3.5-20260815", "v3.0-20250812", "v2.5-20250123"
geometry_qualitystringdetailed (Ultra) adds mesh detail and is billed as an add-on.
默认值:"standard"
可选值:"standard", "detailed"
texture_alignmentstringoriginal_image keeps textures close to the input image; geometry favors the mesh.
默认值:"original_image"
可选值:"original_image", "geometry"
export_orientationstringForward axis of the exported model. Leave unset if you will post-process the model.
可选值:"+x", "-x", "+y", "-y"
enable_image_autofixbooleanEnhance the input image before generation.
默认值:false
{
"model": "tripo3d/tripo-h3.1/image-to-3d",
"pbr": true,
"quad": false,
"image": "https://static.sandbase.ai/examples/tripo3d/tripo-h3.1/image-to-3d/input_image_0.png",
"delight": false,
"texture": true,
"auto_size": false,
"export_uv": true,
"orientation": "default",
"generate_parts": false,
"smart_low_poly": false,
"texture_quality": "standard",
"geometry_quality": "standard",
"texture_alignment": "original_image",
"enable_image_autofix": false
}已完成的运行会在输出中展示结果。以下内容是该模型保存的示例,而不是新的生成结果。
[
{
"poster": "https://static.sandbase.ai/examples/33fdcc66-c331-4b8f-a4b0-95e695982eee/output/e0e4ca49-df76-4cc6-99d1-17d251e703dd.png",
"thumbnail": "https://static.sandbase.ai/examples/33fdcc66-c331-4b8f-a4b0-95e695982eee/output/e0e4ca49-df76-4cc6-99d1-17d251e703dd.png",
"url": "https://static.sandbase.ai/examples/33fdcc66-c331-4b8f-a4b0-95e695982eee/output/838bde62-7435-4282-b12a-7a70ac00ccd8.glb"
}
]此模型也通过 Tripo 的 v3 API 提供。请求体、任务对象和错误码都遵循 Tripo,因此只要将 base URL 改为 https://api.sandbase.ai/tripo/v3 并以 Authorization: Bearer 发送 SandBase API key,现有 Tripo 代码即可继续工作。请求会通过 Tripo 官方通道运行,价格与 /v1/run 相同。
带有 "model": "v3.1-20260211" 的 POST https://api.sandbase.ai/tripo/v3/generation/image-to-model。上方 Tripo v3 API 下的请求示例展示了完整调用。
Tripo 对这些输入的命名与下面的 Schema 不同。其他所有字段都保持原名。
| Schema 字段 | Tripo 字段 |
|---|---|
image | input |
seed | model_seed |
输入为公开 URL,可以是字符串,也可以是带有 url 字段的对象。目前不接受 Tripo 任务 id 和 file_token 值,不支持文件上传,webhook_url 会被忽略。
提交后返回 data.task_id。持续轮询,直到 data.status 为 success、failed 或 cancelled。成功时,data.output 使用 Tripo 字段名,例如 model_url,credits_consumed 是 SandBase 的扣费,1 credit = $0.01。
curl "https://api.sandbase.ai/tripo/v3/tasks/$TASK_ID" \
-H "Authorization: Bearer $SANDBASE_API_KEY"带有 {"task_ids": [...]} 的 POST /tripo/v3/tasks/list 最多返回 100 个任务。GET /tripo/v3/account/balance 返回你在 SandBase 的 credits 余额。
错误使用 Tripo 的响应封装:{"code": 1004, "status": "error", "message": "..."}。
| code | 含义 |
|---|---|
2 / 1002 | 缺少、无效或未授权的 SandBase API key |
1003 | 请求体不是 JSON 对象 |
1004 | 缺少或无效的参数。消息会注明 Tripo 字段名 |
1007 / 2000 | 达到速率限制或并发限制 |
2001 | 未找到任务,或该任务是用另一个 API key 创建的 |
2002 | SandBase 不支持该端点或功能 |
2010 | SandBase 余额不足或已达到 API key 消费限额 |
4001 | 未知端点 |
当 Tripo 拒绝或失败一个任务时,它会以 failed 结束,并带有 Tripo 的 error_code 和 error_message。与你的请求或内容相关的代码会原样透传;与上游 Tripo 账户相关的代码会报告为 1000。