lowpoly 将于 2026年10月30日 下线。 meshy-7 作为 3D 生成模型将于 2026年12月31日 下线;作为贴图模型仍可使用。 请在这些日期前切换模型,以免请求报错。 查看所有弃用信息

Rigging 检查 API

在对模型进行 rigging 之前,先了解 Meshy 是否能够对该模型进行 rigging 并生成动画,以及它适合哪种 animation_type。要对模型进行 rigging,请参阅 Rigging API。


POST/openapi/v1/rigging/check

创建 Rigging Check 任务

创建一个 Rigging Check 任务。该任务会检查 Meshy 是否可以为你某个任务的模型进行绑定和制作动画,以及它适合哪种 animation_type。它会在后台运行,具体过程见任务生命周期。

这项检查是可选的。你可以不进行检查,直接创建 Rigging 任务,它的结果并不会改变 Rigging 的处理方式。它能帮助你跳过 Rigging 不支持的模型,例如汽车或鸟类。

检查会查看任务的预览图像。当模型符合以下所有规则时,riggable 为 true:

  • 只有一个角色。
  • 该角色是人形(双足)或四足动物(四足)。
  • 它处于站立姿态,四足动物则用四条腿站立。
  • 它的手臂和腿与身体及彼此之间没有重叠。
  • 它没有站在底座或基座上。
  • 它正面朝前。
  • 它在 Rigging 的面数限制之内。

Request

POST
/openapi/v1/rigging/check
# Check whether a model can be rigged
curl https://api.meshy.ai/openapi/v1/rigging/check \
  -X POST \
  -H "Authorization: Bearer ${YOUR_API_KEY}" \
  -H 'Content-Type: application/json' \
  -d '{
    "input_task_id": "018a210d-8ba4-705c-b111-1f1776f7f578"
  }'

Response

{
  "result": "0193c1a2-5b7e-7d4f-9a3c-8e2f1b6d4c70"
}

参数

  • Name
    input_task_id
    Type
    string
    必选
    Description

    要检查的模型所属任务的 ID。它必须是你已 SUCCEEDED(成功)且具有预览图像的某个 API 任务,例如 Text to 3D、Image to 3D、Remesh 或 Retexture 任务。

返回值

202 Accepted。响应的 result 字段保存着新建的 Rigging Check 任务的 ID。

失败情况

  • Name
    400 - Bad Request
    Description

    请求无法运行。错误信息会说明发现的问题。例如:

    • 缺少参数:未发送 input_task_id。
    • 输入任务未找到:input_task_id 与你的任何任务都不匹配。
    • 输入任务无效:input_task_id 未指向某个 API 任务。
    • 输入任务未就绪:input_task_id 对应的任务尚未达到 SUCCEEDED 状态。请等待其成功后再重试。

    修正请求后重新发送。参见 Errors。

  • Name
    401 - Unauthorized
    Description

    API key 缺失或无效。请检查 Authorization 请求头。

  • Name
    402 - Payment Required
    Description

    例如:

    • 积分不足:账户没有足够的积分,或账户已达到积分限额。请检查你的积分 balance,然后重试。
    • 免费计划:该检查需要付费计划。请在订阅设置中升级你的计划,然后重试。
  • Name
    403 - Forbidden
    Description

    input_task_id 是一个浮雕模型,Meshy 无法对其进行检查。错误信息为 This model type does not support this operation。请发送其他模型。

  • Name
    404 - Not Found
    Description

    Meshy 找不到 input_task_id 任务的预览图像。可能的原因有:

    • 该任务的文件在其 expires_at 之后已被 Meshy 删除。请重新创建该任务,然后发送该任务的 ID。
    • 该任务没有预览图像,例如 Convert、尺寸调整 或 文字生成影像 任务。请检查其来源任务。
  • Name
    429 - Too Many Requests
    Description

    你超出了速率限制,或者待处理任务过多。请稍候重试。参见速率限制。

