影像轉 3D API

影像轉 3D API 是一項功能,可讓您將 Meshy 的影像轉 3D 功能整合到您自己的應用程式中。在本節中,您將找到開始使用此 API 所需的所有資訊。


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

建立圖像轉 3D 任務

此端點允許您建立新的圖像轉 3D 任務。請參閱圖像轉 3D 任務物件以查看圖像轉 3D 任務物件包含哪些屬性。

參數

  • Name
    input_task_id
    Type
    string
    必选
    Description

    已完成圖像生成任務的 ID,其輸出將作為此任務的輸入圖片。該任務必須是以下任務之一:文字轉圖像或圖像轉圖像。此外,它必須透過 API 執行、狀態為 SUCCEEDED,且僅產出一張圖片。

  • Name
    image_url
    Type
    string
    必选
    Description

    提供一張用於模型生成的圖像。目前支援.jpg.jpeg.png格式。

    有兩種方式提供圖片:

    • 可由公網存取的 URL:一個可以從公網存取的圖片連結。
    • Data URI:圖片的 base64 編碼資料 URI。例如:data:image/jpeg;base64,<your base64-encoded image data>
  • Name
    model_type
    Type
    string
    默认值 standard
    Description

    指定 3D 網格生成的類型。

    可選值:

    • standard:一般高細節 3D 網格生成。
    • lowpoly:生成最佳化後多邊形更簡潔的低面數網格。
  • Name
    ai_model
    Type
    string
    默认值 latest
    Description

    要使用的模型 ID。可選值:meshy-5meshy-6latest(Meshy 6)。

  • Name
    should_texture
    Type
    boolean
    默认值 true
    Description

    決定是否生成貼圖。設定為 false 時跳過貼圖階段,僅生成網格。

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

    生成 PBR 貼圖(金屬度、粗糙度、法線)以及基礎色。當 ai_modelmeshy-6latest 時,還會額外生成自發光貼圖。

  • Name
    hd_texture
    Type
    boolean
    默认值 false
    Description

    以 4K(4096×4096)解析度生成基礎色貼圖,獲得更高細節。

  • Name
    texture_prompt
    Type
    string
    Description

    提供文字提示以引導貼圖生成。最多 600 個字元。

  • Name
    texture_image_url
    Type
    string
    Description

    提供一張 2D 圖片以引導貼圖生成。目前支援.jpg.jpeg.png格式。

    有兩種方式提供圖片:

    • 可由公網存取的 URL:一個可以從公網存取的圖片連結。
    • Data URI:圖片的 base64 編碼資料 URI。例如:data:image/jpeg;base64,<your base64-encoded image data>
  • Name
    should_remesh
    Type
    boolean
    默认值 false (meshy-6), true (others)
    Description

    控制是否啟用重拓撲階段。設定為 false 時,API 將直接回傳最高精度的三角網格。

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

    指定生成模型的拓撲結構。

    可選值:

    • quad:生成以四邊形為主的網格。
    • triangle:生成簡化的三角網格。
  • Name
    target_polycount
    Type
    integer
    默认值 30,000
    Description

    指定生成模型的目標面數。實際面數可能會依幾何複雜度而有所偏差。

    有效取值範圍依使用者等級而不同:

    • 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 時,會在執行重拓撲階段之前額外儲存一份原始 GLB 結果。

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

    已棄用。此參數不再影響輸出。

    symmetry_mode欄位控制生成過程中對稱性的行為。

    有效值:

    • off:關閉對稱。
    • auto:根據輸入幾何自動判斷並套用對稱。
    • on:強制在生成過程中套用對稱。
  • Name
    pose_mode
    Type
    string
    默认值 ""
    Description

    指定生成模型的姿態模式。

    可選值:

    • a-pose:生成 A Pose 的模型。
    • t-pose:生成 T Pose 的模型。
    • ""(空字串):不套用特定姿態。
  • 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

    移除基礎色貼圖中的高光和陰影,生成更乾淨的效果,在自訂光照設定下表現更佳。

  • Name
    moderation
    Type
    boolean
    默认值 false
    Description

    當設定為 true 時,輸入內容將自動進行潛在有害內容篩檢。如果偵測到有害內容,任務將不會進入生成階段。

    image_urltexture_image_urltexture_prompt 的內容都將被篩檢。

  • Name
    target_formats
    Type
    string[]
    Description

    指定輸出中包含的 3D 檔案格式。僅會生成並回傳所請求的格式,可減少任務完成時間。省略時,將包含所有支援的格式。

    可選值:glbobjfbxstlusdz3mf

  • Name
    auto_size
    Type
    boolean
    默认值 false
    Description

    當設定為 true 時,服務會使用 AI 視覺自動估算物體的真實高度,並相應調整模型大小。除非明確設定了 origin_at,否則原點將預設為 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 時,任務會額外渲染四個固定視角縮圖(front、right、back、left),並在 GET 回應的 thumbnail_urls 欄位中回傳。原有 thumbnail_url 欄位保持不變,仍指向 front 視角,舊版用戶端不受影響。

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

    auto_size 啟用時的原點位置。

    可選值:bottomcenter

