API 参考

3D 模型

这个接口能用的模型(1)

在工作台试一下
POST/v1/model3d/tasks
GET/v1/model3d/tasks/{task_id}

异步 3D 生成与后处理。一个字段 operation 决定任务做什么:用文字、一张图或多视角图生成模型,再给它贴图、分割、减面或绑骨。提交后返回 task_id;查询任务,直到任务内容里出现模型地址。

#请求参数

  • modelstring必填

    目录里的 3D 模型 ID,例如 tripo-3d。

  • operationstring必填

    text_to_model · image_to_model · multiview_to_model · texture · smart_segment · retopology · rig · animate。

  • promptstring可选

    要生成什么。text_to_model 使用。

  • inputstring可选

    image_to_model 时填公开图片地址;texture、smart_segment、retopology、rig、animate 时填一个已完成 3D 模型的 task_id。

  • inputsobject[]可选

    multiview_to_model:[{"front": url}, {"left": url}, …],正面加至少一个其他视角。

  • textureboolean可选

    同时生成贴图。

  • pbrboolean可选

    生成 PBR 材质。

  • texture_promptobject可选

    texture:{"text": "weathered bronze"} 描述新的表面。

  • face_limitinteger可选

    retopology:结果最多多少个面。

  • quadboolean可选

    retopology:用四边形网格代替三角形。

  • animationstring可选

    animate:给已绑骨的模型套用的动画。

#相关错误码

  • 404 not_foundtask_id 不存在,或后续步骤引用的输入任务不存在、还没完成。
  • 401Bearer 令牌无效或缺失。这条路径不带 error.code,请按状态码判断。
  • 402 insufficient_user_quota钱包余额不足以覆盖预扣估算。
  • 429密钥级限流。响应体为空,按 Retry-After 等待。若 429 带有 insufficient_user_quota,那是每日消费上限,不是限流。
  • 503 model_not_found模型名不存在,或当前没有健康渠道可以服务它。

完整错误码表 →

#请求示例

# 1. make a model from text
curl https://www.aisplice.store/v1/model3d/tasks \
  -H "Authorization: Bearer sk-YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model": "tripo-3d", "operation": "text_to_model", "prompt": "A small ceramic fox", "texture": true}'

# 2. poll until status is completed; the file is in url
curl https://www.aisplice.store/v1/model3d/tasks/$TASK_ID -H "Authorization: Bearer sk-YOUR_KEY"

# 3. texture it: pass the finished task_id as input
curl https://www.aisplice.store/v1/model3d/tasks \
  -H "Authorization: Bearer sk-YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model": "tripo-3d", "operation": "texture", "input": "'$TASK_ID'", "texture_prompt": {"text": "weathered bronze"}}'

#响应

response.json
// POST /v1/model3d/tasks
{"task_id": "task_xxx", "status": "queued"}

// GET /v1/model3d/tasks/{task_id} — after completion
{"task_id": "task_xxx", "status": "completed", "url": "https://…/model.glb", "output": {"model_url": "https://…/model.glb"}}

还是没解决?

把请求 ID 或报错信息发给我们,我们来查。