API 参考
查询任务状态
查询 3D 生成任务的状态、进度和结果。
进度阶段:
| 进度 | 阶段 | 描述 |
|---|---|---|
| 0 | 初始化 | 任务启动中 |
| 20 | 下载图片 | 获取输入图片 |
| 40 | 生成 3D 网格 | 核心 3D 生成 |
| 80 | 处理网格 | 后处理 |
| 90 | 上传结果 | 上传 GLB 到存储 |
| 100 | 完成 | 结束 |
轮询策略: 异步任务建议每 2-5 秒轮询一次。
Authorization
BearerAuth
AuthorizationBearer <token>
API key with tr_ prefix, sent as Bearer token
In: header
Path Parameters
taskId*string
Task ID returned from POST /3d/generations
Response Body
application/json
application/json
application/json
curl -X GET "https://trellis2.app/api/v1/tasks/task_abc123"{
"id": "task_abc123",
"object": "3d.generation",
"status": "completed",
"progress": 100,
"progress_stage": "Completed",
"created": 1723000000,
"completed_at": 1723000060,
"data": {
"model_url": "https://r2.example.com/model.glb",
"format": "glb",
"model": "trellis2"
},
"usage": {
"credits_consumed": 10,
"credits_remaining": 990
}
}{
"error": {
"message": "string",
"type": "string",
"code": "string",
"param": "string"
}
}{
"error": {
"message": "string",
"type": "string",
"code": "string",
"param": "string"
}
}