Multi-Image to 3D API

Multi-Image to 3D API 是一项功能,可让你将 Meshy 的 Multi-Image to 3D 能力集成到你自己的应用程序中。在本节中,你将找到开始使用此 API 所需的所有信息。


POST/openapi/v1/multi-image-to-3d

创建 Multi-Image to 3D 任务

此 endpoint 允许您创建一个新的 Multi-Image to 3D 任务。请参阅 Multi-Image to 3D 任务对象 以了解 Multi-Image to 3D 任务对象中包含哪些属性。

参数

  • Name
    input_task_id
    Type
    string
    必选
    Description

    一个已完成的图像生成任务的 ID,其输出(1-4 张图像)将作为输入使用。该任务必须是以下任务之一:文字生成影像、影像生成影像、文字生成影像(多视图)或影像生成影像(多视图)。此外,该任务必须是通过 API 运行的,且状态为 SUCCEEDED

  • Name
    image_urls
    Type
    array
    必选
    Description

    提供 1 到 4 张图像供 Meshy 用于模型创建。目前支持 .jpg.jpeg.png 格式。为获得最佳效果,所有图像应展示同一物体的不同角度。

    提供每张图像有两种方式:

    • 可公开访问的 URL:可从公共互联网访问的 URL。
    • Data URI:图像的 base64 编码 data URI。data URI 示例:data:image/jpeg;base64,<your base64-encoded image data>
  • Name
    ai_model
    Type
    string
    默认值 latest
    Description

    要使用的模型 ID。

    可用值:

    • meshy-6-litemeshy-6meshy-7.1latest(Meshy 7.1)
    • meshy-7(deprecated):请改用 meshy-7.1
  • Name
    geometry_resolution
    Type
    string
    默认值 standard
    Description

    geometry 生成阶段。2k 会以 2048³ 分辨率运行 Ultra 阶段。需要 meshy-7.1latest

    可用值:standard2k

  • Name
    ultra_mode
    Type
    boolean
    已弃用
    默认值 false
    Description

    请改用 geometry_resolutionultra_mode: true 等同于 geometry_resolution: "2k"

  • Name
    should_texture
    Type
    boolean
    默认值 true
    Description

    决定是否生成 texture。设置为 false 会跳过 texture 阶段,生成不带 texture 的 mesh。

仅当 should_texture = true
  • Name
    enable_pbr
    Type
    boolean
    默认值 false
    Description

    除基础色贴图外还生成 PBR 贴图(金属度、粗糙度、法线)。当 ai_modelmeshy-6 时还会额外包含发光贴图,但 texture_resolution: 8k 时不会。meshy-6-litemeshy-7.1latest 不会生成发光贴图。

  • Name
    texture_resolution
    Type
    string
    默认值 2k
    Description

    基础色 texture 分辨率。可选 2k(2048×2048)、4k(4096×4096)或 8k(8192×8192)。分辨率越高,捕捉的表面细节越多。

  • Name
    hd_texture
    Type
    boolean
    已弃用
    默认值 false
    Description

    请改用 texture_resolution——等同于 texture_resolution: "4k"。两者同时设置时,以 texture_resolution 为准。

  • Name
    texture_prompt
    Type
    string
    Description

    提供一个文本 prompt 来指导 texture 处理过程。最多 800 个字符。

  • Name
    texture_image_url
    Type
    string
    Description

    提供一张 2D 图像来指导 texture 处理过程。目前支持 .jpg.jpeg.png 格式。

    提供该图像有两种方式:

    • 可公开访问的 URL:可从公共互联网访问的 URL
    • Data URI:图像的 base64 编码 data URI。data URI 示例:data:image/jpeg;base64,<your base64-encoded image data>
  • Name
    texture_image_urls
    Type
    string[]
    Description

    提供 1 到 4 张展示同一物体不同视图的图像,用于指导 texture 处理。第一张图像为主视图(正面);其余视图(左、后、右)的顺序无关紧要。

    每个元素支持与 texture_image_url 相同的格式(可公开访问的 URL 或 base64 data URI,.jpg/.jpeg/.png)。

    这些图像仅用于指导 texture,与 image_urls 相互独立——两个列表可以包含不同的图像及不同数量的图像。

  • Name
    should_remesh
    Type
    boolean
    默认值 false (Meshy 6 and Meshy 7 models), true (others)
    Description

    控制是否启用 remesh 阶段。为获得最高质量的模型,我们建议将 should_remesh 设置为 false