Meshy 创建的任务仍可能失败。失败原因请参见 Rigging Check 任务对象中的 task_error。


GET/openapi/v1/rigging/check/:id

获取绑骨检测任务

根据 ID 返回一个绑骨检测任务。

Request

GET
/openapi/v1/rigging/check/0193c1a2-5b7e-7d4f-9a3c-8e2f1b6d4c70
curl https://api.meshy.ai/openapi/v1/rigging/check/0193c1a2-5b7e-7d4f-9a3c-8e2f1b6d4c70 \
  -H "Authorization: Bearer ${YOUR_API_KEY}"

Response

{
  "id": "0193c1a2-5b7e-7d4f-9a3c-8e2f1b6d4c70",
  "type": "rig-check",
  "status": "SUCCEEDED",
  "progress": 100,
  "created_at": 1790640079880,
  "started_at": 1790640080112,
  "finished_at": 1790640086935,
  "expires_at": 1790899286935,
  "task_error": null,
  "result": {
    "riggable": false,
    "animation_type": "biped",
    "animatable": false,
    "reasons": [
      {
        "code": "limbs_not_separated",
        "message": "The arms or legs touch the body or each other. Generate it in a T-pose or A-pose with the limbs clear of the body."
      }
    ]
  },
  "consumed_credits": 1
}

参数

  • Name
    id
    Type
    path
    Description

    创建响应中返回的任务 ID。

返回值

绑骨检测任务对象。其 result 字段在任务状态变为 SUCCEEDED 之前不会出现。


DELETE/openapi/v1/rigging/check/:id

删除一个 Rigging Check 任务

永久删除一个 Rigging Check 任务,包括其结果。删除操作无法撤销。

Request

DELETE
/openapi/v1/rigging/check/0193c1a2-5b7e-7d4f-9a3c-8e2f1b6d4c70
curl --request DELETE \
  --url https://api.meshy.ai/openapi/v1/rigging/check/0193c1a2-5b7e-7d4f-9a3c-8e2f1b6d4c70 \
  -H "Authorization: Bearer ${YOUR_API_KEY}"

Response

// 200 OK on success, with an empty body.
//
// 409 Conflict when the task is IN_PROGRESS. The task keeps running:
{
  "message": "Task is IN_PROGRESS and cannot be deleted. Credits for a task the worker has already started are not refundable; wait for it to reach SUCCEEDED, FAILED or CANCELED, then delete it."
}

路径参数

  • Name
    id
    Type
    path
    Description

    要删除的任务的 ID。

任务状态

删除一个 PENDING 任务会退还创建该任务时所使用的积分。

IN_PROGRESS 任务无法被删除。该请求会返回 409 Conflict, 且任务会继续运行。Meshy 不会为已经开始的任务退款, 因此删除它会让你同时损失积分和结果。请等待它 进入 SUCCEEDED 或 FAILED 状态后再删除。

删除处于最终状态(SUCCEEDED 或 FAILED)的任务不会退还 其积分。

返回值

任务删除成功时返回 200 OK;当任务处于 IN_PROGRESS 状态时返回 409 Conflict。


GET/openapi/v1/rigging/check

获取 Rigging Check 任务列表

返回您的 Rigging Check 任务列表。

Request

GET
/openapi/v1/rigging/check
curl https://api.meshy.ai/openapi/v1/rigging/check?page_size=10 \
  -H "Authorization: Bearer ${YOUR_API_KEY}"

Response

[
  {
    "id": "0193c1a2-5b7e-7d4f-9a3c-8e2f1b6d4c70",
    "type": "rig-check",
    "status": "SUCCEEDED",
    "progress": 100,
    "created_at": 1790640079880,
    "started_at": 1790640080112,
    "finished_at": 1790640086935,
    "expires_at": 1790899286935,
    "task_error": null,
    "result": {
      "riggable": true,
      "animation_type": "biped",
      "animatable": true,
      "reasons": []
    },
    "consumed_credits": 1
  }
]

