lowpoly 将于 2026年10月30日 下线。 请在这些日期前切换模型,以免请求报错。 查看所有弃用信息

Creative Lab 冰箱贴 API

通过两个阶段,将照片转换为可 3D 打印的冰箱贴,带有彩色浮雕和平整背面。prototype 任务会根据照片生成一张彩色概念图像。build 任务将该图像转换为浮雕 3D 模型,并以 prototype 任务的 ID 作为 input_task_id。

  • POST /openapi/creative-lab/fridge-magnet/v1/prototype
  • POST /openapi/creative-lab/fridge-magnet/v1/build

POST/openapi/creative-lab/fridge-magnet/v1/prototype

创建冰箱贴 prototype 任务

根据一张照片生成一张彩色概念图。要构建 3D 模型,请将此任务的 ID 作为 input_task_id 传递给构建 endpoint。关于任务字段的说明,请参阅冰箱贴 prototype 任务对象。

Request

POST
/openapi/creative-lab/fridge-magnet/v1/prototype
# Stage 1: generate a colorized fridge magnet concept image
curl https://api.meshy.ai/openapi/creative-lab/fridge-magnet/v1/prototype \
  -X POST \
  -H "Authorization: Bearer ${YOUR_API_KEY}" \
  -H 'Content-Type: application/json' \
  -d '{
    "image_url": "<your publicly accessible image url or base64-encoded data URI>"
  }'

Response

{
  "result": "01a3d8f1-8c2e-7d04-b223-3f3776a1c8c9"
}
Prototype example
Start with a source photo, then generate the prototype image used by the fridge magnet build stage.
Source landscape photo used as the Creative Lab Fridge Magnet input
Prototype input
Creative Lab Fridge Magnet prototype output generated from the source photo
Prototype output

参数

  • Name
    image_url
    Type
    string
    必选
    Description

    要转换为冰箱贴概念图的照片,可以是公开可访问的 URL 或 Data URI(data:image/jpeg;base64,<your base64-encoded image data>)。

    图片必须是 JPG、JPEG、PNG 或 WebP 文件,且不超过 20 MB。

  • Name
    name
    Type
    string
    Description

    任务的名称,最多 100 个字符。它会在任务的 name 字段中返回。名称过长会返回 400。

  • Name
    remove_background
    Type
    boolean
    默认值 false
    Description

    是否移除 prototype 图像的背景。true 会返回一张保留整个磁贴的透明 RGBA PNG,方便你将其放置在任意背景上。构建阶段也会从去除背景后的图像开始处理。如果 Meshy 无法移除背景,则会返回带有背景的图像,任务仍然算作成功。

    构建阶段的 remove_background 选项是独立的。

返回值

result 字段保存新 prototype 任务的 ID。获取任务或流式获取任务,直到 status 变为 SUCCEEDED。然后将该 ID 作为 input_task_id 传递给构建 endpoint。

失败情形

  • Name
    400 - Bad Request
    Description

    请求无法执行。例如:

    • 缺少 image_url。
    • 图片不是 JPG、JPEG、PNG 或 WebP 文件。
    • 图片过小、超过 20 MB,或超过最大像素数。
    • Meshy 无法下载该图片,例如 URL 返回 404 或超时。
    • Data URI 不是有效的 base64 编码。
    • 图片被标记为 NSFW 内容。

    错误信息会说明发现的具体问题。修正请求后重新发送。

  • Name
    401 - Unauthorized
    Description

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

  • Name
    402 - Payment Required
    Description

    以下情形之一适用:

    • 账户 credits 不足。
    • API key、workspace 或成员已达到 credit 限额。
    • 账户处于免费套餐。

    请检查你的 credits 和套餐,然后重试。

  • Name
    403 - Forbidden
    Description

    你的团队已开启 IP Filtering(知识产权过滤),且 Meshy 将该图片标记为涉及第三方知识产权。请发送你拥有使用权的图片。

  • Name
    429 - Too Many Requests
    Description

    达到以下其中一个限制:

    • 你发送的请求超出了速率限制允许的数量。请等待几秒后重试。参见速率限制。
    • 你有过多任务正在排队或运行。请等待部分任务完成后再重试。
    • 在无限量套餐下且 credits 已用尽时,你已达到可在无 credits 情况下运行的任务数量上限。请等待某个任务完成,或增加 credits。
  • Name
    500 - Internal Server Error
    Description

    Meshy 遇到了服务器错误,例如无法对图片执行知识产权检查。Meshy 不会创建该任务,并会退还已扣除的任何 credits。请重试该请求。