仅当 should_remesh = true
  • Name
    topology
    Type
    string
    默认值 triangle
    Description

    指定生成模型的 topology。

    可用值:

    • quad:生成以四边形为主的 mesh。
    • triangle:生成经过精简的三角形 mesh。
  • Name
    target_polycount
    Type
    integer
    默认值 30,000
    Description

    指定生成模型中目标多边形数量。实际多边形数量可能会因 geometry 的复杂程度而与目标值有所偏差。

    有效值范围因用户等级不同而有所差异:

    • 100 到 300,000(包含边界值)
  • Name
    decimation_mode
    Type
    integer
    Description

    通过设置多边形数量级别来启用自适应精简。设置该参数后,target_polycount 将被忽略。

    可用值:

    • 1:自适应——超高多边形数量。
    • 2:自适应——高多边形数量。
    • 3:自适应——中等多边形数量。
    • 4:自适应——低多边形数量。
  • Name
    save_pre_remeshed_model
    Type
    boolean
    默认值 false
    Description

    设置为 true 时,Meshy 还会在 remesh 阶段完成前存储一个额外的 GLB 文件。

  • Name
    symmetry_mode
    Type
    string
    已弃用
    默认值 auto
    Description

    已 deprecated。此参数不再影响输出。

    symmetry_mode 字段控制模型生成过程中的 symmetry 行为。

    有效值为:

    • off:禁用 symmetry。
    • auto:根据输入 geometry 自动判定并应用 symmetry。
    • on:在生成过程中强制应用 symmetry。
  • Name
    pose_mode
    Type
    string
    默认值 ""
    Description

    指定生成模型的姿态 mode。

    可用值:

    • a-pose:以 A 字姿态生成模型。
    • t-pose:以 T 字姿态生成模型。
    • ""(空字符串):不应用特定姿态。
  • Name
    is_a_t_pose
    Type
    boolean
    已弃用
    默认值 false
    Description

    请改用 pose_mode。是否以 A/T 姿态生成模型。

  • Name
    image_enhancement
    Type
    boolean
    默认值 true
    Description

    优化输入图像以获得更好的结果。设置为 false 可保留输入图像的原始外观,不进行任何风格处理。

  • Name
    remove_lighting
    Type
    boolean
    默认值 true
    Description

    从基础色 texture 中移除高光和阴影,生成更干净的结果,在自定义光照设置下效果更佳。

  • Name
    moderation
    Type
    boolean
    默认值 false
    Description

    设置为 true 时,将自动对输入内容进行潜在有害内容的审核。如果检测到有害内容,任务将不会进入生成阶段。

    将对 image_urls 中的每张图像以及 texture_prompt 中的文本进行审核。

  • Name
    target_formats
    Type
    string[]
    Description

    指定输出中要包含的 3D 文件格式。仅生成并返回所请求的格式,这可以缩短任务完成时间。

    可用值:glbobjfbxstlusdz3mf

  • Name
    auto_size
    Type
    boolean
    默认值 false
    Description

    设置为 true 时,该服务将使用 AI 视觉自动估算物体的真实世界高度,并据此调整模型尺寸。除非显式设置 origin_at,否则 origin 默认为 bottom

  • Name
    alpha_thumbnail
    Type
    boolean
    默认值 false
    Description

    设置为 true 时,任务会额外渲染预览图的透明背景(RGBA)版本,并在 GET 响应中以 alpha_thumbnail_url 返回。现有的 thumbnail_url 字段不受影响。

  • Name
    multi_view_thumbnails
    Type
    boolean
    默认值 false
    Description

    设置为 true 时,任务会额外渲染四个方向视图缩略图(前、右、后、左),并在 GET 响应中以 thumbnail_urls 返回。现有的 thumbnail_url 字段保持不变,仍指向正面视图,因此不会影响现有客户端。

仅当 auto_size = true
  • Name
    origin_at
    Type
    string
    默认值 bottom
    Description

    启用 auto_size 时 origin 的位置。可用值:bottomcenter

返回值

响应的 result 属性包含新创建的 Multi-Image to 3D 任务的 id