参数

  • Name
    page_num
    Type
    integer
    默认值 1
    Description

    要返回的页码,从 1 开始。

  • Name
    page_size
    Type
    integer
    默认值 10
    Description

    每页的任务数量,最多 100 个。

  • Name
    sort_by
    Type
    string
    Description

    排序方式。

    可用值:

    • +created_at:最早的排在最前
    • -created_at:最新的排在最前

返回

分页的 Rigging Check 任务对象列表。


GET/openapi/v1/rigging/check/:id/stream

流式获取骨骼绑定检查任务

以服务器推送事件(SSE)的形式流式返回骨骼绑定检查任务的更新。

Request

GET
/openapi/v1/rigging/check/0193c1a2-5b7e-7d4f-9a3c-8e2f1b6d4c70/stream
curl -N https://api.meshy.ai/openapi/v1/rigging/check/0193c1a2-5b7e-7d4f-9a3c-8e2f1b6d4c70/stream \
  -H "Authorization: Bearer ${YOUR_API_KEY}"

Response Stream

// Error event example
event: error
data: {
  "status_code": 404,
  "message": "Task not found"
}

// Message event examples illustrate task progress.
// Every frame is the full task object.
// The following PENDING frame is abbreviated to the fields that change.
event: message
data: {
  "id": "0193c1a2-5b7e-7d4f-9a3c-8e2f1b6d4c70",
  "progress": 0,
  "status": "PENDING"
}

event: message
data: {
  "id": "0193c1a2-5b7e-7d4f-9a3c-8e2f1b6d4c70",
  "type": "rig-check",
  "status": "SUCCEEDED",
  "progress": 100,
  "created_at": 1790640079880,
  "started_at": 1790640080112,
  "finished_at": 1790640086935,
  "expires_at": 1790899286935,
  "task_error": null,
  "result": {
    "riggable": true,
    "animation_type": "quadruped",
    "animatable": true,
    "reasons": []
  },
  "consumed_credits": 1
}

参数

  • Name
    id
    Type
    path
    Description

    创建响应中返回的任务 ID。

返回

以服务器推送事件形式返回的骨骼绑定检查任务对象流。

每个事件都包含完整的任务对象,其结构与 Get endpoint 返回的相同。当任务处于 PENDING 或 IN_PROGRESS 状态时,finished_at 为 0。只有当任务状态变为 SUCCEEDED 后,Meshy 才会发送 result 字段。


骨骼检测任务对象

骨骼检测任务对象描述对某个模型的一次检测。它保存着状态、进度,以及任务成功时的结果。

The Rigging Check Task Object