POST/openapi/creative-lab/fridge-magnet/v1/build

创建冰箱贴构建任务

根据一个已成功的 prototype 任务生成可 3D 打印的冰箱贴。Meshy 会将 prototype 的概念图转换为深度图浮雕,并按你选择的格式返回一个模型文件。关于该任务的字段,请参阅冰箱贴构建任务对象。

Request

POST
/openapi/creative-lab/fridge-magnet/v1/build
# Stage 2: chain build off a succeeded prototype task
curl https://api.meshy.ai/openapi/creative-lab/fridge-magnet/v1/build \
  -X POST \
  -H "Authorization: Bearer ${YOUR_API_KEY}" \
  -H 'Content-Type: application/json' \
  -d '{
    "input_task_id": "01a3d8f1-8c2e-7d04-b223-3f3776a1c8c9",
    "options": {
      "badge_shape": "rounded-rect",
      "size_mm": 60,
      "relief_height_mm": 3.3
    },
    "output": {
      "format": "glb"
    }
  }'

Response

{
  "result": "01b4e9a2-9d3f-8e15-c334-4f4887b2d9d0"
}
Build example
The build task turns the selected prototype image into a 3D-printable fridge magnet model.
Creative Lab Fridge Magnet build model preview
Build model preview

参数

  • Name
    input_task_id
    Type
    string
    必选
    Description

    要构建的 prototype 任务的 ID。它必须是你的账号使用 POST /openapi/creative-lab/fridge-magnet/v1/prototype 创建的任务,且状态为 SUCCEEDED。

    如果该 ID 不是你通过 API 创建的冰箱贴 prototype 任务(包括在 Web App 中创建的 prototype),将返回 404。

  • Name
    name
    Type
    string
    Description

    任务的名称,最多 100 个字符。它会在任务的 name 字段中返回。名称过长会返回 400。

options

浮雕形状的可选设置。每个字段都有默认值,因此你只需发送想要更改的字段。字段取值超出范围会返回 400。

  • Name
    badge_shape
    Type
    string
    默认值 rounded-rect
    Description

    当 Meshy 未从主体中描摹轮廓时,磁贴的外轮廓。当 remove_background 为 false,或者 Meshy 找不到主体的轮廓时,会使用此设置。

    可用取值:

    • circle
    • rounded-rect
    • hexagon
    • shield
    • star
  • Name
    size_mm
    Type
    number
    默认值 60
    Description

    磁贴外接正方形的边长,单位为毫米,最大为 400。0 表示使用默认值。

  • Name
    relief_height_mm
    Type
    number
    默认值 3.3
    Description

    浮雕高出底座的最大高度,单位为毫米,范围从 0 到 20。

  • Name
    relief_offset_mm
    Type
    number
    默认值 0
    Description

    浮雕整体下压的程度,单位为毫米,范围从 0 到 20。Meshy 会在浮雕各处的高度上减去该值,直至底座。

  • Name
    base_thickness_mm
    Type
    number
    默认值 2.0
    Description

    浮雕背后平整底板的厚度,单位为毫米,范围从 0 到 20。默认的 2 毫米底板能让磁贴有足够的厚度贴附在冰箱上,使浮雕不会显得脆弱。

  • Name
    has_closed_back
    Type
    boolean
    默认值 true
    Description

    是否封闭磁贴的背面,即粘贴磁铁的那一面。设为 false 会使背面保持中空,呈壳状。

  • Name
    relief_curve
    Type
    string
    默认值 linear
    Description

    将深度图数值映射为浮雕高度所用的曲线。

    可用取值:

    • linear
    • gamma
    • s-curve
  • Name
    curve_param
    Type
    number
    默认值 1.0
    Description

    曲线强度,最大为 10。gamma 和 s-curve 曲线会用到该值,linear 会忽略它。0 表示使用默认值。

  • Name
    invert_depth
    Type
    boolean
    默认值 false
    Description

    是否反转深度图,使较暗的区域浮雕更高。

  • Name
    smoothing
    Type
    number
    默认值 0.24
    Description

    在 Meshy 构建浮雕之前对深度图进行平滑处理的程度,范围从 0 到 10。

  • Name
    relief_scale
    Type
    number
    默认值 1.0
    Description

    在轮廓内以中心为基准缩放浮雕及其 texture 的程度,最大为 10。大于 1 的值会放大主体,小于 1 的值会缩小主体。它不会改变浮雕的高度。0 表示使用默认值。

  • Name
    depth_threshold
    Type
    number
    默认值 0.1
    Description

    低于此深度图数值时,Meshy 会将深度设为零,范围从 0 到 1。

  • Name
    remove_background
    Type
    boolean
    默认值 true
    Description

    是否从主体中描摹磁贴的轮廓,使磁贴形状贴合主体。设为 false 则改用 badge_shape 轮廓。当 Meshy 找不到主体的轮廓时,也会使用 badge_shape。

    这与 prototype 的 remove_background 参数是分开的,后者用于设置 prototype 图像是否具有透明背景。

  • Name
    export_resolution
    Type
    integer
    默认值 512
    Description

    导出模型的 mesh 分辨率,范围从 64 到 512。Meshy 基于 512 像素的深度图构建 geometry,因此更精细的 mesh 只会增加面数而不会增加细节。0 表示使用默认值。