失败模式

  • Name
    400 - Bad Request
    Description

    请求不可接受。常见原因:

    • 缺少参数:必须提供 image_urlsinput_task_id 之一。
    • 输入任务无效input_task_id 必须指向一个状态为 SUCCEEDED 的文字生成影像、影像生成影像或多视图变体任务。
    • 图像数量无效image_urls 必须包含 1 到 4 张图像,texture_image_urls 必须包含 1 到 4 张。
    • 图像格式无效image_urls 中的一张或多张图像不是受支持的格式。
    • texture 输入冲突texture_image_urls 不能与 texture_image_urltexture_prompt 结合使用,且需要 should_texture: true
    • 多视图 texture 不支持该模型texture_image_urls 需要 ai_modelmeshy-7.1latest
    • URL 无法访问image_urlstexture_image_urls 中的一个或多个元素无法下载。
    • 多图输入不支持该分辨率:此 endpoint 不支持 geometry_resolution: "4k";请使用 2kstandard
  • Name
    401 - Unauthorized
    Description

    身份验证失败。请检查您的 API key。

  • Name
    402 - Payment Required
    Description

    credits 不足,无法执行此任务。

  • Name
    429 - Too Many Requests
    Description

    您已超出速率限制。

Request

POST
/openapi/v1/multi-image-to-3d
# Simple request
curl https://api.meshy.ai/openapi/v1/multi-image-to-3d \
  -X POST \
  -H "Authorization: Bearer ${YOUR_API_KEY}" \
  -H 'Content-Type: application/json' \
  -d '{
    "image_urls": [
      "<your publicly accessible image url or base64-encoded data URI>",
      "<your second publicly accessible image url or base64-encoded data URI>"
    ]
  }'

# With Ultra 2K geometry, PBR texturing and GLB format
curl https://api.meshy.ai/openapi/v1/multi-image-to-3d \
  -X POST \
  -H "Authorization: Bearer ${YOUR_API_KEY}" \
  -H 'Content-Type: application/json' \
  -d '{
    "image_urls": [
      "<your publicly accessible image url or base64-encoded data URI>",
      "<your second publicly accessible image url or base64-encoded data URI>"
    ],
    "ai_model": "meshy-7.1",
    "geometry_resolution": "2k",
    "should_texture": true,
    "enable_pbr": true,
    "target_formats": ["glb"]
  }'

Response

{
  "result": "018a210d-8ba4-705c-b111-1f1776f7f578"
}

GET/openapi/v1/multi-image-to-3d/:id

检索 Multi-Image to 3D 任务

此 endpoint 允许你根据有效的任务 id 检索一个 Multi-Image to 3D 任务。 请参阅 Multi-Image to 3D 任务对象 以了解 Multi-Image to 3D 任务对象包含哪些属性。

参数

  • Name
    id
    Type
    path
    Description

    要检索的 Multi-Image to 3D 任务的唯一标识符。

返回值

响应内容包含 Multi-Image to 3D 任务对象。详情请参阅 Multi-Image to 3D 任务对象一节。

Request

GET
/openapi/v1/multi-image-to-3d/018a210d-8ba4-705c-b111-1f1776f7f578
curl https://api.meshy.ai/openapi/v1/multi-image-to-3d/018a210d-8ba4-705c-b111-1f1776f7f578 \
  -H "Authorization: Bearer ${YOUR_API_KEY}"

Response

