# オートリギング
> **POST** `/v3/animations/rig`
スケルトン リグを 3D モデルに自動的に追加します。
## リクエストパラメータ
### リクエストヘッダー
| パラメータ | 種類 | 必須 | デフォルト | 説明 |
| :-: | :-: | :-: | :-: | :-: |
| Content-Type | 文字列 | はい | — | `application/json` |
| Authorization | 文字列 | はい | — | `Bearer {api_key}` |
### リクエストボディ
| パラメータ | 種類 | 必須 | デフォルト | 説明 |
| :-: | :-: | :-: | :-: | :-: |
| input | 文字列 | はい | — | モデルソース。 `task_` で始まる task_id または `file_` で始まる file_token を受け入れます |
| model | 文字列 | いいえ | `rig-v1.0` | オートリギングモデルのバージョン。可能な値: `rig-v2.0`、`rig-v1.0` |
| rig_type | 文字列 | いいえ | `biped` | リグタイプ。最初に `rig-check` を呼び出して、推奨値を取得することをお勧めします。可能な値: `biped`、`quadruped`、`hexapod`、`octopod`、`avian`、`serpentine`、`aquatic` |
| spec | 文字列 | いいえ | `tripo` | リギング仕様。可能な値: `tripo`、`mixamo` |
| out_format | 文字列 | いいえ | `glb` | 出力形式。可能な値: `glb`、`fbx` |
## リクエスト例
### curl
```bash
curl -X POST https://openapi.tripo3d.ai/v3/animations/rig \
-H "Content-Type: application/json" \
-H "Authorization: Bearer {api_key}" \
-d '{
"input": "task_abc123",
"model": "rig-v2.0",
"rig_type": "biped",
"spec": "mixamo",
"out_format": "glb"
}'
```
### Python
```python
import requests
url = "https://openapi.tripo3d.ai/v3/animations/rig"
headers = {
"Content-Type": "application/json",
"Authorization": "Bearer {api_key}"
}
payload = {
"input": "task_abc123",
"model": "rig-v2.0",
"rig_type": "biped",
"spec": "mixamo",
"out_format": "glb"
}
response = requests.post(url, headers=headers, json=payload)
print(response.json())
```
### JavaScript
```javascript
const url = "https://openapi.tripo3d.ai/v3/animations/rig";
const response = await fetch(url, {
method: "POST",
headers: {
"Content-Type": "application/json",
"Authorization": "Bearer {api_key}"
},
body: JSON.stringify({
input: "task_abc123",
model: "rig-v2.0",
rig_type: "biped",
spec: "mixamo",
out_format: "glb"
})
});
const data = await response.json();
console.log(data);
```
## 応答
### 成功した応答
```json
{
"code": 0,
"data": {
"task_id": "task_def456"
}
}
```
### 応答フィールド
| パラメータ | 種類 | 説明 |
| :-: | :-: | :-: |
| code | 整数 | ステータスコード。 `0` は成功を示します |
| data.task_id | 文字列 | 自動リギングの進行状況と結果をポーリングするために使用される一意のタスク識別子 |
## エラーコード
| HTTP ステータスコード | エラーコード | 説明 | おすすめ |
| :-: | :-: | :-: | :-: |
| 429 | 2000 | 世代制限を超えました | リクエスト率を下げて後で再試行してください |
| 400 | 2002 | サポートされていないリクエストパラメータです | リクエストボディのパラメータ名と値の範囲を確認してください |
| 400 | 2006 | 入力ソースのタスクタイプが無効です | task_id が 3D モデル タスクに対応していることを確認します |
| 400 | 2007 | ソースタスクのステータスが成功ではありません | ソースタスクが完了するまで待ってから自動リギングを開始してください |
| 403 | 2010 | クレジットが不十分です | クレジットをリチャージして再試行してください |
オートリギング
POST /v3/animations/rig
スケルトン リグを 3D モデルに自動的に追加します。
リクエストパラメータ
リクエストヘッダー
| パラメータ |
種類 |
必須 |
デフォルト |
説明 |
| Content-Type |
文字列 |
はい |
— |
application/json |
| Authorization |
文字列 |
はい |
— |
Bearer {api_key} |
リクエストボディ
| パラメータ |
種類 |
必須 |
デフォルト |
説明 |
| input |
文字列 |
はい |
— |
モデルソース。 task_ で始まる task_id または file_ で始まる file_token を受け入れます |
| model |
文字列 |
いいえ |
rig-v1.0 |
オートリギングモデルのバージョン。可能な値: rig-v2.0、rig-v1.0 |
| rig_type |
文字列 |
いいえ |
biped |
リグタイプ。最初に rig-check を呼び出して、推奨値を取得することをお勧めします。可能な値: biped、quadruped、hexapod、octopod、avian、serpentine、aquatic |
| spec |
文字列 |
いいえ |
tripo |
リギング仕様。可能な値: tripo、mixamo |
| out_format |
文字列 |
いいえ |
glb |
出力形式。可能な値: glb、fbx |
リクエスト例
-cmd">curl -X POST https://openapi.tripo3d.ai/v3/animations/rig \
-H "Content-Type: application/json" \
-H "Authorization: Bearer {api_key}" \
-d '{
"input": "task_abc123",
"model": "rig-v2.0",
"rig_type": "biped",
"spec": "mixamo",
"out_format": "glb"}'
import requests
url = "https://openapi.tripo3d.ai/v3/animations/rig"
headers = {
"Content-Type": "application/json",
"Authorization": "Bearer {api_key}"
}
payload = {
"input": "task_abc123",
"model": "rig-v2.0",
"rig_type": "biped",
"spec": "mixamo",
"out_format": "glb"
}
response = requests.post(url, headers=headers, json=payload)
print(response.json())
const url = "https://openapi.tripo3d.ai/v3/animations/rig";
const response = await fetch(url, {
method: "POST",
headers: {
"Content-Type": "application/json",
"Authorization": "Bearer {api_key}"
},
body: JSON.stringify({
input: "task_abc123",
model: "rig-v2.0",
rig_type: "biped",
spec: "mixamo",
out_format: "glb"
})
});
const data = await response.json();
console.log(data);
応答
成功した応答
{
"code": 0,
"data": {
"task_id": "task_def456"}
}
応答フィールド
| パラメータ |
種類 |
説明 |
| code |
整数 |
ステータスコード。 0 は成功を示します |
| data.task_id |
文字列 |
自動リギングの進行状況と結果をポーリングするために使用される一意のタスク識別子 |
エラーコード
| HTTP ステータスコード |
エラーコード |
説明 |
おすすめ |
| 429 |
2000 |
世代制限を超えました |
リクエスト率を下げて後で再試行してください |
| 400 |
2002 |
サポートされていないリクエストパラメータです |
リクエストボディのパラメータ名と値の範囲を確認してください |
| 400 |
2006 |
入力ソースのタスクタイプが無効です |
task_id が 3D モデル タスクに対応していることを確認します |
| 400 |
2007 |
ソースタスクのステータスが成功ではありません |
ソースタスクが完了するまで待ってから自動リギングを開始してください |
| 403 |
2010 |
クレジットが不十分です |
クレジットをリチャージして再試行してください |