output

可选。设置构建返回的文件格式。

  • Name
    format
    Type
    string
    默认值 glb
    Description

    构建返回的文件格式。

    可用取值:

    • glb:一个 model.glb 文件,位于 model_urls.glb
    • obj:一个包含 model.obj、model.mtl 和 texture.png 的 zip 文件,位于 model_urls.obj
    • zip:一个包含 Meshy 生成的所有文件的 zip 文件,位于 model_urls.bundle_zip

返回值

result 字段包含新构建任务的 ID。获取该任务或对其进行流式获取,直到 status 变为 SUCCEEDED。然后从 model_urls 中唯一的条目下载文件。

失败情形

  • Name
    400 - Bad Request
    Description

    请求无法运行。例如:

    • input_task_id 缺失或不是有效的任务 ID。
    • prototype 任务的状态不是 SUCCEEDED。如果仍在运行,请等待后重试。如果已失败或被取消,请创建一个新的 prototype 任务。
    • prototype 任务已成功,但没有图像。请创建一个新的 prototype 任务。
    • 某个 options 字段超出其取值范围,或不是可用取值。

    错误信息会说明发现了哪个问题。

  • Name
    401 - Unauthorized
    Description

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

  • Name
    402 - Payment Required
    Description

    以下情况之一适用:

    • 账号没有足够的 credits。
    • API key、workspace 或成员达到了其 credit 限额。
    • 账号处于免费方案。

    请检查你的 credits 和方案,然后重试。

  • Name
    404 - Not Found
    Description

    input_task_id 不匹配你的账号通过 API 创建的任何冰箱贴 prototype 任务。在 Web App 中创建的 prototype 也会返回 404。请发送 prototype 创建响应中的 result ID。

  • Name
    429 - Too Many Requests
    Description

    达到以下限制之一:

    • 你发送的请求数超出了速率限制允许的数量。请等待几秒钟后重试。参见速率限制。
    • 排队或正在运行的任务过多。请等待部分任务完成后重试。
    • 在没有剩余 credits 的无限制方案下,你已达到无需 credits 即可运行的任务数量上限。请等待某个任务完成,或增加 credits。

GET/openapi/creative-lab/fridge-magnet/v1/(prototype|build)/:id

获取冰箱贴任务

返回一个 prototype 或 build 任务。路径必须与任务所处的阶段相匹配。通过 /prototype/:id 请求 build 任务会返回 404,通过 /build/:id 请求 prototype 任务也同样会返回 404。