{
  "id": "018a210d-8ba4-705c-b111-1f1776f7f578",
  "type": "multi-image-to-3d",
  "model_urls": {
    "glb": "https://assets.meshy.ai/***/tasks/018a210d-8ba4-705c-b111-1f1776f7f578/output/model.glb?Expires=***",
    "fbx": "https://assets.meshy.ai/***/tasks/018a210d-8ba4-705c-b111-1f1776f7f578/output/model.fbx?Expires=***",
    "obj": "https://assets.meshy.ai/***/tasks/018a210d-8ba4-705c-b111-1f1776f7f578/output/model.obj?Expires=***",
    "usdz": "https://assets.meshy.ai/***/tasks/018a210d-8ba4-705c-b111-1f1776f7f578/output/model.usdz?Expires=***",
    "stl": "https://assets.meshy.ai/***/tasks/018a210d-8ba4-705c-b111-1f1776f7f578/output/model.stl?Expires=***",
    "pre_remeshed_glb": "https://assets.meshy.ai/***/tasks/018a210d-8ba4-705c-b111-1f1776f7f578/output/pre_remeshed_model.glb?Expires=***"
  },
  "thumbnail_url": "https://assets.meshy.ai/***/tasks/018a210d-8ba4-705c-b111-1f1776f7f578/output/preview.png?Expires=***",
  "thumbnail_urls": {
    "front": "https://assets.meshy.ai/***/tasks/018a210d-8ba4-705c-b111-1f1776f7f578/output/preview_front.png?Expires=***",
    "right": "https://assets.meshy.ai/***/tasks/018a210d-8ba4-705c-b111-1f1776f7f578/output/preview_right.png?Expires=***",
    "back": "https://assets.meshy.ai/***/tasks/018a210d-8ba4-705c-b111-1f1776f7f578/output/preview_back.png?Expires=***",
    "left": "https://assets.meshy.ai/***/tasks/018a210d-8ba4-705c-b111-1f1776f7f578/output/preview_left.png?Expires=***"
  },
  "texture_prompt": "",
  "progress": 100,
  "started_at": 1692771667037,
  "created_at": 1692771650657,
  "expires_at": 1692771679037,
  "finished_at": 1692771669037,
  "status": "SUCCEEDED",
  "texture_urls": [
    {
      "base_color": "https://assets.meshy.ai/***/tasks/018a210d-8ba4-705c-b111-1f1776f7f578/output/texture_0.png?Expires=***",
      "metallic": "https://assets.meshy.ai/***/tasks/018a210d-8ba4-705c-b111-1f1776f7f578/output/texture_0_metallic.png?Expires=XXX",
      "normal": "https://assets.meshy.ai/***/tasks/018a210d-8ba4-705c-b111-1f1776f7f578/output/texture_0_normal.png?Expires=XXX",
      "roughness": "https://assets.meshy.ai/***/tasks/018a210d-8ba4-705c-b111-1f1776f7f578/output/texture_0_roughness.png?Expires=XXX",
      "emission": "https://assets.meshy.ai/***/tasks/018a210d-8ba4-705c-b111-1f1776f7f578/output/texture_0_emission.png?Expires=XXX"
    }
  ],
  "preceding_tasks": 0,
  "task_error": {

    "message": ""

  },

  "consumed_credits": 30
}

DELETE/openapi/v1/multi-image-to-3d/:id

删除 Multi-Image to 3D 任务

此 endpoint 会永久删除一个 Multi-Image to 3D 任务,包括所有相关的模型和数据。此操作不可撤销。

路径参数

  • Name
    id
    Type
    path
    Description

    要删除的 Multi-Image to 3D 任务的 ID。

任务状态

仍处于 PENDING 状态的任务会被删除,并且创建时消耗的 credits 会被退还。

已处于 IN_PROGRESS 状态的任务无法删除:请求会被 以 409 Conflict 拒绝,任务会继续运行。工作进程已经开始处理的任务,其 credits 不可退还,因此在运行中途删除该任务会让你同时损失 credits 和结果。请等待其到达 SUCCEEDEDFAILEDCANCELED 状态后再删除。

处于终止状态(SUCCEEDEDFAILEDCANCELED)的任务会被删除, 且不会退还 credits。

返回值

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

Request

DELETE
/openapi/v1/multi-image-to-3d/018a210d-8ba4-705c-b111-1f1776f7f578
curl --request DELETE \
  --url https://api.meshy.ai/openapi/v1/multi-image-to-3d/018a210d-8ba4-705c-b111-1f1776f7f578 \
  -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 is left 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."
}

GET/openapi/v1/multi-image-to-3d

获取 Multi-Image to 3D 任务列表

此 endpoint 允许您获取 Multi-Image to 3D 任务列表。

参数

可选属性

  • Name
    page_num
    Type
    integer
    Description

    用于分页的页码。起始值及默认值为 1

  • Name
    page_size
    Type
    integer
    Description

    每页数量限制。默认值为 10 项,最大允许值为 100 项。

  • Name
    sort_by
    Type
    string
    Description

    用于排序的字段。可用值:

    • +created_at:按创建时间升序排序。
    • -created_at:按创建时间降序排序。

