pbrboolean
PBR material maps (base color, metallic, roughness, normal). true also turns texture on.
默认值:false
tripo3d/tripo-p1/text-to-3dTripo P1 is Tripo3D's text-to-3D model. It generates a 3D mesh with optional textures from a text description.
试用该模型
选择一个示例,将其输入和结果加载到 playground 中。
{
"prompt": "A potted bonsai tree with twisted trunk and lush green foliage in a glazed blue pot"
}Tripo P1 (P1-20260311) produces clean low-poly meshes (50–20,000 faces).
| Field | Type | Default | Notes |
|---|---|---|---|
prompt | string, required | — | Text description of the 3D object to generate. Maximum 1024 characters. |
negative_prompt | string | — | What to avoid, up to 255 characters. |
texture | boolean | true | Generate textures. Set texture and pbr to false for bare geometry (cheaper). |
pbr | boolean | false | 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. |
face_limit | integer 50–20000 | — | Maximum face count (50-20,000). Adaptive when unset. |
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. |
image_seed | integer | — | Seed for the internal text-to-image step. |
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. |
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.generated_image: Reference image Tripo generated from the prompt.$0.40 textured (standard or fast texture), $0.30 untextured (texture and pbr false).
| Add-on | Price |
|---|---|
| texture_quality = detailed | +$0.10 |
| texture_quality = extreme | +$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-p1/text-to-3d",
"pbr": false,
"prompt": "A simple wooden chair",
"delight": false,
"texture": true,
"auto_size": false,
"export_uv": true,
"texture_quality": "standard"
}
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.
默认值:false
seedintegerSeed for geometry generation (Tripo model_seed). Same seed and input give the same mesh.
promptstring必填Text description of the 3D object to generate. Maximum 1024 characters.
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
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 (50-20,000). Adaptive when unset.
最小值:50
最大值:20000
image_seedintegerSeed for the internal text-to-image step.
texture_seedintegerSeed for texture generation. Keep seed and change texture_seed for new textures on the same geometry.
negative_promptstringWhat to avoid, up to 255 characters.
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"
export_orientationstringForward axis of the exported model. Leave unset if you will post-process the model.
可选值:"+x", "-x", "+y", "-y"
{
"model": "tripo3d/tripo-p1/text-to-3d",
"pbr": false,
"prompt": "A simple wooden chair",
"delight": false,
"texture": true,
"auto_size": false,
"export_uv": true,
"texture_quality": "standard"
}已完成的运行会在输出中展示结果。以下内容是该模型保存的示例,而不是新的生成结果。
[
{
"poster": "https://static.sandbase.ai/examples/8030312c-3eb2-43b9-afe3-3ba4346a83a5/output/067959ca-989b-47b5-a659-e217d79410e5.png",
"thumbnail": "https://static.sandbase.ai/examples/8030312c-3eb2-43b9-afe3-3ba4346a83a5/output/067959ca-989b-47b5-a659-e217d79410e5.png",
"url": "https://static.sandbase.ai/examples/8030312c-3eb2-43b9-afe3-3ba4346a83a5/output/1577fbd2-22da-4fe0-adbf-98289ee3d3ec.glb"
}
]此模型也通过 Tripo 的 v3 API 提供。请求体、任务对象和错误码都遵循 Tripo,因此只要将 base URL 改为 https://api.sandbase.ai/tripo/v3 并以 Authorization: Bearer 发送 SandBase API key,现有 Tripo 代码即可继续工作。请求会通过 Tripo 官方通道运行,价格与 /v1/run 相同。
带有 "model": "P1-20260311" 的 POST https://api.sandbase.ai/tripo/v3/generation/text-to-model。上方 Tripo v3 API 下的请求示例展示了完整调用。
Tripo 对这些输入的命名与下面的 Schema 不同。其他所有字段都保持原名。
| Schema 字段 | Tripo 字段 |
|---|---|
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。