关于字段说明,请参阅冰箱贴 prototype 任务对象和冰箱贴 build 任务对象。

Request

GET
/openapi/creative-lab/fridge-magnet/v1/prototype/01a3d8f1-8c2e-7d04-b223-3f3776a1c8c9
# Prototype
curl https://api.meshy.ai/openapi/creative-lab/fridge-magnet/v1/prototype/01a3d8f1-8c2e-7d04-b223-3f3776a1c8c9 \
  -H "Authorization: Bearer ${YOUR_API_KEY}"

# Build
curl https://api.meshy.ai/openapi/creative-lab/fridge-magnet/v1/build/01b4e9a2-9d3f-8e15-c334-4f4887b2d9d0 \
  -H "Authorization: Bearer ${YOUR_API_KEY}"

Prototype Response

{
  "id": "01a3d8f1-8c2e-7d04-b223-3f3776a1c8c9",
  "type": "creative-lab-fridge-magnet-prototype",
  "name": "",
  "status": "SUCCEEDED",
  "progress": 100,
  "created_at": 1729543210000,
  "started_at": 1729543215000,
  "finished_at": 1729543242000,
  "expires_at": 1729802442000,
  "preceding_tasks": 0,
  "task_error": null,
  "consumed_credits": 6,
  "image_urls": [
    "https://assets.meshy.ai/***/concept.png?Expires=***"
  ]
}

Build Response

{
  "id": "01b4e9a2-9d3f-8e15-c334-4f4887b2d9d0",
  "type": "creative-lab-fridge-magnet-build",
  "name": "",
  "status": "SUCCEEDED",
  "progress": 100,
  "created_at": 1729543250000,
  "started_at": 1729543258000,
  "finished_at": 1729543285000,
  "expires_at": 1729802485000,
  "preceding_tasks": 0,
  "task_error": null,
  "consumed_credits": 30,
  "model_urls": {
    "glb": "https://assets.meshy.ai/***/tasks/01b4e9a2-9d3f-8e15-c334-4f4887b2d9d0/output/model.glb?Expires=***"
  }
}

参数

  • Name
    id
    Type
    path
    Description

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

返回值

prototype 任务对象或build 任务对象,具体取决于路径中指定的阶段。

失败模式

  • Name
    400 - Bad Request
    Description

    id 不是有效的任务 ID。请发送创建响应中的 result ID。

  • Name
    403 - Forbidden
    Description

    你的团队开启了 IP Filtering,且 Meshy 将该 prototype 任务的图片标记为涉及第三方知识产权。Build 任务以及 Enterprise 方案下的团队不会出现此错误。请使用你拥有使用权的图片创建 prototype 任务。

  • Name
    404 - Not Found
    Description

    你的账户下没有与该 ID 对应的冰箱贴任务,或任务所处阶段与路径不匹配。请检查 ID,并使用 /prototype 或 /build 来匹配对应的任务。

  • Name
    500 - Internal Server Error
    Description

    Meshy 无法执行知识产权检查。请重试该请求。


DELETE/openapi/creative-lab/fridge-magnet/v1/(prototype|build)/:id

删除冰箱贴任务

取消一个冰箱贴任务。取消 PENDING 任务会退还其 credits。IN_PROGRESS 任务会被取消但不会退款,因为工作进程已经开始处理它。处于最终状态(SUCCEEDED、FAILED 或 CANCELED)的任务无法取消。

路径必须与任务所处的阶段相匹配。例如,使用构建任务的 ID 对 /prototype/:id 执行 DELETE 会返回 404。

Request

DELETE
/openapi/creative-lab/fridge-magnet/v1/prototype/01a3d8f1-8c2e-7d04-b223-3f3776a1c8c9
curl --request DELETE \
  --url https://api.meshy.ai/openapi/creative-lab/fridge-magnet/v1/prototype/01a3d8f1-8c2e-7d04-b223-3f3776a1c8c9 \
  -H "Authorization: Bearer ${YOUR_API_KEY}"

Response

// Returns 204 No Content on success (empty body).

路径参数

  • Name
    id
    Type
    path
    Description

    要取消的任务的 ID。

返回值

204 No Content,响应体为空。