回傳值

回應的result欄位包含新建圖像轉 3D 任務的任務id

失敗模式

  • Name
    400 - Bad Request
    Description

    請求不合法。常見原因:

    • 缺少參數:必須提供 image_urlinput_task_id 其中之一。
    • 輸入任務無效input_task_id 必須引用一個狀態為 SUCCEEDED、且僅產出一張圖片的文字轉圖像或圖像轉圖像任務。
    • 圖片格式無效:提供的 image_url 不是支援的格式(.jpg、.jpeg、.png)。
    • URL 無法存取image_url 無法下載(404 或逾時)。
    • Data URI 無效:base64 字串格式錯誤。
    • 參數組合無效enable_pbr 僅在 should_texture 為 true 時支援。
  • Name
    401 - Unauthorized
    Description

    驗證失敗。請檢查您的 API 金鑰。

  • Name
    402 - Payment Required
    Description

    積分不足,無法執行此任務。

  • Name
    429 - Too Many Requests
    Description

    您已超出請求頻率限制。

请求

POST
/openapi/v1/image-to-3d
# 仅使用必需参数的简单请求
curl https://api.meshy.ai/openapi/v1/image-to-3d \
  -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>"
  }'

# 启用重建网格、PBR 和 A-pose
curl https://api.meshy.ai/openapi/v1/image-to-3d \
  -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>",
    "enable_pbr": true,
    "should_remesh": true,
    "target_polycount": 100000,
    "should_texture": true,
    "pose_mode": "a-pose",
    "target_formats": ["glb"]
  }'

响应

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

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

取得圖片轉 3D 任務

此端點可讓您透過有效的任務id取得圖片轉 3D 任務。請參閱圖片轉 3D 任務物件,以查看圖片轉 3D 任務物件包含哪些屬性。

參數

  • Name
    id
    Type
    path
    Description

    要取得的圖片轉 3D 任務的唯一識別碼。

傳回值

回應包含圖片轉 3D 任務物件。詳情請查閱圖片轉 3D 任務物件部分。

请求

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

响应

