bakeboolean
Bake advanced materials into the textures.
По умолчанию: 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.
Попробовать модель
Ваш результат появится здесь
Заполните входные данные, затем нажмите «Запустить».
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.
Начните разработку
Выберите любой поддерживаемый 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/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"Создайте ключ SandBase API и задайте его в окружении сервера. Все запросы используют аутентификацию Bearer.
export SANDBASE_API_KEY="YOUR_API_KEY"Храните ключ на сервере. Не раскрывайте его в коде браузера и не коммитьте в репозиторий.
Отправьте POST на /v1/run с этим ID модели и её входными данными. Пример запроса выше включает отправку и опрос.
Используйте возвращённый ID запуска, чтобы опрашивать статус до завершения, ошибки или таймаута. Читайте вывод только после завершения.
curl "https://api.sandbase.ai/v1/run/$RUN_ID" \
-H "Authorization: Bearer $SANDBASE_API_KEY"Передайте публично доступный URL файла в поле image, video или audio модели. Поддерживаемые форматы и лимиты показаны рядом с каждым полем Playground.
Используйте управление загрузкой или заменой в поддерживаемых полях изображений в Playground. Поля URL видео принимают размещённое видео для вождения; это не означает поддержку загрузки видео.
bakebooleanBake advanced materials into the textures.
По умолчанию: true
quadbooleanQuad remesh (10,000 faces when face_limit is unset). Forces FBX.
По умолчанию: false
formatstringобязательноOutput format.
По умолчанию: "FBX"
Возможные значения: "GLTF", "FBX", "USDZ", "OBJ", "STL", "3MF"
pack_uvbooleanPack all UV islands into one texture.
По умолчанию: false
model_urlstringобязательноURL of the input 3D model (GLB, GLTF, FBX, OBJ or STL, up to 150 MB).
face_limitintegerTarget face count. Original when unset.
Минимум: 1
fbx_presetstringFBX target application.
По умолчанию: "blender"
Возможные значения: "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.
По умолчанию: 1
texture_sizeintegerTexture size in pixels.
По умолчанию: 4096
flatten_bottombooleanFlatten the bottom of the model.
По умолчанию: false
force_symmetrybooleanSymmetric quad mesh. Only with quad.
По умолчанию: false
texture_formatstringTexture image format.
По умолчанию: "JPEG"
Возможные значения: "JPEG", "PNG", "WEBP", "BMP", "DPX", "HDR", "OPEN_EXR", "TARGA", "TIFF"
with_animationbooleanKeep animations.
По умолчанию: true
animate_in_placebooleanRemove root motion from animations.
По умолчанию: false
texture_packagingstringFBX only: embedded textures, or a zip with the FBX and a .fbm folder.
По умолчанию: "embedded"
Возможные значения: "embedded", "zip"
export_orientationstringForward axis of the exported model.
Возможные значения: "+x", "-x", "+y", "-y"
export_vertex_colorsbooleanVertex colors (OBJ and GLTF only).
По умолчанию: false
pivot_to_center_bottombooleanMove the pivot to the bottom center.
По умолчанию: false
flatten_bottom_thresholdnumberDepth flattened when flatten_bottom is on.
По умолчанию: 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
}В завершённом запуске результат доступен в output. Ниже приведён сохранённый пример модели, а не новая генерация.
Пример вывода ещё не опубликован. После завершённого запуска откройте Playground → Result → JSON, чтобы посмотреть ответ.
Эта модель также доступна через Tripo v3 API. Тела запросов, объекты задач и коды ошибок соответствуют Tripo, поэтому существующий код Tripo будет работать после изменения базового URL на https://api.sandbase.ai/tripo/v3 и передачи ключа SandBase API как Authorization: Bearer. Запросы выполняются через официальный канал Tripo по той же цене, что и /v1/run.
POST https://api.sandbase.ai/tripo/v3/models/convert. model необязателен и выбирает версию алгоритма Tripo; если его не указать, используется значение по умолчанию Tripo. В примере запроса выше в разделе API Tripo v3 показан полный вызов.
Tripo называет эти входные данные иначе, чем Schema ниже. Все остальные поля сохраняют свои имена.
| Поле схемы | Поле Tripo |
|---|---|
model_url | input |
Входные данные — это публичные URL, в виде строки или объекта с полем url. Идентификаторы задач Tripo и значения file_token пока не поддерживаются, загрузка файлов недоступна, а webhook_url игнорируется.
Отправка возвращает data.task_id. Выполняйте опрос, пока data.status не станет success, failed или cancelled. При успехе data.output использует имена полей Tripo, например model_url, а credits_consumed — это списание SandBase из расчета 1 кредит = $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": [...]} возвращает до 100 задач. GET /tripo/v3/account/balance возвращает ваш баланс SandBase в кредитах.
Ошибки используют формат обертки Tripo: {"code": 1004, "status": "error", "message": "..."}.
| code | Значение |
|---|---|
2 / 1002 | Отсутствует, недействителен или не авторизован ключ SandBase API |
1003 | Тело запроса не является JSON-объектом |
1004 | Отсутствует или недействительный параметр. В сообщении указано имя поля Tripo |
1007 / 2000 | Достигнут лимит запросов или лимит параллельных операций |
2001 | Задача не найдена или создана с другим ключом API |
2002 | Endpoint или функция не поддерживаются в SandBase |
2010 | Недостаточно баланса SandBase или достигнут лимит расходов ключа API |
4001 | Неизвестный endpoint |
Когда Tripo отклоняет задачу или она завершается с ошибкой, она переходит в состояние failed с error_code и error_message Tripo. Коды, относящиеся к вашему запросу или контенту, передаются без изменений; коды, относящиеся к upstream-аккаунту Tripo, отображаются как 1000.