失败模式

  • Name
    400 - Bad Request
    Description

    以下情况之一适用:

    • id 不是有效的任务 ID。请发送创建响应中的 result ID。
    • 该任务已处于最终状态(SUCCEEDED、FAILED 或 CANCELED),因此无法取消。
  • Name
    404 - Not Found
    Description

    你的账户下没有该 ID 对应的冰箱贴任务,或者任务所处的阶段与路径不匹配。请检查 ID,并使用 /prototype 或 /build 来匹配该任务。


GET/openapi/creative-lab/fridge-magnet/v1/(prototype|build)/:id/stream

流式获取 Fridge Magnet 任务

以 Server-Sent Events(SSE)的形式流式传输 Fridge Magnet 任务的更新。路径必须与任务所处的阶段相匹配。如果不匹配,例如在 /prototype/:id/stream 下使用了 build 任务的 ID,流会发送一个 status_code: 404 的 error 事件,然后关闭。

Request

GET
/openapi/creative-lab/fridge-magnet/v1/build/01b4e9a2-9d3f-8e15-c334-4f4887b2d9d0/stream
curl -N https://api.meshy.ai/openapi/creative-lab/fridge-magnet/v1/build/01b4e9a2-9d3f-8e15-c334-4f4887b2d9d0/stream \
-H "Authorization: Bearer ${YOUR_API_KEY}"

Response Stream

// Error event example (wrong stage or task not found)
event: error
data: {
  "status_code": 404,
  "message": "Task not found"
}

// Message event examples illustrate task progress.
// Every frame is the full task object; fields not yet populated are null / empty.
// The following PENDING frame is shortened to the fields that change.
event: message
data: {
  "id": "01b4e9a2-9d3f-8e15-c334-4f4887b2d9d0",
  "progress": 0,
  "status": "PENDING"
}

event: message
data: {
  "id": "01b4e9a2-9d3f-8e15-c334-4f4887b2d9d0",
  "type": "creative-lab-fridge-magnet-build",
  "status": "SUCCEEDED",
  "progress": 100,
  "created_at": 1729543250000,
  "started_at": 1729543258000,
  "finished_at": 1729543285000,
  "expires_at": 1729802485000,
  "task_error": null,
  "consumed_credits": 30,
  "model_urls": {
    "glb": "https://assets.meshy.ai/***/tasks/01b4e9a2-9d3f-8e15-c334-4f4887b2d9d0/output/model.glb?Expires=***"
  }
}

参数

  • Name
    id
    Type
    path
    Description

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

返回值

一个由 prototype 或 build 任务对象组成的流。每个事件都携带完整的任务对象,与 获取 Fridge Magnet 任务 返回的内容相同。当任务处于 PENDING 或 IN_PROGRESS 状态时,其输出字段仍为空(null、[] 或 {}),且 finished_at 为 null。

如果 IP 过滤 阻止了任务结果的返回,流会在该位置发送一个 error 事件,其中的 status_code 与 get 请求本应返回的值相同。


GET/openapi/creative-lab/fridge-magnet/v1/(prototype|build)

列出冰箱贴任务

返回你某个阶段的冰箱贴任务,每次一页。路径决定阶段:/prototype 仅返回 prototype 任务,/build 仅返回 build 任务。

Request

GET
/openapi/creative-lab/fridge-magnet/v1/prototype
# List prototype tasks
curl https://api.meshy.ai/openapi/creative-lab/fridge-magnet/v1/prototype?page_size=10 \
  -H "Authorization: Bearer ${YOUR_API_KEY}"

# List build tasks
curl https://api.meshy.ai/openapi/creative-lab/fridge-magnet/v1/build?page_size=10 \
  -H "Authorization: Bearer ${YOUR_API_KEY}"

Response (List Prototype Tasks)

[
  {
    "id": "01a3d8f1-8c2e-7d04-b223-3f3776a1c8c9",
    "type": "creative-lab-fridge-magnet-prototype",
    "name": "",
    "status": "SUCCEEDED",
    "progress": 100,
    "created_at": 1729543210000,
    "started_at": 1729543215000,
    "finished_at": 1729543242000,
    "expires_at": 1729802442000,
    "preceding_tasks": 0,
    "task_error": null,
    "consumed_credits": 6,
    "image_urls": [
      "https://assets.meshy.ai/***/concept.png?Expires=***"
    ]
  }
]