返回值

返回一个分页的 Multi-Image to 3D 任务对象 列表。

Request

GET
/openapi/v1/multi-image-to-3d
curl https://api.meshy.ai/openapi/v1/multi-image-to-3d?page_size=10 \
-H "Authorization: Bearer ${YOUR_API_KEY}"

Response

[
  {
    "id": "018a210d-8ba4-705c-b111-1f1776f7f578",
    "type": "multi-image-to-3d",
    "model_urls": {
      "glb": "https://assets.meshy.ai/***/tasks/018a210d-8ba4-705c-b111-1f1776f7f578/output/model.glb?Expires=***",
      "fbx": "https://assets.meshy.ai/***/tasks/018a210d-8ba4-705c-b111-1f1776f7f578/output/model.fbx?Expires=***",
      "obj": "https://assets.meshy.ai/***/tasks/018a210d-8ba4-705c-b111-1f1776f7f578/output/model.obj?Expires=***",
      "usdz": "https://assets.meshy.ai/***/tasks/018a210d-8ba4-705c-b111-1f1776f7f578/output/model.usdz?Expires=***",
      "pre_remeshed_glb": "https://assets.meshy.ai/***/tasks/018a210d-8ba4-705c-b111-1f1776f7f578/output/pre_remeshed_model.glb?Expires=***"
    },
    "thumbnail_url": "https://assets.meshy.ai/***/tasks/018a210d-8ba4-705c-b111-1f1776f7f578/output/preview.png?Expires=***",
    "thumbnail_urls": {
      "front": "https://assets.meshy.ai/***/tasks/018a210d-8ba4-705c-b111-1f1776f7f578/output/preview_front.png?Expires=***",
      "right": "https://assets.meshy.ai/***/tasks/018a210d-8ba4-705c-b111-1f1776f7f578/output/preview_right.png?Expires=***",
      "back": "https://assets.meshy.ai/***/tasks/018a210d-8ba4-705c-b111-1f1776f7f578/output/preview_back.png?Expires=***",
      "left": "https://assets.meshy.ai/***/tasks/018a210d-8ba4-705c-b111-1f1776f7f578/output/preview_left.png?Expires=***"
    },
    "texture_prompt": "",
    "progress": 100,
    "started_at": 1692771667037,
    "created_at": 1692771650657,
    "expires_at": 1692771679037,
    "finished_at": 1692771669037,
    "status": "SUCCEEDED",
    "texture_urls": [
      {
        "base_color": "https://assets.meshy.ai/***/tasks/018a210d-8ba4-705c-b111-1f1776f7f578/output/texture_0.png?Expires=***",
        "metallic": "https://assets.meshy.ai/***/tasks/018a210d-8ba4-705c-b111-1f1776f7f578/output/texture_0_metallic.png?Expires=XXX",
        "normal": "https://assets.meshy.ai/***/tasks/018a210d-8ba4-705c-b111-1f1776f7f578/output/texture_0_normal.png?Expires=XXX",
        "roughness": "https://assets.meshy.ai/***/tasks/018a210d-8ba4-705c-b111-1f1776f7f578/output/texture_0_roughness.png?Expires=XXX",
        "emission": "https://assets.meshy.ai/***/tasks/018a210d-8ba4-705c-b111-1f1776f7f578/output/texture_0_emission.png?Expires=XXX"
      }
    ],
    "preceding_tasks": 0,
    "task_error": {

      "message": ""

    },

    "consumed_credits": 30
  }
]

GET/openapi/v1/multi-image-to-3d/:id/stream

流式获取 Multi-Image to 3D 任务

此 endpoint 使用 Server-Sent Events(SSE)为 Multi-Image to 3D 任务提供实时更新的流式数据。

参数

  • Name
    id
    Type
    path
    Description

    要进行流式获取的 Multi-Image to 3D 任务的唯一标识符。

返回

以 Server-Sent Events 的形式返回一个 Multi-Image to 3D 任务对象 的流。

对于 PENDINGIN_PROGRESS 状态的任务,响应流中只会包含必要的 progressstatus 字段。

Request