{
  "id": "018a210d-8ba4-705c-b111-1f1776f7f578",
  "type": "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/image-to-3d/:id

刪除圖片轉 3D 任務

此端點會永久刪除一個圖片轉 3D 任務,包括所有相關的模型和資料。此操作無法復原。

路徑參數

  • Name
    id
    Type
    path
    Description

    要刪除的圖片轉 3D 任務 ID。

回傳值

成功時會回傳 200 OK

请求

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

响应

// 成功则返回 200 Ok。

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

取得圖片轉 3D 任務清單

此端點可讓您取得圖片轉 3D 任務的清單。

參數

選用屬性

  • Name
    page_num
    Type
    integer
    Description

    分頁的頁碼。起始值與預設值為1

  • Name
    page_size
    Type
    integer
    Description

    每頁回傳的任務數量。預設為10,允許的最大值為50

  • Name
    sort_by
    Type
    string
    Description

    排序欄位。可選值:

    • +created_at:依建立時間遞增排序。
    • -created_at:依建立時間遞減排序。

回傳值

回傳分頁的圖片轉 3D 任務物件列表。

请求

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

响应

[
  {
    "id": "018a210d-8ba4-705c-b111-1f1776f7f578",
    "type": "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/image-to-3d/:id/stream

串流圖片轉 3D 任務

此端點會透過 Server-Sent Events (SSE) 以串流方式回傳圖片轉 3D 任務的即時進度更新。

參數

  • Name
    id
    Type
    path
    Description

    要以串流方式取得的圖片轉 3D 任務的唯一識別碼。

回傳值

回傳圖片轉 3D 任務物件的 Server-Sent Events 串流。

對於狀態為 PENDINGIN_PROGRESS 的任務,回應串流僅包含必要的 progressstatus 欄位。

请求

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

响应流

// 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": "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
}

圖片轉 3D 任務物件

圖片轉 3D 任務物件是 Meshy 用於追蹤從圖片輸入生成 3D 模型的工作單元。 此物件包含以下屬性:

屬性

  • Name
    id
    Type
    string
    Description

    任務的唯一識別碼。雖然我們使用 k-sortable UUID 作為任務 id 的實作細節,但您不應對 id 格式做任何假設。

  • Name
    type
    Type
    string
    Description

    圖像轉 3D 任務的類型。值為 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

      生成 OBJ 且包含貼圖時回傳的 MTL 檔案下載連結。

    • Name
      stl
      Type
      string
      Description

      STL 檔案的可下載連結。

    • Name
      3mf
      Type
      string
      Description

      3MF 檔案的可下載連結。僅在透過 target_formats 請求 3mf 時回傳。

    • Name
      pre_remeshed_glb
      Type
      string
      Description

      重拓撲前的原始 GLB 下載連結。

  • Name
    thumbnail_url
    Type
    string
    Description

    模型檔案縮圖的可下載 URL。當 thumbnail_urls 存在時,等同於 thumbnail_urls.front,保留作為向後相容欄位。

  • Name
    alpha_thumbnail_url
    Type
    string
    Description

    thumbnail_url 的透明背景(RGBA)版本可下載 URL。僅當建立任務時設定了 alpha_thumbnail: true 且成功算繪出透明預覽圖時才會回傳,否則會省略此欄位。

  • Name
    thumbnail_urls
    Type
    object
    Description

    模型四個固定視角縮圖的下載 URL。每個值都是一張 512×512 PNG 的簽章 URL,材質和光照與 thumbnail_url 一致。方便在批次生成 pipeline 中,無需下載 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

    用於引導貼圖生成的文字提示詞。

  • Name
    texture_image_url
    Type
    string
    Description

    用於引導貼圖生成的圖片 URL。

  • Name
    progress
    Type
    integer
    Description

    任務進度。如果任務尚未開始,該屬性為 0。任務成功後為 100

  • Name
    started_at
    Type
    timestamp
    Description

    任務開始的時間戳(毫秒)。如果任務尚未開始,該屬性為 0

  • Name
    created_at
    Type
    timestamp
    Description

    任務建立的時間戳(毫秒)。

  • Name
    expires_at
    Type
    timestamp
    Description

    任務結果過期的時間戳(毫秒)。

  • Name
    finished_at
    Type
    timestamp
    Description

    任務完成的時間戳(毫秒)。如果任務尚未完成,該屬性為 0

  • Name
    status
    Type
    string
    Description

    任務狀態。可能的值有 PENDINGIN_PROGRESSSUCCEEDEDFAILEDCANCELED

  • Name
    texture_urls
    Type
    array
    Description

    任務生成的貼圖 URL 物件陣列。通常只包含一個貼圖 URL 物件。每個貼圖 URL 包含以下屬性:

    • Name
      base_color
      Type
      string
      Description

      基礎色貼圖的可下載 URL。

    • Name
      metallic
      Type
      string
      Description

      金屬度貼圖的可下載 URL。

    • Name
      normal
      Type
      string
      Description

      法線貼圖的可下載 URL。

    • Name
      roughness
      Type
      string
      Description

      粗糙度貼圖的可下載 URL。

    • Name
      emission
      Type
      string
      Description

      自發光貼圖的可下載 URL。

  • Name
    preceding_tasks
    Type
    integer
    Description

    前置任務數量。

  • Name
    task_error
    Type
    object
    Description

    失敗任務的錯誤詳細資訊。完整 task_error 物件參考請查看錯誤處理

  • Name
    consumed_credits
    Type
    integer
    Description

    此任務消耗的積分數。當任務狀態為 PENDINGIN_PROGRESSSUCCEEDED 時回傳。對於 FAILED 任務會回傳 0(失敗時積分會被退還)。

图像转3D任务对象示例

{
  "id": "018a210d-8ba4-705c-b111-1f1776f7f578",
  "type": "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": "",
  "texture_image_url": "",
  "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,
}