pbrboolean
PBR material maps (base color, metallic, roughness, normal). true also turns texture on.
Mặc định: true
tripo3d/tripo/textureTripo Texture paints new textures on an existing 3D model from a text prompt, one image or multiple views.
Thử model
PNG, JPEG, WebP hoặc GIF · tối đa 20 MiB
PNG, JPEG, WebP, or GIF · 20 MiB maximum each · up to 4
PNG, JPEG, WebP hoặc GIF · tối đa 20 MiB
Đầu ra của bạn sẽ xuất hiện ở đây
Hoàn tất đầu vào, rồi nhấp 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. |
Bắt đầu xây dựng
Chọn một API được hỗ trợ với xác thực và theo dõi mức sử dụng thống nhất.
# 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"Tạo một SandBase API key và đặt nó trong môi trường máy chủ của bạn. Tất cả request sử dụng xác thực Bearer.
export SANDBASE_API_KEY="YOUR_API_KEY"Giữ key trên máy chủ. Không hiển thị trong mã trình duyệt hoặc commit vào repository.
POST tới /v1/run với model ID này và các đầu vào của nó. Ví dụ request ở trên bao gồm cả bước gửi và polling.
Dùng run ID được trả về để poll cho đến khi trạng thái là completed, failed hoặc timeout. Chỉ đọc đầu ra sau khi completed.
curl "https://api.sandbase.ai/v1/run/$RUN_ID" \
-H "Authorization: Bearer $SANDBASE_API_KEY"Cung cấp một URL tệp có thể truy cập công khai trong trường image, video hoặc audio của model. Các định dạng và giới hạn được hỗ trợ hiển thị bên cạnh từng input trong Playground.
Dùng điều khiển upload hoặc replace trên các trường image được hỗ trợ trong Playground. Trường URL video chấp nhận một video driving được host; điều này không đồng nghĩa hỗ trợ tải lên video.
pbrbooleanPBR material maps (base color, metallic, roughness, normal). true also turns texture on.
Mặc định: true
bakebooleanBake advanced materials into the textures.
Mặc định: 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).
Mặc định: false
compressstringgeometry applies meshopt compression to reduce file size.
Giá trị có thể dùng: "geometry"
model_urlstringbắt buộcURL 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.
Mặc định: "v3.5-20260815"
Giá trị có thể dùng: "v3.5-20260815", "v3.0-20250812", "v2.5-20250123"
texture_qualitystringfast and standard cost the same; detailed (HD) and extreme (8K) are add-ons.
Mặc định: "standard"
Giá trị có thể dùng: "fast", "standard", "detailed", "extreme"
texture_alignmentstringoriginal_image keeps textures close to the input image; geometry favors the mesh.
Mặc định: "original_image"
Giá trị có thể dùng: "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"
}Một run đã hoàn tất sẽ hiển thị kết quả trong output. Phần sau là ví dụ đã lưu của model, không phải một lần tạo mới.
Chưa có đầu ra ví dụ nào được công bố. Dùng Playground → Result → JSON sau khi run hoàn tất để xem phản hồi của bạn.
Model này cũng được cung cấp trên Tripo v3 API. Phần thân yêu cầu, đối tượng tác vụ và mã lỗi tuân theo Tripo, nên mã Tripo hiện có sẽ chạy sau khi bạn đổi base URL thành https://api.sandbase.ai/tripo/v3 và gửi SandBase API key dưới dạng Authorization: Bearer. Các yêu cầu chạy trên kênh chính thức của Tripo với cùng mức giá như /v1/run.
POST https://api.sandbase.ai/tripo/v3/models/texture. model là tùy chọn và chọn phiên bản thuật toán Tripo; nếu bỏ qua, mặc định của Tripo sẽ được áp dụng. Ví dụ yêu cầu ở trên trong mục Tripo v3 API cho thấy một lệnh gọi hoàn chỉnh.
Tripo đặt tên các đầu vào này khác với Schema bên dưới. Mọi trường khác giữ nguyên tên.
| Trường Schema | Trường 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 |
Đầu vào là các URL công khai, dưới dạng chuỗi hoặc đối tượng có trường url. Hiện chưa chấp nhận mã tác vụ Tripo và giá trị file_token, chưa hỗ trợ tải tệp lên, và webhook_url bị bỏ qua.
Gửi yêu cầu sẽ trả về data.task_id. Thăm dò cho đến khi data.status là success, failed hoặc cancelled. Khi thành công, data.output dùng tên trường của Tripo như model_url, và credits_consumed là phí SandBase với 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 với {"task_ids": [...]} trả về tối đa 100 tác vụ. GET /tripo/v3/account/balance trả về số dư SandBase của bạn tính bằng credits.
Lỗi dùng cấu trúc của Tripo: {"code": 1004, "status": "error", "message": "..."}.
| code | Ý nghĩa |
|---|---|
2 / 1002 | Thiếu, không hợp lệ hoặc API key SandBase không được ủy quyền |
1003 | Phần thân không phải là một đối tượng JSON |
1004 | Thiếu hoặc sai tham số. Thông báo nêu tên trường Tripo |
1007 / 2000 | Đã đạt giới hạn tốc độ hoặc giới hạn đồng thời |
2001 | Không tìm thấy tác vụ, hoặc được tạo bằng API key khác |
2002 | Endpoint hoặc tính năng không được hỗ trợ trên SandBase |
2010 | Số dư SandBase không đủ hoặc đã đạt giới hạn chi tiêu của API key |
4001 | Endpoint không xác định |
Khi Tripo từ chối hoặc tác vụ thất bại, nó kết thúc ở failed với error_code và error_message của Tripo. Các mã liên quan đến yêu cầu hoặc nội dung của bạn được giữ nguyên; các mã liên quan đến tài khoản Tripo phía upstream được báo là 1000.