GET
/openapi/v1/multi-image-to-3d/018a210d-8ba4-705c-b111-1f1776f7f578/stream
curl -N https://api.meshy.ai/openapi/v1/multi-image-to-3d/018a210d-8ba4-705c-b111-1f1776f7f578/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.
// For PENDING or IN_PROGRESS tasks, the response stream will not include all fields.
event: message
data: {
  "id": "018a210d-8ba4-705c-b111-1f1776f7f578",
  "progress": 0,
  "status": "PENDING"
}

event: message
data: {
  "id": "018a210d-8ba4-705c-b111-1f1776f7f578",
  "type": "multi-image-to-3d",
  "model_urls": {
  "glb": "https://assets.meshy.ai/***/tasks/018a210d-8ba4-705c-b111-1f1776f7f578/output/model.glb?Expires=***",
  "fbx": "https://assets.meshy.ai/***/tasks/018a210d-8ba4-705c-b111-1f1776f7f578/output/model.fbx?Expires=***",
  "obj": "https://assets.meshy.ai/***/tasks/018a210d-8ba4-705c-b111-1f1776f7f578/output/model.obj?Expires=***",
  "usdz": "https://assets.meshy.ai/***/tasks/018a210d-8ba4-705c-b111-1f1776f7f578/output/model.usdz?Expires=***",
  "stl": "https://assets.meshy.ai/***/tasks/018a210d-8ba4-705c-b111-1f1776f7f578/output/model.stl?Expires=***",
  "pre_remeshed_glb": "https://assets.meshy.ai/***/tasks/018a210d-8ba4-705c-b111-1f1776f7f578/output/pre_remeshed_model.glb?Expires=***"
  },
  "thumbnail_url": "https://assets.meshy.ai/***/tasks/018a210d-8ba4-705c-b111-1f1776f7f578/output/preview.png?Expires=***",
  "thumbnail_urls": {
  "front": "https://assets.meshy.ai/***/tasks/018a210d-8ba4-705c-b111-1f1776f7f578/output/preview_front.png?Expires=***",
  "right": "https://assets.meshy.ai/***/tasks/018a210d-8ba4-705c-b111-1f1776f7f578/output/preview_right.png?Expires=***",
  "back": "https://assets.meshy.ai/***/tasks/018a210d-8ba4-705c-b111-1f1776f7f578/output/preview_back.png?Expires=***",
  "left": "https://assets.meshy.ai/***/tasks/018a210d-8ba4-705c-b111-1f1776f7f578/output/preview_left.png?Expires=***"
  },
  "texture_prompt": "",
  "progress": 100,
  "started_at": 1692771667037,
  "created_at": 1692771650657,
  "expires_at": 1692771679037,
  "finished_at": 1692771669037,
  "status": "SUCCEEDED",
  "texture_urls": [
    {
      "base_color": "https://assets.meshy.ai/***/tasks/018a210d-8ba4-705c-b111-1f1776f7f578/output/texture_0.png?Expires=***",
      "metallic": "https://assets.meshy.ai/***/tasks/018a210d-8ba4-705c-b111-1f1776f7f578/output/texture_0_metallic.png?Expires=XXX",
      "normal": "https://assets.meshy.ai/***/tasks/018a210d-8ba4-705c-b111-1f1776f7f578/output/texture_0_normal.png?Expires=XXX",
      "roughness": "https://assets.meshy.ai/***/tasks/018a210d-8ba4-705c-b111-1f1776f7f578/output/texture_0_roughness.png?Expires=XXX",
      "emission": "https://assets.meshy.ai/***/tasks/018a210d-8ba4-705c-b111-1f1776f7f578/output/texture_0_emission.png?Expires=XXX"
    }
  ],
  "preceding_tasks": 0,
  "task_error": {

    "message": ""

  },

  "consumed_credits": 30
}

Multi-Image to 3D 任务对象

Multi-Image to 3D 任务对象是 Meshy 用于跟踪从多张图片(1 到 4 张,包含端点值)生成 3d 模型的工作单元。这些图片应为同一物体的图片,理想情况下应来自不同的视图或角度。 该对象具有以下属性:

属性

  • Name
    id
    Type
    string
    Description

    任务的唯一标识符。虽然我们在实现细节上使用 k-可排序的 UUID 作为任务 id,但你不应对 id 的格式做任何假设。

  • Name
    type
    Type
    string
    Description

    Multi-Image to 3D 任务的类型。该值为 multi-image-to-3d

  • Name
    model_urls
    Type
    object
    Description

    指向 Meshy 生成的带贴图 3D 模型文件的可下载 URL。如果某种格式未被生成,则会省略该格式对应的属性,而不是返回空字符串。

    • Name
      glb
      Type
      string
      Description

      指向 GLB 文件的可下载 URL。

    • Name
      fbx
      Type
      string
      Description

      指向 FBX 文件的可下载 URL。

    • Name
      obj
      Type
      string
      Description

      指向 OBJ 文件的可下载 URL。

    • Name
      usdz
      Type
      string
      Description

      指向 USDZ 文件的可下载 URL。

    • Name
      mtl
      Type
      string
      Description

      指向 MTL 文件的可下载 URL,当存在 texture 时会随 OBJ 导出一起返回。

    • Name
      stl
      Type
      string
      Description

      指向 STL 文件的可下载 URL。

    • Name
      3mf
      Type
      string
      Description

      指向 3MF 文件的可下载 URL。仅当通过 target_formats 请求了 3mf 时才会出现。

    • Name
      pre_remeshed_glb
      Type
      string
      Description

      指向 remesh 之前的原始 GLB 输出的可下载 URL。

  • Name
    thumbnail_url
    Type
    string
    Description

    指向模型文件的 thumbnail 图片的可下载 URL。存在时等同于 thumbnail_urls.front,保留此字段是为了向后兼容。

  • Name
    alpha_thumbnail_url
    Type
    string
    Description

    指向 thumbnail_url 的透明背景(RGBA)版本的可下载 URL。仅当任务创建时设置了 alpha_thumbnail: true 且透明预览图成功渲染时才会出现;否则该字段将被省略。

  • Name
    thumbnail_urls
    Type
    object
    Description

    生成的 3D 模型四个基本视角 thumbnail 的可下载 URL。每个值都是一个指向 512×512 PNG 图片的签名 URL,该图片使用与 thumbnail_url 相同的材质和光照渲染。适用于在批处理流程中从多个角度预览模型,而无需下载 GLB。

    • Name
      front
      Type
      string
      Description

      正面视图,绕垂直轴旋转 0°(与 thumbnail_url 一致)。

    • Name
      right
      Type
      string
      Description

      右侧视图,旋转 90°。

    • Name
      back
      Type
      string
      Description

      背面视图,旋转 180°。

    • Name
      left
      Type
      string
      Description

      左侧视图,旋转 270°。

  • Name
    texture_prompt
    Type
    string
    Description

    用于指导贴图(texture)过程的文本 prompt。

  • Name
    texture_image_urls
    Type
    string[]
    Description

    创建任务时使用的 texture 参考图片的可下载 URL,按提供时的顺序排列。仅当任务创建时提供了 texture_image_urls 时才会出现。

  • Name
    ultra_mode
    Type
    boolean
    已弃用
    Description

    已 deprecated;请改为读取 geometry_resolution

  • Name
    geometry_resolution
    Type
    string
    Description

    任务运行所使用的 Ultra 级别(2k);standard 时会省略此字段。

  • Name
    progress
    Type
    integer
    Description

    任务的 progress。如果任务尚未开始,该属性值为 0。一旦任务成功,该值将变为 100

  • Name
    started_at
    Type
    timestamp
    Description

    任务开始时的 timestamp,以毫秒为单位。如果任务尚未开始,该属性值为 0

  • Name
    created_at
    Type
    timestamp
    Description

    任务创建时的 timestamp,以毫秒为单位。

  • Name
    expires_at
    Type
    timestamp
    Description

    任务结果过期时的 timestamp,以毫秒为单位。

  • Name
    finished_at
    Type
    timestamp
    Description

    任务完成时的 timestamp,以毫秒为单位。如果任务尚未完成,该属性值为 0

  • Name
    status
    Type
    string
    Description

    任务的状态。可能的值为 PENDINGIN_PROGRESSSUCCEEDEDFAILEDCANCELED 之一。

  • Name
    texture_urls
    Type
    array
    Description

    任务生成的 texture URL 对象数组。通常这里只包含一个 texture URL 对象。每个 texture URL 具有以下属性:

    • Name
      base_color
      Type
      string
      Description

      指向基础色贴图(base color map)图片的可下载 URL。

    • Name
      metallic
      Type
      string
      Description

      指向金属度贴图(metallic map)图片的可下载 URL。

    • Name
      normal
      Type
      string
      Description

      指向法线贴图图片的可下载 URL。

    • Name
      roughness
      Type
      string
      Description

      指向粗糙度贴图(roughness map)图片的可下载 URL。

    • Name
      emission
      Type
      string
      Description

      指向自发光贴图(emission map)图片的可下载 URL。

  • Name
    preceding_tasks
    Type
    integer
    Description

    前面排队任务的数量。

  • Name
    task_error
    Type
    object
    Description

    失败任务的错误详情。完整的 task_error 对象参考请参见 Errors

  • Name
    consumed_credits
    Type
    integer
    Description

    该任务消耗的 credits 数量。当任务状态为 PENDINGIN_PROGRESSSUCCEEDED 时会出现该字段。FAILED 任务返回 0(失败时 credits 会被退还)。

