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"キーはサーバー側で管理してください。ブラウザコードに公開したり、リポジトリにコミットしたりしないでください。
このモデルIDと入力を使って /v1/run にPOSTしてください。上のリクエスト例には送信とポーリングが含まれています。
返されたrun IDを使って、ステータスがcompleted、failed、timeoutになるまでポーリングしてください。出力はcompleted後にのみ読み取ってください。
curl "https://api.sandbase.ai/v1/run/$RUN_ID" \
-H "Authorization: Bearer $SANDBASE_API_KEY"モデルのimage、video、またはaudioフィールドに、公開アクセス可能なファイルURLを指定してください。対応形式と制限は各Playground入力の横に表示されます。
Playgroundの対応する画像フィールドでアップロードまたは置換を使用してください。video 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
}完了したrunの結果は出力に表示されます。以下はモデルに保存されたサンプルであり、新規生成ではありません。
まだ例の出力は公開されていません。完了したrunのレスポンスを確認するには、Playground → Result → JSON を使用してください。
このモデルは Tripo の v3 API でも提供されています。リクエスト本文、タスクオブジェクト、エラーコードは Tripo に準拠するため、ベース URL を https://api.sandbase.ai/tripo/v3 に変更し、SandBase API キーを Authorization: Bearer として送信すれば、既存の Tripo コードをそのまま使えます。リクエストは Tripo の公式チャネルで実行され、/v1/run と同じ価格です。
POST https://api.sandbase.ai/tripo/v3/models/convert。model は任意で、Tripo のアルゴリズムバージョンを選択します。省略した場合は Tripo のデフォルトが適用されます。上の Tripo v3 API のリクエスト例に、完全な呼び出し方法が示されています。
Tripo では、これらの入力名は下の Schema と異なります。それ以外のフィールド名は変更されません。
| Schema フィールド | Tripo フィールド |
|---|---|
model_url | input |
入力は公開 URL です。文字列、または url フィールドを持つオブジェクトとして指定できます。Tripo の task id と file_token の値はまだ受け付けず、ファイルアップロードは利用できません。webhook_url は無視されます。
送信すると data.task_id が返ります。data.status が success、failed、または cancelled になるまでポーリングしてください。成功時、data.output は model_url などの Tripo のフィールド名を使用し、credits_consumed は 1 credit = $0.01 とした SandBase の請求額です。
curl "https://api.sandbase.ai/tripo/v3/tasks/$TASK_ID" \
-H "Authorization: Bearer $SANDBASE_API_KEY"{"task_ids": [...]} を伴う POST /tripo/v3/tasks/list は最大 100 件のタスクを返します。GET /tripo/v3/account/balance は SandBase の残高を credits で返します。
エラーは Tripo のエンベロープを使用します:{"code": 1004, "status": "error", "message": "..."}。
| code | 意味 |
|---|---|
2 / 1002 | SandBase API キーがない、無効、または認可されていません |
1003 | 本文が JSON オブジェクトではありません |
1004 | パラメータがないか無効です。メッセージには Tripo のフィールド名が表示されます |
1007 / 2000 | レート制限または同時実行制限に達しました |
2001 | タスクが見つからないか、別の API キーで作成されています |
2002 | SandBase ではこのエンドポイントまたは機能はサポートされていません |
2010 | SandBase の残高不足、または API キーの利用上限に達しました |
4001 | 不明なエンドポイント |
Tripo がタスクを拒否または失敗した場合、failed となり、Tripo の error_code と error_message が返ります。リクエストやコンテンツに関するコードは変更せずそのまま渡され、上流の Tripo アカウントに関するコードは 1000 として報告されます。