路径参数

  • Name
    stage
    Type
    path
    必选
    Description

    要列出的阶段,prototype 或 build。

查询参数

  • Name
    page_num
    Type
    integer
    默认值 1
    Description

    要返回的页码,范围为 1 到 255。0 返回第一页。超出 0 到 255 范围的值将返回 400。

  • Name
    page_size
    Type
    integer
    默认值 10
    Description

    每页任务数量,最多 100。101 到 255 之间的值将返回 100 个任务,0 则使用默认值。超出 0 到 255 范围的值将返回 400。

  • Name
    sort_by
    Type
    string
    默认值 -created_at
    Description

    排序方式。

    可选值:

    • -created_at:最新优先
    • +created_at:最旧优先

返回值

一个由prototype 任务对象或build 任务对象组成的数组,具体与路径中的阶段相匹配。


冰箱贴 prototype 任务对象

prototype 任务会根据一张照片生成一张彩色概念图。要将该图像转换为 3D 模型,请将该任务的 ID 作为 input_task_id 传递给 build endpoint。

属性

Example Fridge Magnet Prototype Task Object

{
  "id": "01a3d8f1-8c2e-7d04-b223-3f3776a1c8c9",
  "type": "creative-lab-fridge-magnet-prototype",
  "name": "",
  "status": "SUCCEEDED",
  "progress": 100,
  "created_at": 1729543210000,
  "started_at": 1729543215000,
  "finished_at": 1729543242000,
  "expires_at": 1729802442000,
  "preceding_tasks": 0,
  "task_error": null,
  "consumed_credits": 6,
  "image_urls": [
    "https://assets.meshy.ai/***/concept.png?Expires=***"
  ]
}
  • Name
    id
    Type
    string
    Description

    任务 ID。请勿依赖其格式。

  • Name
    type
    Type
    string
    Description

    任务类型,固定为 creative-lab-fridge-magnet-prototype。

  • Name
    name
    Type
    string
    Description

    创建任务时发送的 name;如果未发送,则为 ""。

  • Name
    status
    Type
    string
    Description

    任务的状态。

    可用取值:

    • PENDING:在队列中等待
    • IN_PROGRESS:正在生成结果
    • SUCCEEDED:最终状态,附带结果
    • FAILED:最终状态,原因见 task_error
    • CANCELED:最终状态,无结果
  • Name
    progress
    Type
    integer
    Description

    任务完成的百分比,范围为 0 到 100。任务开始前为 0,成功后为 100。

  • Name
    created_at
    Type
    timestamp
    Description

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

  • Name
    started_at
    Type
    timestamp
    Description

    工作进程开始处理任务的时间,单位为 Unix 毫秒。在此之前为 null。

  • Name
    finished_at
    Type
    timestamp
    Description

    任务达到最终状态的时间,单位为 Unix 毫秒。在此之前为 null。

  • Name
    expires_at
    Type
    timestamp
    Description

    任务结果过期的时间,单位为 Unix 毫秒。该时间为 finished_at 之后 3 天;在任务完成之前,则为 created_at 之后 3 天。对于会无限期保留 API 结果的企业版账户,该时间大约在 100 年之后。请参阅资产保留期。

  • Name
    preceding_tasks
    Type
    integer
    Description

    任务在 PENDING 状态下于队列中的位置。1 表示该任务将是下一个开始的任务。任务离开队列后为 0,在列表结果中始终为 0。

  • Name
    task_error
    Type
    object
    Description

    任务失败的原因。除非 status 为 FAILED,否则为 null。请参阅 Errors。

  • Name
    consumed_credits
    Type
    integer
    Description

    该任务在扣除任何退款后所收取的 credits 数量。返回错误的请求不会被扣费。失败的任务为 0,因为 Meshy 会对其退款。取消任务仅在其处于 PENDING 状态时才会退款。如果 Meshy 无法读取扣费信息,get 或 stream 响应会省略该字段,而 list 请求会返回 500。在这种情况下,请重试该请求。

  • Name
    image_urls
    Type
    array of strings
    Description

    概念图的下载链接。任务成功后,该数组包含一个 URL;在此之前为空。


