pbrboolean
PBR material maps (base color, metallic, roughness, normal). true also turns texture on.
ค่าเริ่มต้น: true
tripo3d/tripo-h3.1/text-to-3dTripo H3.1 is Tripo3D's text-to-3D AI model. Turn written descriptions into textured 3D objects with realistic geometry and materials.
ลองใช้โมเดล
ต้องการทำอะไรต่อ
เลือกตัวอย่างเพื่อโหลดอินพุตและผลลัพธ์ลงใน playground
{
"prompt": "A medieval wooden catapult with iron fittings and a stone in the basket"
}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 |
|---|---|---|---|
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 | 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. |
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. |
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.generated_image: Reference image Tripo generated from the prompt.$0.20 textured (standard or fast texture), $0.10 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/text-to-3d",
"pbr": true,
"quad": false,
"prompt": "A small house with a red roof and white walls",
"delight": false,
"texture": true,
"auto_size": false,
"export_uv": true,
"generate_parts": false,
"smart_low_poly": false,
"texture_quality": "standard",
"geometry_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 key และตั้งค่าไว้ในสภาพแวดล้อมฝั่งเซิร์ฟเวอร์ คำขอทั้งหมดใช้การยืนยันตัวตนแบบ Bearer
export SANDBASE_API_KEY="YOUR_API_KEY"เก็บ key ไว้บนเซิร์ฟเวอร์ อย่าเปิดเผยในโค้ดฝั่งเบราว์เซอร์หรือคอมมิตลง repository
POST ไปที่ /v1/run ด้วย model ID นี้และอินพุตของมัน ตัวอย่างคำขอด้านบนมีทั้งการส่งและการ polling
ใช้ run ID ที่ส่งกลับมาเพื่อ polling จนกว่าสถานะจะเป็น completed, failed หรือ timeout ให้อ่าน output หลังจาก completed เท่านั้น
curl "https://api.sandbase.ai/v1/run/$RUN_ID" \
-H "Authorization: Bearer $SANDBASE_API_KEY"ส่ง URL ไฟล์ที่เข้าถึงได้สาธารณะในช่อง image, video หรือ audio ของโมเดล รูปแบบและข้อจำกัดที่รองรับแสดงอยู่ข้างแต่ละอินพุตใน Playground
ใช้ตัวควบคุม upload หรือ replace ในช่องรูปภาพที่รองรับใน Playground ช่อง URL ของวิดีโอรองรับวิดีโอ driving ที่โฮสต์ไว้; ไม่ได้หมายความว่าสามารถอัปโหลดวิดีโอได้
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.
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
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
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.
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
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"
geometry_qualitystringdetailed (Ultra) adds mesh detail and is billed as an add-on.
ค่าเริ่มต้น: "standard"
ค่าที่เป็นไปได้: "standard", "detailed"
export_orientationstringForward axis of the exported model. Leave unset if you will post-process the model.
ค่าที่เป็นไปได้: "+x", "-x", "+y", "-y"
{
"model": "tripo3d/tripo-h3.1/text-to-3d",
"pbr": true,
"quad": false,
"prompt": "A small house with a red roof and white walls",
"delight": false,
"texture": true,
"auto_size": false,
"export_uv": true,
"generate_parts": false,
"smart_low_poly": false,
"texture_quality": "standard",
"geometry_quality": "standard"
}run ที่เสร็จสมบูรณ์จะแสดงผลลัพธ์ใน output ต่อไปนี้เป็นตัวอย่างที่บันทึกไว้ของโมเดล ไม่ใช่การสร้างใหม่
[
{
"poster": "https://static.sandbase.ai/examples/6e50ceac-bf0e-479c-9121-66e2c1ca0f45/output/23194dcf-21fa-4462-a1a7-b706540be775.png",
"thumbnail": "https://static.sandbase.ai/examples/6e50ceac-bf0e-479c-9121-66e2c1ca0f45/output/23194dcf-21fa-4462-a1a7-b706540be775.png",
"url": "https://static.sandbase.ai/examples/6e50ceac-bf0e-479c-9121-66e2c1ca0f45/output/4172f97c-8214-4aa5-97f4-a82b3081bb92.glb"
}
]โมเดลนี้ยังให้บริการบน Tripo's v3 API ด้วย เนื้อหาของคำขอ ออบเจ็กต์งาน และรหัสข้อผิดพลาดเป็นไปตาม Tripo ดังนั้นโค้ด Tripo เดิมจะใช้งานได้หลังจากคุณเปลี่ยน base URL เป็น https://api.sandbase.ai/tripo/v3 และส่ง SandBase API key เป็น Authorization: Bearer คำขอจะรันผ่านช่องทางทางการของ Tripo ในราคาเดียวกับ /v1/run
POST https://api.sandbase.ai/tripo/v3/generation/text-to-model พร้อม "model": "v3.1-20260211" ตัวอย่างคำขอด้านบนในหัวข้อ Tripo v3 API แสดงการเรียกใช้งานครบถ้วน
Tripo ตั้งชื่ออินพุตเหล่านี้ต่างจากสคีมาด้านล่าง ฟิลด์อื่นทั้งหมดคงชื่อเดิม
| ฟิลด์ของสคีมา | ฟิลด์ของ Tripo |
|---|---|
seed | model_seed |
อินพุตต้องเป็น URL สาธารณะ ในรูปแบบสตริงหรือออบเจ็กต์ที่มีฟิลด์ url ยังไม่รองรับ task id ของ Tripo และค่าของ 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"POST /tripo/v3/tasks/list พร้อม {"task_ids": [...]} จะส่งกลับ task ได้สูงสุด 100 รายการ GET /tripo/v3/account/balance จะส่งคืนยอดคงเหลือของ SandBase ในหน่วย credit
ข้อผิดพลาดใช้ envelope ของ Tripo: {"code": 1004, "status": "error", "message": "..."}
| code | ความหมาย |
|---|---|
2 / 1002 | ไม่มี API key ของ SandBase, API key ไม่ถูกต้อง หรือไม่ได้รับอนุญาต |
1003 | เนื้อหาไม่ใช่ออบเจ็กต์ JSON |
1004 | พารามิเตอร์หายไปหรือไม่ถูกต้อง ข้อความจะระบุฟิลด์ของ Tripo |
1007 / 2000 | ถึงขีดจำกัดอัตราเรียกใช้หรือขีดจำกัดการทำงานพร้อมกันแล้ว |
2001 | ไม่พบ task หรือสร้างด้วย API key อื่น |
2002 | endpoint หรือฟีเจอร์นี้ยังไม่รองรับบน SandBase |
2010 | ยอดคงเหลือ SandBase ไม่เพียงพอ หรือถึงขีดจำกัดการใช้จ่ายของ API key แล้ว |
4001 | ไม่รู้จัก endpoint |
เมื่อ Tripo ปฏิเสธหรือทำ task ไม่สำเร็จ ระบบจะจบที่ failed พร้อม error_code และ error_message ของ Tripo รหัสที่เกี่ยวกับคำขอหรือเนื้อหาของคุณจะส่งผ่านโดยไม่เปลี่ยนแปลง ส่วนรหัสที่เกี่ยวกับบัญชี Tripo ต้นทางจะแสดงเป็น 1000