动画绑骨
tripo/rig — 检查模型能否绑骨并获取建议骨骼类型(tripo/rig-check);按骨骼类型自动绑骨:人形 biped 用 tripo/rig_v1.0-20240301,非类人型用 tripo/rig_v2.5-20260210。
异步任务:POST /v1/tasks/generations 提交 → GET /v1/tasks/generations/{request_id} 轮询结果(POST 发送后 request_id 自动填入 GET)。
https://router.shengsuanyun.com/apiAuthorization: Bearer YOUR_API_KEYTripo 动画绑骨
对 3D 模型执行绑骨前检查与自动绑骨:先检查模型是否适合绑骨并获取建议骨骼类型,再选择对应的自动绑骨模型。参数遵循 Tripo 官方文档 的 snake_case 风格,平台透传。
1绑骨前检查
提交检查任务后,在查询结果中获取模型能否绑骨及建议的骨骼类型。
tripo/rig-check
检查模型是否适合绑骨
{
"model": "tripo/rig-check",
"input": "https://example.com/model.glb"
}input 为可公开访问的 GLB 模型文件 URL。任务完成后,查询结果中的 data.data.upstream_extra.riggable 表示能否绑骨,data.data.upstream_extra.rig_type 表示建议的骨骼类型。
2自动绑骨
按骨骼类型选择绑骨模型:tripo/rig_v1.0-20240301 或 tripo/rig_v2.5-20260210。
rig_type=biped(双足人形、类人型)选择 tripo/rig_v1.0-20240301;quadruped、hexapod、octopod、avian、serpentine、aquatic 等非类人型选择 tripo/rig_v2.5-20260210。适配器会校验模型版本与 rig_type 是否匹配,不匹配时会提示更换模型。省略 rig_type 时按上游默认值 biped 校验,因此使用非类人型版本时须显式传入 rig_type。
| 绑骨模型版本 | 描述信息 |
|---|---|
tripo/rig_v1.0-20240301 | 双足人形自动绑骨,仅适用于(且推荐用于)双足类人型绑骨 |
tripo/rig_v2.5-20260210 | 非类人型自动绑骨,适用于非类人型的动物绑骨(四足、六足、八足、蛇形、水生、鸟类) |
双足人形示例:
{
"model": "tripo/rig_v1.0-20240301",
"input": "https://example.com/humanoid.glb",
"rig_type": "biped",
"spec": "mixamo",
"out_format": "glb"
}鸟类或有翼生物示例:
{
"model": "tripo/rig_v2.5-20260210",
"input": "https://example.com/bird.glb",
"rig_type": "avian",
"out_format": "glb"
}任务完成后,绑骨模型文件位于 data.data.file_urls。spec 和 out_format 可按需传入。
3官方文档参考
POST/v1/tasks/generationstripo 生成-异步
检查模型能否绑骨并获取建议骨骼类型(tripo/rig-check);按骨骼类型自动绑骨:人形 biped 用 tripo/rig_v1.0-20240301,非类人型用 tripo/rig_v2.5-20260210。。异步任务:POST 提交后返回 request_id,再用 GET /v1/tasks/generations/{request_id} 轮询结果。
请求体
application/json
| 字段 | 类型 | 说明 |
|---|---|---|
input必填 | string | 待绑骨/待检查的 GLB 模型文件 URL(可公开访问) |
rig_type | string | 骨骼类型;省略时按上游默认值 biped 校验 可选值:"biped" · "quadruped" · "hexapod" · "octopod" · "avian" · "serpentine" · "aquatic" |
spec | string | 绑骨规范,如 mixamo(可选) |
out_format | string | 输出格式,如 glb(可选) |
model必填 | string | 路由模型,本页固定为 tripo/rig |
{
"model": "tripo/rig",
"input": "https://example.com/humanoid.glb",
"rig_type": "biped",
"out_format": "glb"
}请求示例
参考地址:https://router.shengsuanyun.com/api。路径参数与凭据需替换;非 JSON 请求体需按对应格式准备。
curl -X POST 'https://router.shengsuanyun.com/api/v1/tasks/generations' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Content-Type: application/json' \
--data '{
"model": "tripo/rig",
"input": "https://example.com/humanoid.glb",
"rig_type": "biped",
"out_format": "glb"
}'响应
200 提交成功,返回 request_id / task_id
application/json
未提供结构定义。
{
"code": "success",
"message": "",
"data": {
"request_id": "REQ_xxx",
"task_id": "TASK_xxx",
"action": "GENERATION",
"status": "PENDING",
"progress": "0%"
}
}400 请求参数错误
401 未授权(API Key 无效)
429 请求过于频繁
500 服务器内部错误
GET/v1/tasks/generations/{request_id}查询异步任务状态与产物
通过 POST /v1/tasks/generations 返回的 request_id 轮询任务状态、进度与产物 URL(image_urls / video_urls / audio_urls / file_urls / text)。下方「在线测试」填入 request_id 即可发送查询;若上方 POST 已发送成功,request_id 会自动填入。
请求参数
| 参数 | 位置 / 类型 | 说明 |
|---|---|---|
request_id必填 | path / string | POST /v1/tasks/generations 返回的请求 ID |
请求示例
参考地址:https://router.shengsuanyun.com/api。路径参数与凭据需替换;非 JSON 请求体需按对应格式准备。
curl -X GET 'https://router.shengsuanyun.com/api/v1/tasks/generations/{request_id}' \
-H 'Authorization: Bearer YOUR_API_KEY'响应
200 任务状态与产物
application/json
未提供结构定义。
{
"code": "success",
"message": "",
"data": {
"request_id": "REQ_xxx",
"task_id": "TASK_xxx",
"action": "GENERATION",
"status": "COMPLETED",
"progress": "100%",
"data": {
"url": [
"https://oss.shengsuanyun.com/example/output.mp4"
]
}
}
}