pbrboolean
PBR material maps (base color, metallic, roughness, normal). true also turns texture on.
Mặc định: true
tripo3d/tripo-p2/text-to-3dTripo P2 is Tripo3D's latest flagship 3D generation model. It turns a text description into a production-ready mesh with optional PBR textures.
Thử model
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.
{
"prompt": "An ornate Japanese stone lantern covered in patches of green moss"
}Tripo P2 (P2-20260801) produces production-ready low-poly meshes with native quad topology (48–50,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 | 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. |
quad | boolean | false | Quad topology instead of triangles. Output becomes FBX; 10,000 faces when face_limit is unset. |
face_limit | integer 48–50000 | — | Maximum face count (48-50,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.$1.10 textured (standard or fast texture), $1.00 untextured (texture and pbr false).
| Add-on | Price |
|---|---|
| texture_quality = detailed | +$0.10 |
| texture_quality = extreme | +$0.20 |
| 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-p2/text-to-3d",
"pbr": true,
"quad": false,
"prompt": "A low-poly 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"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
quadbooleanQuad topology instead of triangles. Output becomes FBX; 10,000 faces when face_limit is unset.
Mặc định: false
seedintegerSeed for geometry generation (Tripo model_seed). Same seed and input give the same mesh.
promptstringbắt buộcText description of the 3D object to generate. Maximum 1024 characters.
delightbooleanRemove baked-in lighting from the reference image before texturing (texture v3.5).
Mặc định: false
texturebooleanGenerate textures. Set texture and pbr to false for bare geometry (cheaper).
Mặc định: true
auto_sizebooleanScale the model to real-world size in meters.
Mặc định: false
export_uvbooleanUV-unwrap during generation. false is faster and smaller; UVs are then made during texturing.
Mặc định: true
face_limitintegerMaximum face count (48-50,000). Adaptive when unset.
Tối thiểu: 48
Tối đa: 50000
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.
Mặc định: "standard"
Giá trị có thể dùng: "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.
Giá trị có thể dùng: "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.
Giá trị có thể dùng: "+x", "-x", "+y", "-y"
{
"model": "tripo3d/tripo-p2/text-to-3d",
"pbr": true,
"quad": false,
"prompt": "A low-poly wooden chair",
"delight": false,
"texture": true,
"auto_size": false,
"export_uv": true,
"texture_quality": "standard"
}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/b5b23cf2-90da-449b-9ecf-20c92e6ecd62/output/8155919a-22c7-4fd3-9309-0cb2eb4cf932.png",
"thumbnail": "https://static.sandbase.ai/examples/b5b23cf2-90da-449b-9ecf-20c92e6ecd62/output/8155919a-22c7-4fd3-9309-0cb2eb4cf932.png",
"url": "https://static.sandbase.ai/examples/b5b23cf2-90da-449b-9ecf-20c92e6ecd62/output/ee5e92f5-e505-44a4-8e4a-9357ecc235fa.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/text-to-model với "model": "P2-20260801". 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 |
|---|---|
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.