pbrboolean
PBR material maps (base color, metallic, roughness, normal). true also turns texture on.
ค่าเริ่มต้น: true
tripo3d/tripo/textureTripo Texture paints new textures on an existing 3D model from a text prompt, one image or multiple views.
ลองใช้โมเดล
PNG, JPEG, WebP หรือ GIF · สูงสุด 20 MiB
PNG, JPEG, WebP, or GIF · 20 MiB maximum each · up to 4
PNG, JPEG, WebP หรือ GIF · สูงสุด 20 MiB
เอาต์พุตของคุณจะแสดงที่นี่
กรอกอินพุตให้ครบ แล้วคลิก Run
Tripo Texture paints new textures on an existing 3D model from a text prompt, one image or multiple views.
| Field | Type | Default | Notes |
|---|---|---|---|
model_url | string, required | — | URL of the input 3D model (GLB, GLTF, FBX, OBJ or STL, up to 150 MB). |
prompt | string | — | Text describing the texture (Tripo texture_prompt.text). |
image | string | — | Reference image for the texture (texture_prompt.image). Use prompt, image or images, not several. |
images | array | — | 2 to 4 reference views in the order front, left, back, right (texture_prompt.images). |
style_image | string | — | Style reference used together with prompt (texture_prompt.style_image). |
model_version | v3.5-20260815 / v3.0-20250812 / v2.5-20250123 | v3.5-20260815 | v3.5-20260815 is current; v3.0-20250812 runs as v3.5; v2.5-20250123 for models made with Tripo v2.5. |
texture_quality | fast / standard / detailed / extreme | standard | fast and standard cost the same; detailed (HD) and extreme (8K) are add-ons. |
pbr | boolean | true | PBR material maps (base color, metallic, roughness, normal). true also turns texture on. |
texture_alignment | original_image / geometry | original_image | original_image keeps textures close to the input image; geometry favors the mesh. |
delight | boolean | false | Remove baked-in lighting from the reference image before texturing (texture v3.5). |
bake | boolean | true | Bake advanced materials into the textures. |
part_names | array | — | Only process these parts (node names from a segmentation, e.g. tripo_part_0). All parts when unset. |
texture_seed | integer | — | Seed for texture generation. Keep seed and change texture_seed for new textures on the same geometry. |
compress | geometry | — | geometry applies meshopt compression to reduce file size. |
url: Textured GLB.thumbnail: Preview render.| texture_quality | Price |
|---|---|
| fast / standard | $0.10 |
| detailed | $0.20 |
| extreme (8K) | $0.30 |
| 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/texture",
"pbr": true,
"bake": true,
"image": "https://static.sandbase.ai/examples/tripo3d/tripo-h3.1/image-to-3d/input_image_0.png",
"prompt": "weathered bronze with green patina",
"delight": false,
"model_url": "https://static.sandbase.ai/examples/tripo3d/tripo/shared/object.glb",
"style_image": "https://static.sandbase.ai/examples/tripo3d/tripo-h3.1/image-to-3d/input_image_0.png",
"model_version": "v3.5-20260815",
"texture_quality": "standard",
"texture_alignment": "original_image"
}
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
bakebooleanBake advanced materials into the textures.
ค่าเริ่มต้น: true
imagestringReference image for the texture (texture_prompt.image). Use prompt, image or images, not several.
imagesarray2 to 4 reference views in the order front, left, back, right (texture_prompt.images).
promptstringText describing the texture (Tripo texture_prompt.text).
delightbooleanRemove baked-in lighting from the reference image before texturing (texture v3.5).
ค่าเริ่มต้น: false
compressstringgeometry applies meshopt compression to reduce file size.
ค่าที่เป็นไปได้: "geometry"
model_urlstringจำเป็นURL of the input 3D model (GLB, GLTF, FBX, OBJ or STL, up to 150 MB).
part_namesarrayOnly process these parts (node names from a segmentation, e.g. tripo_part_0). All parts when unset.
style_imagestringStyle reference used together with prompt (texture_prompt.style_image).
texture_seedintegerSeed for texture generation. Keep seed and change texture_seed for new textures on the same geometry.
model_versionstringv3.5-20260815 is current; v3.0-20250812 runs as v3.5; v2.5-20250123 for models made with Tripo v2.5.
ค่าเริ่มต้น: "v3.5-20260815"
ค่าที่เป็นไปได้: "v3.5-20260815", "v3.0-20250812", "v2.5-20250123"
texture_qualitystringfast and standard cost the same; detailed (HD) and extreme (8K) are add-ons.
ค่าเริ่มต้น: "standard"
ค่าที่เป็นไปได้: "fast", "standard", "detailed", "extreme"
texture_alignmentstringoriginal_image keeps textures close to the input image; geometry favors the mesh.
ค่าเริ่มต้น: "original_image"
ค่าที่เป็นไปได้: "original_image", "geometry"
{
"model": "tripo3d/tripo/texture",
"pbr": true,
"bake": true,
"image": "https://static.sandbase.ai/examples/tripo3d/tripo-h3.1/image-to-3d/input_image_0.png",
"prompt": "weathered bronze with green patina",
"delight": false,
"model_url": "https://static.sandbase.ai/examples/tripo3d/tripo/shared/object.glb",
"style_image": "https://static.sandbase.ai/examples/tripo3d/tripo-h3.1/image-to-3d/input_image_0.png",
"model_version": "v3.5-20260815",
"texture_quality": "standard",
"texture_alignment": "original_image"
}run ที่เสร็จสมบูรณ์จะแสดงผลลัพธ์ใน output ต่อไปนี้เป็นตัวอย่างที่บันทึกไว้ของโมเดล ไม่ใช่การสร้างใหม่
ยังไม่มีตัวอย่าง output เผยแพร่ในตอนนี้ ใช้ Playground → Result → JSON หลังจาก run เสร็จสมบูรณ์เพื่อตรวจสอบการตอบกลับของคุณ
โมเดลนี้ยังให้บริการบน 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/models/texture model เป็นตัวเลือกและใช้เลือกเวอร์ชันอัลกอริทึมของ Tripo; หากไม่ระบุจะใช้ค่าเริ่มต้นของ Tripo ตัวอย่างคำขอด้านบนในหัวข้อ Tripo v3 API แสดงการเรียกใช้งานครบถ้วน
Tripo ตั้งชื่ออินพุตเหล่านี้ต่างจากสคีมาด้านล่าง ฟิลด์อื่นทั้งหมดคงชื่อเดิม
| ฟิลด์ของสคีมา | ฟิลด์ของ Tripo |
|---|---|
model_url | input |
model_version | model |
prompt | texture_prompt.text |
image | texture_prompt.image |
images | texture_prompt.images |
style_image | texture_prompt.style_image |
อินพุตต้องเป็น 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