15 分で Tripo API を使い始めて、最初の 3D モデルを生成します。
1
API Key を入手
に行きます API Keys ページで新しいキーを作成し、コピーします。安全に保管してください。表示されるのは 1 回だけです。
セキュリティに関するヒント:
API キーを環境変数に保存します (export TRIPO_API_KEY="sk-...")。ソースコードにハードコーディングしたり、リポジトリにコミットしたりしないでください。2
最初のリクエストを送信する
テキストの説明から 3D モデルを生成します。すべての世代の API は非同期です。応答はすぐに task_id を返します。
-cmd">curl -X POST https://openapi.tripo3d.ai/v3/generation/text class="hl-flag">-to-model \
-H "Content-Type: application/json" \
-H "Authorization: Bearer " \
-d '{
"prompt": "a cute cat",
"model": "v3.1-20260211"}' 200応答 — 200 OK
{
"code": 0,
"data": {
"task_id": "task_abc123"}
}3
タスク結果のクエリ
task_id を使用して、ステータスが「成功」になるまでポーリングします。 2 秒ごとにポーリングします。通常、生成には 10 ~ 120 秒かかります。
-cmd">curl -X GET https://openapi.tripo3d.ai/v3/tasks/{task_id} \
-H "Authorization: Bearer " 200応答 — タスク完了
{
"code": 0,
"data": {
"task_id": "task_abc123",
"type": "text_to_model",
"status": "success",
"progress": 100,
"output": {
"model_url": "https://...",
"rendered_image_url": "https://..."}
}
}4
モデルをダウンロードする
応答のoutput.model_urlからGLB 3Dモデルファイルをダウンロードします。次の場所で直接使用できます。
BlenderUnityUnreal EngineThree.jsBabylon.jsmodel-viewer
注:
モデル URL は 5 分後に期限切れになります。タスクが成功したらすぐにダウンロードします。 3D モデル ファイルには、output.model_url を使用します。高度なワークフロー
特定のユースケースと機能については、完全な API パイプラインを調べてください。
ゲーム対応キャラクター
Unity/Unreal. の準備が整った、スケルトンとアニメーションを備えたローポリ キャラクターを生成します
呼び出しシーケンス
あなたのアプリ
Tripo API
1POSTimage-to-model
task_id
POLLGET tasks/{task_id} → until success
2POSTrig-check
riggable: true, rig_type: "biped"
3POSTrig
New task_id for rigged model
POLLGET tasks/{task_id} → until success
4POSTretarget
task_id with animated model URLs
POLLGET tasks/{task_id} → until success
API データ フロー
POST
image-to-model
image-to-model
POST
rig-check
rig-check
POST
rig
rig
POST
retarget
retarget
1
POST /v3/generation/image-to-model
入力
Image URL or file_token
出力
task_id
Poll GET /v3/tasks/{task_id} until status=success
2
POST /v3/animations/rig-check
入力
{ input: "task_abc123" }
出力
riggable: true, rig_type: "biped"
If riggable=true, pass task_id + rig_type to rig
3
POST /v3/animations/rig
入力
{ input: "task_abc123", rig_type: "biped" }
出力
New task_id for rigged model
Poll until success, pass rigged task_id to retarget
4
POST /v3/animations/retarget
入力
{ input: "task_rig456", animations: [...] }
出力
task_id with animated model URLs
Download output.model_urls
主要なパラメータ
| パラメータ | 値 | なぜ |
|---|---|---|
model | P1-20260311 | ゲームアセットに最適なローポリトポロジ |
face_limit | 5000 | Mobile/game-friendly ポリゴン数 |
texture | true | キャラクターの視覚的な忠実度 |
rig_type | biped | キャラクターの人型スケルトン |
spec | mixamo | Unity/Unrealインポートに対応 |
animations | preset:walkpreset:idlepreset:run | エッセンシャル ロコモーション セット |
推定所要時間
~105s
コスト(クレジット)
~85
import requests, time
HEADERS = {"Authorization": "Bearer " , "Content-Type": "application/json"}
def poll(task_id):
while True:
r = requests.get(f"https://openapi.tripo3d.ai/v3/tasks/{task_id}", headers=HEADERS).json()
if r["data"]["status"] == "success": return r["data"]
if r["data"]["status"] in ("failed","cancelled"): raise Exception(r["data"])
time.sleep(2)
# Step 1 — Generate model
task_id = requests.post("https://openapi.tripo3d.ai/v3/generation/image-to-model",
headers=HEADERS, json={"file_token":"" ,"model":"P1-20260311","face_limit":5000}
).json()["data"]["task_id"]
poll(task_id)
# Step 2 — Rig check
rig_type = requests.post("https://openapi.tripo3d.ai/v3/animations/rig-check",
headers=HEADERS, json={"input": task_id}).json()["data"]["rig_type"]
# Step 3 — Rig
rig_id = requests.post("https://openapi.tripo3d.ai/v3/animations/rig",
headers=HEADERS, json={"input":task_id,"rig_type":rig_type,"spec":"mixamo"}
).json()["data"]["task_id"]
poll(rig_id)
# Step 4 — Retarget animations
anim_id = requests.post("https://openapi.tripo3d.ai/v3/animations/retarget",
headers=HEADERS, json={"input":rig_id,"animations":["preset:walk","preset:idle","preset:run"]}
).json()["data"]["task_id"]
result = poll(anim_id)
print("Animated GLBs:", result["output"]["model_urls"])開発者のヒント
- •リグの前に必ずリグチェックを呼び出します。推奨される rig_type が返され、失敗が防止されます。
- •タスクを 2 秒ごとにポーリングします。レート制限を避けるために、リクエスト /second は 1 つを超えないようにしてください
- •Unity/Unreal には仕様「mixamo」を使用します。カスタムパイプラインには仕様「tripo」を使用してください
よくある落とし穴
- •リグチェックが Riggable=false を返した場合は、よりクリーンなプロンプトで再生成してみてください (複雑なポーズは避けてください)。
- •リターゲットはリグモデル task_ids のみを受け入れます — 生の生成 task_id を渡すと失敗します