pbrboolean
Generate PBR materials.
Mặc định: false
tripo3d/tripo-v2.5/image-to-3dTripo v2.5 by Tripo3D generates a textured 3D mesh from a single image, with optional HD textures, PBR materials and quad topology.
Thử model
PNG, JPEG, WebP hoặc GIF · tối đa 20 MiB
Bạn muốn làm gì tiếp theo?
Chọn một ví dụ để nạp đầu vào và kết quả của nó vào playground.
{
"image": "https://static.sandbase.ai/examples/20dc0941-0d15-4467-9387-f1c3018cabba/input/73d6d211-722b-4b2c-9616-4f48332d7c75.png"
}Tripo v2.5 by Tripo3D generates a textured 3D mesh from a single image, with optional HD textures, PBR materials and quad topology.
| Field | Type | Default | Notes |
|---|---|---|---|
image | string, required | — | Input image URL for 3D model creation. |
texture | no / standard / HD | standard | Texture quality: no (untextured), standard, or HD. |
pbr | boolean | false | Generate PBR materials. |
quad | boolean | false | Generate quad mesh topology (billed as an add-on). |
face_limit | integer 1000–500000 | — | Maximum face count (1,000-500,000). Adaptive when unset. |
orientation | default / align_image | default | Set to align_image to rotate the model to match the input image. |
seed | integer | — | Seed for reproducible geometry generation. |
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 | — | Accepted for compatibility with Tripo: v2.5 geometry is always textured with v2.5-20250123, whatever this field says. |
delight | boolean | false | Accepted for compatibility with Tripo; only the v3.5 texture model reads it, so it has no effect on v2.5. |
export_orientation | +x / -x / +y / -y | — | Forward axis of the exported model. Leave unset if you will post-process the model. |
export_uv | boolean | true | UV-unwrap during generation. false is faster and smaller; UVs are then made during texturing. |
texture_alignment | original_image / geometry | original_image | original_image keeps textures close to the input image; geometry favors the mesh. |
enable_image_autofix | boolean | false | Enhance the input image before generation. |
url: 3D model (GLB; FBX when quad is on).thumbnail: Preview render.$0.30 textured, $0.20 untextured (texture = no and pbr off).
| Add-on | Price |
|---|---|
| texture = HD | +$0.10 |
| quad | +$0.05 |
| 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-v2.5/image-to-3d",
"pbr": false,
"quad": false,
"image": "https://static.sandbase.ai/examples/tripo3d/tripo/shared/front.jpg",
"delight": false,
"texture": "standard",
"export_uv": true,
"orientation": "default",
"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"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.
pbrbooleanGenerate PBR materials.
Mặc định: false
quadbooleanGenerate quad mesh topology (billed as an add-on).
Mặc định: false
seedintegerSeed for reproducible geometry generation.
imagestringbắt buộcInput image URL for 3D model creation.
delightbooleanAccepted for compatibility with Tripo; only the v3.5 texture model reads it, so it has no effect on v2.5.
Mặc định: false
texturestringTexture quality: no (untextured), standard, or HD.
Mặc định: "standard"
Giá trị có thể dùng: "no", "standard", "HD"
export_uvbooleanUV-unwrap during generation. false is faster and smaller; UVs are then made during texturing.
Mặc định: true
face_limitintegerMaximum face count (1,000-500,000). Adaptive when unset.
Tối thiểu: 1000
Tối đa: 500000
orientationstringSet to align_image to rotate the model to match the input image.
Mặc định: "default"
Giá trị có thể dùng: "default", "align_image"
texture_seedintegerSeed for texture generation. Keep seed and change texture_seed for new textures on the same geometry.
texture_versionstringAccepted for compatibility with Tripo: v2.5 geometry is always textured with v2.5-20250123, whatever this field says.
Giá trị có thể dùng: "v3.5-20260815", "v3.0-20250812", "v2.5-20250123"
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"
export_orientationstringForward axis of the exported model. Leave unset if you will post-process the model.
Giá trị có thể dùng: "+x", "-x", "+y", "-y"
enable_image_autofixbooleanEnhance the input image before generation.
Mặc định: false
{
"model": "tripo3d/tripo-v2.5/image-to-3d",
"pbr": false,
"quad": false,
"image": "https://static.sandbase.ai/examples/tripo3d/tripo/shared/front.jpg",
"delight": false,
"texture": "standard",
"export_uv": true,
"orientation": "default",
"texture_alignment": "original_image",
"enable_image_autofix": false
}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.
[
{
"poster": "https://static.sandbase.ai/examples/20dc0941-0d15-4467-9387-f1c3018cabba/output/93c446cd-eb80-439f-af04-84f1cb87a0fb.webp",
"thumbnail": "https://static.sandbase.ai/examples/20dc0941-0d15-4467-9387-f1c3018cabba/output/93c446cd-eb80-439f-af04-84f1cb87a0fb.webp",
"url": "https://static.sandbase.ai/examples/20dc0941-0d15-4467-9387-f1c3018cabba/output/2d8b7664-5b8c-43e1-8058-3817f047dd43.glb"
}
]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/generation/image-to-model với "model": "v2.5-20250123". 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 |
|---|---|
image | input |
seed | model_seed |
Đầ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.