Example Multi-Image to 3D Task Object

{
  "id": "018a210d-8ba4-705c-b111-1f1776f7f578",
  "type": "multi-image-to-3d",
  "model_urls": {
    "glb": "https://assets.meshy.ai/***/tasks/018a210d-8ba4-705c-b111-1f1776f7f578/output/model.glb?Expires=***",
    "fbx": "https://assets.meshy.ai/***/tasks/018a210d-8ba4-705c-b111-1f1776f7f578/output/model.fbx?Expires=***",
    "obj": "https://assets.meshy.ai/***/tasks/018a210d-8ba4-705c-b111-1f1776f7f578/output/model.obj?Expires=***",
    "usdz": "https://assets.meshy.ai/***/tasks/018a210d-8ba4-705c-b111-1f1776f7f578/output/model.usdz?Expires=***",
    "stl": "https://assets.meshy.ai/***/tasks/018a210d-8ba4-705c-b111-1f1776f7f578/output/model.stl?Expires=***",
    "pre_remeshed_glb": "https://assets.meshy.ai/***/tasks/018a210d-8ba4-705c-b111-1f1776f7f578/output/pre_remeshed_model.glb?Expires=***"
  },
  "thumbnail_url": "https://assets.meshy.ai/***/tasks/018a210d-8ba4-705c-b111-1f1776f7f578/output/preview.png?Expires=***",
  "thumbnail_urls": {
    "front": "https://assets.meshy.ai/***/tasks/018a210d-8ba4-705c-b111-1f1776f7f578/output/preview_front.png?Expires=***",
    "right": "https://assets.meshy.ai/***/tasks/018a210d-8ba4-705c-b111-1f1776f7f578/output/preview_right.png?Expires=***",
    "back": "https://assets.meshy.ai/***/tasks/018a210d-8ba4-705c-b111-1f1776f7f578/output/preview_back.png?Expires=***",
    "left": "https://assets.meshy.ai/***/tasks/018a210d-8ba4-705c-b111-1f1776f7f578/output/preview_left.png?Expires=***"
  },
  "texture_prompt": "",
  "progress": 100,
  "started_at": 1692771667037,
  "created_at": 1692771650657,
  "expires_at": 1692771679037,
  "finished_at": 1692771669037,
  "status": "SUCCEEDED",
  "texture_urls": [
    {
      "base_color": "https://assets.meshy.ai/***/tasks/018a210d-8ba4-705c-b111-1f1776f7f578/output/texture_0.png?Expires=***",
      "metallic": "https://assets.meshy.ai/***/tasks/018a210d-8ba4-705c-b111-1f1776f7f578/output/texture_0_metallic.png?Expires=XXX",
      "normal": "https://assets.meshy.ai/***/tasks/018a210d-8ba4-705c-b111-1f1776f7f578/output/texture_0_normal.png?Expires=XXX",
      "roughness": "https://assets.meshy.ai/***/tasks/018a210d-8ba4-705c-b111-1f1776f7f578/output/texture_0_roughness.png?Expires=XXX",
      "emission": "https://assets.meshy.ai/***/tasks/018a210d-8ba4-705c-b111-1f1776f7f578/output/texture_0_emission.png?Expires=XXX"
    }
  ],
  "preceding_tasks": 0,
  "task_error": {

    "message": ""

  },

  "consumed_credits": 30,
}