冰箱贴构建任务对象

构建任务会基于一个已成功的 prototype 任务生成 3D 冰箱贴。它会返回一个您所请求格式的模型文件。

属性

Example Fridge Magnet Build Task Object

{
  "id": "01b4e9a2-9d3f-8e15-c334-4f4887b2d9d0",
  "type": "creative-lab-fridge-magnet-build",
  "name": "",
  "status": "SUCCEEDED",
  "progress": 100,
  "created_at": 1729543250000,
  "started_at": 1729543258000,
  "finished_at": 1729543285000,
  "expires_at": 1729802485000,
  "preceding_tasks": 0,
  "task_error": null,
  "consumed_credits": 30,
  "model_urls": {
    "glb": "https://assets.meshy.ai/***/tasks/01b4e9a2-9d3f-8e15-c334-4f4887b2d9d0/output/model.glb?Expires=***"
  }
}
  • Name
    id
    Type
    string
    Description

    任务 ID。请不要依赖其格式。

  • Name
    type
    Type
    string
    Description

    任务类型,始终为 creative-lab-fridge-magnet-build。

  • Name
    name
    Type
    string
    Description

    您在创建任务时发送的 name,如果没有发送则为 ""。

  • Name
    status
    Type
    string
    Description

    任务的状态。

    可用值:

    • PENDING:在队列中等待
    • IN_PROGRESS:正在生成结果
    • SUCCEEDED:最终状态,附带结果
    • FAILED:最终状态,原因见 task_error
    • CANCELED:最终状态,没有结果
  • Name
    progress
    Type
    integer
    Description

    已完成工作的百分比,从 0 到 100。在任务开始前为 0,成功后为 100。

  • Name
    created_at
    Type
    timestamp
    Description

    任务创建的时间,以 Unix 毫秒表示。

  • Name
    started_at
    Type
    timestamp
    Description

    worker 开始执行任务的时间,以 Unix 毫秒表示。在此之前为 null。

  • Name
    finished_at
    Type
    timestamp
    Description

    任务到达最终状态的时间,以 Unix 毫秒表示。在此之前为 null。

  • Name
    expires_at
    Type
    timestamp
    Description

    任务结果过期的时间,以 Unix 毫秒表示。该时间为 finished_at 之后的 3 天;在任务完成之前,则为 created_at 之后的 3 天。对于可无限期保留 API 结果的企业账户,该时间约为 100 年后。参阅资产保留期。

  • Name
    preceding_tasks
    Type
    integer
    Description

    任务处于 PENDING 状态时在队列中的位置。1 表示它将是下一个开始的任务。任务离开队列后为 0,在列表结果中始终为 0。

  • Name
    task_error
    Type
    object
    Description

    任务失败的原因。除非 status 为 FAILED,否则为 null。参阅 Errors。

  • Name
    consumed_credits
    Type
    integer
    Description

    该任务扣除的 credits 数量(扣除任何退款后的值)。返回错误的请求不会被扣费。失败的任务为 0,因为 Meshy 会退还费用。只有在任务处于 PENDING 状态时取消才会退款。如果 Meshy 无法读取扣费信息,get 或 stream 响应会省略该字段,而 list 请求会返回 500。在这种情况下,请重试该请求。

  • Name
    model_urls
    Type
    object
    Description

    模型文件的下载链接,针对您所请求的 output.format 提供一个条目。在任务成功之前为 {}。

    • Name
      glb
      Type
      string
      Description

      GLB 文件的下载链接。当 output.format 为 glb 时存在。

    • Name
      obj
      Type
      string
      Description

      包含 model.obj、model.mtl 和 texture.png 的 zip 文件的下载链接。当 output.format 为 obj 时存在。

    • Name
      bundle_zip
      Type
      string
      Description

      包含 Meshy 生成的所有文件的 zip 文件的下载链接。当 output.format 为 zip 时存在。