{
  "id": "0193c1a2-5b7e-7d4f-9a3c-8e2f1b6d4c70",
  "type": "rig-check",
  "status": "SUCCEEDED",
  "progress": 100,
  "created_at": 1790640079880,
  "started_at": 1790640080112,
  "finished_at": 1790640086935,
  "expires_at": 1790899286935,
  "task_error": null,
  "result": {
    "riggable": false,
    "animation_type": "biped",
    "animatable": false,
    "reasons": [
      {
        "code": "limbs_not_separated",
        "message": "The arms or legs touch the body or each other. Generate it in a T-pose or A-pose with the limbs clear of the body."
      }
    ]
  },
  "consumed_credits": 1
}
  • Name
    id
    Type
    string
    Description

    任务 ID。请将其视为不透明字符串,不要依赖其格式。

  • Name
    type
    Type
    string
    Description

    任务类型,始终为 rig-check。

  • Name
    status
    Type
    string
    Description

    任务状态,取值为 PENDING、IN_PROGRESS、SUCCEEDED 或 FAILED 之一。

  • Name
    progress
    Type
    integer
    Description

    任务完成的百分比。在任务开始前为 0,成功时为 100。

  • Name
    preceding_tasks
    Type
    integer
    Description

    排在该任务前面的任务数量。该值仅在任务为 PENDING 时才有意义。当该值为 0 时,此字段会被省略。

  • Name
    created_at
    Type
    timestamp
    Description

    任务创建的时间,单位为 Unix 毫秒。

  • Name
    started_at
    Type
    timestamp
    Description

    任务开始的时间,单位为 Unix 毫秒。在任务开始前为 0。

  • Name
    finished_at
    Type
    timestamp
    Description

    任务完成的时间,单位为 Unix 毫秒。在任务完成前为 0。

  • Name
    expires_at
    Type
    timestamp
    Description

    任务结果过期的时间,单位为 Unix 毫秒。在任务完成前为 0。

  • Name
    task_error
    Type
    object
    Description

    任务失败时的错误详情。除非状态为 FAILED,否则为 null。骨骼检测任务会因以下原因之一而失败:

    • code 为 moderation_blocked:模型的预览图可能不符合 Meshy 的平台规则。请发送其他模型。
    • type 为 service_unavailable:Meshy 无法检测该模型。请重新创建任务。

    Meshy 会为失败的任务退还积分。详见错误。

    • Name
      type
      Type
      string
      Description

      错误类别,例如 invalid_input 或 service_unavailable。

    • Name
      code
      Type
      string
      Description

      具体问题,例如 moderation_blocked。当 Meshy 提供更多细节时才会出现。

    • Name
      message
      Type
      string
      Description

      对出错原因的描述。

  • Name
    result
    Type
    object
    Description

    结果。在任务变为 SUCCEEDED 之前不会出现。

    • Name
      riggable
      Type
      boolean
      Description

      模型是否符合本页面上的所有规则。当其为 false 时,reasons 会说明原因。

    • Name
      animation_type
      Type
      string
      Description

      模型所属的角色类型,即使 riggable 为 false 时也会返回。

      可用值:

      • biped:人形角色。创建骨骼绑定任务时将其作为 animation_type 发送。
      • quadruped:四足动物。创建骨骼绑定任务时将其作为 animation_type 发送。
      • other:其他任何类型,例如鸟类、章鱼或道具。骨骼绑定不支持此类模型。
    • Name
      animatable
      Type
      boolean
      Description

      为模型完成骨骼绑定后,Animation API 是否可以为其生成动画。当 riggable 为 false 时,此值绝不会为 true。

    • Name
      reasons
      Type
      array
      Description

      按固定顺序说明 riggable 或 animatable 为 false 的原因。当两者均为 true 时,此项为空数组。

      • Name
        code
        Type
        string
        Description

        模型存在的问题,供你的代码据此处理。Meshy 可能会新增代码,因此遇到无法识别的代码时,应将其视为模型不符合要求的原因。

        可用值:

        • not_a_character:模型不是人物或生物,例如载具或道具。
        • unsupported_body_type:该生物既不是人形也不是四足动物,例如鸟类、蛇或章鱼。
        • multiple_subjects:模型中包含不止一个角色。
        • has_base:角色站立在底座或基座上。
        • not_standing:角色处于坐姿、躺姿、跪姿或蹲姿,或四足动物未以四肢着地站立。
        • limbs_not_separated:手臂或腿部与身体或彼此相触。
        • facing_away:角色背对正面朝向。
        • too_many_faces:模型超过 Rigging 的面数限制。请先对其运行 Remesh API。
      • Name
        message
        Type
        string
        Description

        以句子形式说明给用户看的原因,并给出修复模型的方法。对于 too_many_faces,会给出模型的三角面数以及应使用的 Remesh 设置。措辞可能会变化,因此请根据 code 而非 message 来做分支判断。

  • Name
    consumed_credits
    Type
    integer
    Description

    该任务消耗的积分数量。其值为 1,若任务为 FAILED 则为 0,因为 Meshy 会在任务失败时退还积分。