bakeboolean
Bake advanced materials into the textures.
Domyślnie: true
tripo3d/tripo/convertTripo Convert exports a 3D model to GLTF, FBX, USDZ, OBJ, STL or 3MF, with optional quad remesh, scaling and texture settings.
Wypróbuj model
Twój wynik pojawi się tutaj
Uzupełnij dane wejściowe, a następnie kliknij Uruchom.
Tripo Convert exports a 3D model to GLTF, FBX, USDZ, OBJ, STL or 3MF, with optional quad remesh, scaling and texture settings.
| Field | Type | Default | Notes |
|---|---|---|---|
model_url | string, required | — | URL of the input 3D model (GLB, GLTF, FBX, OBJ or STL, up to 150 MB). |
format | GLTF / FBX / USDZ / OBJ / STL / 3MF, required | FBX | Output format. |
quad | boolean | false | Quad remesh (10,000 faces when face_limit is unset). Forces FBX. |
force_symmetry | boolean | false | Symmetric quad mesh. Only with quad. |
face_limit | integer | — | Target face count. Original when unset. |
texture_size | integer | 4096 | Texture size in pixels. |
texture_format | JPEG / PNG / WEBP / BMP / DPX / HDR / OPEN_EXR / TARGA / TIFF | JPEG | Texture image format. |
bake | boolean | true | Bake advanced materials into the textures. |
pack_uv | boolean | false | Pack all UV islands into one texture. |
export_vertex_colors | boolean | false | Vertex colors (OBJ and GLTF only). |
flatten_bottom | boolean | false | Flatten the bottom of the model. |
flatten_bottom_threshold | number | 0.01 | Depth flattened when flatten_bottom is on. |
pivot_to_center_bottom | boolean | false | Move the pivot to the bottom center. |
scale_factor | number | 1 | Uniform scale. |
with_animation | boolean | true | Keep animations. |
animate_in_place | boolean | false | Remove root motion from animations. |
part_names | array | — | Only process these parts (node names from a segmentation, e.g. tripo_part_0). All parts when unset. |
export_orientation | +x / -x / +y / -y | — | Forward axis of the exported model. |
fbx_preset | blender / 3dsmax / mixamo / bake_scale | blender | FBX target application. |
texture_packaging | embedded / zip | embedded | FBX only: embedded textures, or a zip with the FBX and a .fbm folder. |
url: Converted model file (a .zip when texture_packaging is zip).$0.05 per conversion; $0.10 when any of quad, face_limit, flatten_bottom, flatten_bottom_threshold, texture_size, texture_format, pivot_to_center_bottom or scale_factor is not the default. Failed runs are not charged.
Zacznij tworzyć
Wybierz dowolne obsługiwane API z jednolitym uwierzytelnianiem i śledzeniem użycia.
# 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/convert",
"bake": true,
"quad": false,
"format": "FBX",
"pack_uv": false,
"model_url": "https://static.sandbase.ai/examples/tripo3d/tripo/shared/object.glb",
"fbx_preset": "blender",
"scale_factor": 1,
"texture_size": 4096,
"flatten_bottom": false,
"force_symmetry": false,
"texture_format": "JPEG",
"with_animation": true,
"animate_in_place": false,
"texture_packaging": "embedded",
"export_vertex_colors": false,
"pivot_to_center_bottom": false,
"flatten_bottom_threshold": 0.01
}
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"Utwórz klucz API SandBase i ustaw go w środowisku serwera. Wszystkie żądania używają uwierzytelniania Bearer.
export SANDBASE_API_KEY="YOUR_API_KEY"Przechowuj klucz na serwerze. Nie ujawniaj go w kodzie przeglądarkowym ani nie commituj do repozytorium.
Wyślij POST do /v1/run z tym identyfikatorem modelu i jego danymi wejściowymi. Powyższy przykład żądania obejmuje wysyłanie i odpytywanie statusu.
Użyj zwróconego ID uruchomienia, aby odpytywać status do momentu completion, failed lub timeout. Odczytaj wynik dopiero po completion.
curl "https://api.sandbase.ai/v1/run/$RUN_ID" \
-H "Authorization: Bearer $SANDBASE_API_KEY"Przekaż publicznie dostępny URL pliku w polu image, video lub audio modelu. Obsługiwane formaty i limity są pokazane obok każdego pola wejściowego w Playground.
Użyj kontrolki upload lub replace w obsługiwanych polach image w Playground. Pola URL wideo akceptują hostowany film źródłowy; nie oznacza to obsługi przesyłania wideo.
bakebooleanBake advanced materials into the textures.
Domyślnie: true
quadbooleanQuad remesh (10,000 faces when face_limit is unset). Forces FBX.
Domyślnie: false
formatstringwymaganeOutput format.
Domyślnie: "FBX"
Możliwe wartości: "GLTF", "FBX", "USDZ", "OBJ", "STL", "3MF"
pack_uvbooleanPack all UV islands into one texture.
Domyślnie: false
model_urlstringwymaganeURL of the input 3D model (GLB, GLTF, FBX, OBJ or STL, up to 150 MB).
face_limitintegerTarget face count. Original when unset.
Minimum: 1
fbx_presetstringFBX target application.
Domyślnie: "blender"
Możliwe wartości: "blender", "3dsmax", "mixamo", "bake_scale"
part_namesarrayOnly process these parts (node names from a segmentation, e.g. tripo_part_0). All parts when unset.
scale_factornumberUniform scale.
Domyślnie: 1
texture_sizeintegerTexture size in pixels.
Domyślnie: 4096
flatten_bottombooleanFlatten the bottom of the model.
Domyślnie: false
force_symmetrybooleanSymmetric quad mesh. Only with quad.
Domyślnie: false
texture_formatstringTexture image format.
Domyślnie: "JPEG"
Możliwe wartości: "JPEG", "PNG", "WEBP", "BMP", "DPX", "HDR", "OPEN_EXR", "TARGA", "TIFF"
with_animationbooleanKeep animations.
Domyślnie: true
animate_in_placebooleanRemove root motion from animations.
Domyślnie: false
texture_packagingstringFBX only: embedded textures, or a zip with the FBX and a .fbm folder.
Domyślnie: "embedded"
Możliwe wartości: "embedded", "zip"
export_orientationstringForward axis of the exported model.
Możliwe wartości: "+x", "-x", "+y", "-y"
export_vertex_colorsbooleanVertex colors (OBJ and GLTF only).
Domyślnie: false
pivot_to_center_bottombooleanMove the pivot to the bottom center.
Domyślnie: false
flatten_bottom_thresholdnumberDepth flattened when flatten_bottom is on.
Domyślnie: 0.01
{
"model": "tripo3d/tripo/convert",
"bake": true,
"quad": false,
"format": "FBX",
"pack_uv": false,
"model_url": "https://static.sandbase.ai/examples/tripo3d/tripo/shared/object.glb",
"fbx_preset": "blender",
"scale_factor": 1,
"texture_size": 4096,
"flatten_bottom": false,
"force_symmetry": false,
"texture_format": "JPEG",
"with_animation": true,
"animate_in_place": false,
"texture_packaging": "embedded",
"export_vertex_colors": false,
"pivot_to_center_bottom": false,
"flatten_bottom_threshold": 0.01
}Zakończone uruchomienie udostępnia swój wynik w output. Poniżej znajduje się zapisany przykład modelu, a nie nowa generacja.
Nie opublikowano jeszcze przykładowego output. Użyj Playground → Result → JSON po zakończonym uruchomieniu, aby sprawdzić odpowiedź.
Ten model jest też dostępny przez Tripo v3 API. Ciała żądań, obiekty zadań i kody błędów są zgodne z Tripo, więc istniejący kod Tripo będzie działał po zmianie adresu bazowego na https://api.sandbase.ai/tripo/v3 i wysłaniu klucza API SandBase jako Authorization: Bearer. Żądania są wykonywane w oficjalnym kanale Tripo, w tej samej cenie co /v1/run.
POST https://api.sandbase.ai/tripo/v3/models/convert. model jest opcjonalne i wybiera wersję algorytmu Tripo; jeśli zostanie pominięte, obowiązuje domyślna wersja Tripo. Przykład żądania powyżej w sekcji Tripo v3 API pokazuje pełne wywołanie.
Tripo nazywa te wejścia inaczej niż poniższy schemat. Wszystkie pozostałe pola zachowują swoje nazwy.
| Pole schematu | Pole Tripo |
|---|---|
model_url | input |
Wejściami są publiczne adresy URL, jako ciąg znaków lub obiekt z polem url. Identyfikatory zadań Tripo i wartości file_token nie są jeszcze akceptowane, przesyłanie plików nie jest dostępne, a webhook_url jest ignorowane.
Przesłanie zwraca data.task_id. Odpytywanie trwa, aż data.status będzie równe success, failed lub cancelled. Po powodzeniu data.output używa nazw pól Tripo, takich jak model_url, a credits_consumed to opłata SandBase przy kursie 1 kredyt = $0.01.
curl "https://api.sandbase.ai/tripo/v3/tasks/$TASK_ID" \
-H "Authorization: Bearer $SANDBASE_API_KEY"POST /tripo/v3/tasks/list z {"task_ids": [...]} zwraca do 100 zadań. GET /tripo/v3/account/balance zwraca saldo SandBase w kredytach.
Błędy używają struktury Tripo: {"code": 1004, "status": "error", "message": "..."}.
| code | Znaczenie |
|---|---|
2 / 1002 | Brakujący, nieprawidłowy lub nieautoryzowany klucz API SandBase |
1003 | Treść nie jest obiektem JSON |
1004 | Brakujący lub nieprawidłowy parametr. Komunikat podaje nazwę pola Tripo |
1007 / 2000 | Osiągnięto limit liczby żądań lub limit współbieżności |
2001 | Nie znaleziono zadania albo zostało utworzone innym kluczem API |
2002 | Punkt końcowy lub funkcja nieobsługiwana w SandBase |
2010 | Niewystarczające saldo SandBase lub osiągnięto limit wydatków klucza API |
4001 | Nieznany punkt końcowy |
Gdy Tripo odrzuca zadanie lub kończy się ono niepowodzeniem, otrzymuje status failed wraz z error_code i error_message od Tripo. Kody dotyczące Twojego żądania lub treści są przekazywane bez zmian; kody dotyczące nadrzędnego konta Tripo są raportowane jako 1000.