lowpoly 將於 2026年10月30日 下線。 請在這些日期前切換模型,以免請求出錯。 查看所有棄用資訊

Retexture API

根據文本 prompt 或參考圖片,為現有的 3D 模型生成新的材質。該模型可以來自另一個 Meshy 任務,也可以來自模型檔案。


POST/openapi/v1/retexture

建立重新貼圖任務

建立一個重新貼圖任務。該任務在背景執行。關於任務通常需要多長時間,請參閱處理時間。

Request

POST
/openapi/v1/retexture
# Retexture with text prompt
curl https://api.meshy.ai/openapi/v1/retexture \
  -H "Authorization: Bearer ${YOUR_API_KEY}" \
  -H 'Content-Type: application/json' \
  -d '{
    "model_url": "https://cdn.meshy.ai/model/example_model_2.glb",
    "text_style_prompt": "red fangs, Samurai outfit that fused with japanese batik style",
    "enable_original_uv": true,
    "enable_pbr": true
  }'

# Retexture with image style and PBR
curl https://api.meshy.ai/openapi/v1/retexture \
  -H "Authorization: Bearer ${YOUR_API_KEY}" \
  -H 'Content-Type: application/json' \
  -d '{
    "model_url": "https://cdn.meshy.ai/model/example_model_2.glb",
    "image_style_url": "<your publicly accessible image url or base64-encoded data URI>",
    "ai_model": "latest",
    "enable_pbr": true,
    "enable_original_uv": true
  }'

# Retexture with Meshy N1 from front and back views
curl https://api.meshy.ai/openapi/v1/retexture \
  -H "Authorization: Bearer ${YOUR_API_KEY}" \
  -H 'Content-Type: application/json' \
  -d '{
    "model_url": "https://cdn.meshy.ai/model/example_model_2.glb",
    "ai_model": "meshy-n1",
    "multiview_image_urls": [
      "<your front view image url or data URI>",
      "<your back view image url or data URI>"
    ]
  }'

Response

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

參數

  • Name
    input_task_id
    Type
    string
    必選
    Description

    除非你發送 model_url,否則此參數為必填項。產出了待處理 3D 模型的任務的 ID,例如文字生成 3D、影象生成 3D、重構網格或重新貼圖任務。該任務必須是你透過 API 建立、且狀態為 SUCCEEDED 的任務。Meshy 會為該任務的 GLB 產生紋理。

    使用 meshy-n1 時,該任務的模型最多可包含 7,999,999 個面(以三角形計數,一個四邊形計為 2 個)。

  • Name
    model_url
    Type
    string
    必選
    Description

    除非你發送 input_task_id,否則此參數為必填項。要加入紋理的模型,可以是公開 URL 或 data URI。如果兩者都發送,Meshy 會使用 input_task_id。

    該模型必須是 GLB、glTF、OBJ、FBX 或 STL 檔案,若透過 http 或 https URL 提供,大小不超過 400 MB;若作為 data URI 提供,不超過 100 MB。對於 data URI,請使用 MIME type application/octet-stream,例如 data:application/octet-stream;base64,<你的 base64 編碼模型資料>。

    超過 100 MB 的檔案還必須遵循以下規則:

    • GLB、glTF、FBX 或 OBJ 檔案最多可包含 10,000,000 個面。Meshy 以三角形計數面,因此一個四邊形計為 2 個,且被多次繪製的網格每個副本計一次。
    • FBX 檔案必須是 7.1 或更高版本的二進位 FBX。
    • GLB 或 glTF 檔案不得使用 Draco 壓縮。

    使用 meshy-n1 時,無論檔案大小如何,模型最多可包含 7,999,999 個面(以三角形計數,一個四邊形計為 2 個)。

請發送以下三種樣式輸入之一。

  • Name
    text_style_prompt
    Type
    string
    必選
    Description

    除非你發送 image_style_url 或 multiview_image_urls,否則此參數為必填項。描述你想要的紋理的文字,最多 800 個字元。文字過長會回傳 400。使用 meshy-n1 時,若不同時發送 image_style_url,發送該參數會回傳 400。

  • Name
    image_style_url
    Type
    string
    必選
    Description

    除非你發送 text_style_prompt 或 multiview_image_urls,否則此參數為必填項。紋理所遵循風格的 2D 圖片,可以是公開 URL 或 data URI(data:image/jpeg;base64,<你的 base64 編碼圖片資料>)。如果同時發送 text_style_prompt 和 image_style_url,Meshy 會使用 image_style_url。

    圖片必須是 .jpg、.jpeg、.png 或 .webp 檔案,大小不超過 20 MB,且每邊至少為 32 像素。

    當圖片中的物體與模型形狀差異很大時,紋理可能無法很好地貼合。使用 meshy-n1 時,Meshy 會將該圖片視為正面視圖。

  • Name
    multiview_image_urls
    Type
    string[]
    必選
    Description

    除非你發送 text_style_prompt 或 image_style_url,否則此參數為必填項。同一物體從不同視角拍攝的一到四張圖片。第一張圖片是主(正面)視圖。其他視圖(左、後、右)的順序不重要。空陣列或超過四張圖片會回傳 400。

    每張圖片都遵循與 image_style_url 相同的格式和大小規則,每張圖片最多 20 MB。你不能將 multiview_image_urls 與 text_style_prompt 或 image_style_url 一起使用。

    multiview_image_urls 需要明確指定 ai_model 為 meshy-7 或 meshy-n1。使用其他任何 ai_model(包括預設值 latest)都會回傳 400。

  • Name
    ai_model
    Type
    string
    預設值 latest
    Description

    產生紋理所用的 AI 模型。

    可用值:

    • meshy-6-lite
    • meshy-6
    • meshy-7
    • meshy-n1:僅根據參考圖片產生 2K 基礎色紋理。不支援文字 prompt、不產生 PBR 貼圖,也不支援 4K 或 8K。最多 7,999,999 個面。
    • latest:Meshy 7
  • Name
    enable_original_uv
    Type
    boolean
    預設值 false
    Description

    是否保留模型的 UV 佈局,而不產生新的佈局。

    • 對於 Meshy 產生的模型,無論是來自 input_task_id 還是指向 Meshy 輸出結果的 model_url,使用 true 可重複利用其已最佳化的 UV 佈局。
    • 對於你從其他地方上傳的模型,若其 UV 已經良好,使用 true 以保留它們。保持 false 可讓 Meshy 產生新的 UV,這適用於沒有合適 UV 對映的模型。
  • Name
    enable_pbr
    Type
    boolean
    預設值 false
    Description

    是否在產生基礎色的同時也產生 PBR 貼圖(金屬度、粗糙度和法線)。使用 meshy-6 時,Meshy 還會產生一張自發光貼圖,但在 texture_resolution 為 8k 時除外。meshy-6-lite、meshy-7 和 latest 不會產生自發光貼圖。使用 meshy-n1 時,設為 true 會回傳 400。

  • Name
    texture_resolution
    Type
    string
    預設值 2k
    Description

    基礎色紋理的尺寸。解析度越高,擷取到的表面細節越多。

    可用值:

    • 2k:2048 × 2048 像素
    • 4k:4096 × 4096 像素
    • 8k:8192 × 8192 像素

    4k 和 8k 需要 ai_model 為 meshy-6、meshy-7 或 latest。使用 meshy-6-lite 或 meshy-n1 時會回傳 400。在 8k 下,Meshy 不會產生自發光貼圖。

  • Name
    hd_texture
    Type
    boolean
    ⚠ 已棄用
    預設值 false
    Description

    請改用 texture_resolution。true 等同於 texture_resolution: "4k"。如果兩者都發送,Meshy 會使用 texture_resolution。

  • Name
    remove_lighting
    Type
    boolean
    預設值 true
    Description

    是否從基礎色紋理中移除高光和陰影。該效果在你自己的光照下表現更好。

    Meshy 僅在 meshy-6、且 texture_resolution 為 2k 或 4k 時套用此參數。使用 meshy-7 或 latest,或在 8k 下,Meshy 會接受該參數但忽略它。使用 meshy-6-lite 或 meshy-n1 時,無論發送什麼值都會回傳 400。

  • Name
    target_formats
    Type
    string[]
    Description

    要產生的檔案格式。Meshy 只會產生你列出的格式,這可以縮短任務時間。如果省略該參數,Meshy 會產生除 3mf 之外的所有格式。

    可用值:

    • glb
    • obj
    • fbx
    • stl
    • usdz
    • 3mf
  • Name
    alpha_thumbnail
    Type
    boolean
    預設值 false
    Description

    是否同時算繪一張帶透明背景(RGBA)的預覽圖,在取得任務時透過 alpha_thumbnail_url 回傳。thumbnail_url 不會改變。

回傳值

回應的 result 欄位保存新建重新貼圖任務的 ID。

失敗模式

  • Name
    400 - Bad Request
    Description

    請求無法執行。錯誤訊息會說明發現的問題。例如:

    • 缺少參數:既未發送 model_url,也未發送 input_task_id。
    • 缺少樣式:text_style_prompt、image_style_url 和 multiview_image_urls 均未發送。
    • 樣式輸入衝突:multiview_image_urls 與 text_style_prompt 或 image_style_url 一起發送。
    • 多視圖不支援該模型:發送了 multiview_image_urls,但未明確指定 ai_model 為 meshy-7 或 meshy-n1。
    • Meshy N1 不支援該選項:meshy-n1 與 enable_pbr: true、remove_lighting、texture_resolution 為 4k 或 8k、未指定 texture_resolution 的 hd_texture: true,或沒有 image_style_url 的 text_style_prompt 一起發送。
    • Meshy N1 三角形數量過多:使用 meshy-n1 時,3D 模型的三角形數量超過 7,999,999。請減少三角形數量,或使用其他 ai_model。
    • 模型對 Meshy N1 而言過於複雜:使用 meshy-n1 時,model_url 檔案過於複雜,Meshy 無法統計其三角形數量。請減少三角形數量後再次發送該檔案。
    • 三角形計數逾時:使用 meshy-n1 時,統計 model_url 檔案的三角形數量耗時過長。請重試,或縮小模型大小。
    • 輸入任務無效:input_task_id 不是受支援類型的成功任務。
    • 模型格式無效:model_url 檔案的副檔名不受支援。
    • URL 無法存取:Meshy 無法下載 model_url 檔案、image_style_url 圖片或 multiview_image_urls 中的圖片。
    • 模型檔案過大:model_url 檔案透過 http 或 https URL 提供時超過 400 MB,或作為 data URI 提供時超過 100 MB。
    • 面數過多:model_url 檔案超過 100 MB 且面數超過 10,000,000。請減少面數後再次發送該檔案。
    • ASCII FBX 超過 100 MB:model_url 檔案是超過 100 MB 的 ASCII FBX。請將其作為二進位 FBX 或 GLB 發送。
    • 模型檔案無法讀取:model_url 檔案超過 100 MB,且 Meshy 無法讀取其標頭資訊。例如,它是經過 Draco 壓縮的 GLB 或 glTF,或是早於 7.1 版本的二進位 FBX。
    • 模型標頭資訊過於複雜:model_url 檔案超過 100 MB,且其標頭資訊中包含過多需要檢查的網格、節點或記錄。請減少檔案中的物件數量後再次發送。
    • 圖片過大:image_style_url 圖片或 multiview_image_urls 中的某張圖片超過 20 MB。

    使用 meshy-n1 時,對於 Meshy 在任務開始前無法檢查的模型(例如 STL 檔案),此處不會拒絕該請求。如果該模型的三角形數量超過 7,999,999,任務將失敗,Meshy 會退還相應的積分。

    請修正請求後再次發送。參見 Errors。

  • Name
    401 - Unauthorized
    Description

    API 金鑰缺失或無效。請檢查 Authorization 請求標頭。

  • Name
    402 - Payment Required
    Description

    例如:

    • 積分不足:帳戶沒有足夠的積分來完成此任務,或帳戶已達到積分限額。請檢查你的積分餘額,然後重試。
    • 免費方案:建立任務需要付費方案。請在訂閱設定中升級你的方案,然後重試。
  • Name
    403 - Forbidden
    Description

    以下情況之一:

    • 內容審核攔截了該 prompt 或某張輸入圖片。請更改輸入內容,然後重試。
    • input_task_id 是一個浮雕模型,該端點無法對其進行重新貼圖。錯誤訊息為 This model type does not support this operation。請發送其他模型。
  • Name
    404 - Not Found
    Description

    input_task_id 與你的任何任務都不符合。請檢查任務 ID,然後重新發送請求。

  • Name
    429 - Too Many Requests
    Description

    你超出了速率限制。請稍候後重試。參見速率限制。


GET/openapi/v1/retexture/:id

取得 Retexture 任務

根據 ID 回傳一個 Retexture 任務。

Request

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

Response

{
  "id": "018a210d-8ba4-705c-b111-1f1776f7f578",
  "type": "retexture",
  "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=***",
    "mtl": "https://assets.meshy.ai/***/tasks/018a210d-8ba4-705c-b111-1f1776f7f578/output/model.mtl?Expires=***",
    "stl": "https://assets.meshy.ai/***/tasks/018a210d-8ba4-705c-b111-1f1776f7f578/output/model.stl?Expires=***"
  },
  "thumbnail_url": "https://assets.meshy.ai/***/tasks/018a210d-8ba4-705c-b111-1f1776f7f578/output/preview.png?Expires=***",
  "text_style_prompt": "red fangs, Samurai outfit that fused with japanese batik style",
  "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"
    }
  ],
  "task_error": null,

  "consumed_credits": 10
}

參數

  • Name
    id
    Type
    path
    Description

    建立回應中回傳的任務 ID。

回傳值

Retexture 任務物件。


DELETE/openapi/v1/retexture/:id

刪除 Retexture 任務

永久刪除一個 Retexture 任務,包括其模型和資料。刪除後無法復原。

Request

DELETE
/openapi/v1/retexture/a43b5c6d-7e8f-901a-234b-567c890d1e2f
curl --request DELETE \
  --url https://api.meshy.ai/openapi/v1/retexture/a43b5c6d-7e8f-901a-234b-567c890d1e2f \
  -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 或 CANCELED 狀態後再刪除它。

刪除處於最終狀態(SUCCEEDED、FAILED 或 CANCELED)的任務 不會退還其積分。

回傳值

當任務被刪除時回傳 200 OK;當任務處於 IN_PROGRESS 狀態時回傳 409 Conflict。


GET/openapi/v1/retexture

取得 Retexture 任務列表

返回你的 Retexture 任務列表。

Request

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

Response

[
  {
    "id": "018a210d-8ba4-705c-b111-1f1776f7f578",
    "type": "retexture",
    "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=***",
      "usdz": "https://assets.meshy.ai/***/tasks/018a210d-8ba4-705c-b111-1f1776f7f578/output/model.usdz?Expires=***"
    },
    "thumbnail_url": "https://assets.meshy.ai/***/tasks/018a210d-8ba4-705c-b111-1f1776f7f578/output/preview.png?Expires=***",
    "text_style_prompt": "red fangs, Samurai outfit that fused with japanese batik style",
    "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"
      }
    ],
    "task_error": null,

    "consumed_credits": 10
  }
]

參數

  • Name
    page_num
    Type
    integer
    預設值 1
    Description

    要返回的頁碼,最大為 255。更大的值會返回 400。

  • Name
    page_size
    Type
    integer
    預設值 10
    Description

    每頁的任務數量,最大為 100。

  • Name
    sort_by
    Type
    string
    Description

    排序方式。

    可用值:

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

返回值

一個分頁的 Retexture 任務物件列表。


GET/openapi/v1/retexture/:id/stream

流式取得重新貼圖任務

以 Server-Sent Events (SSE) 的形式流式取得重新貼圖任務的更新。

Request

GET
/openapi/v1/retexture/018a210d-8ba4-705c-b111-1f1776f7f578/stream
curl -N https://api.meshy.ai/openapi/v1/retexture/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.
// These examples are shortened. Each event holds the full task object.
event: message
data: {
  "id": "018a210d-8ba4-705c-b111-1f1776f7f578",
  "progress": 0,
  "status": "PENDING"
}

event: message
data: {
  "id": "018a210d-8ba4-705c-b111-1f1776f7f578",
  "progress": 50,
  "status": "IN_PROGRESS"
}

event: message
data: {
  "id": "018a210d-8ba4-705c-b111-1f1776f7f578",
  "type": "retexture",
  "progress": 100,
  "status": "SUCCEEDED",
  "created_at": 1692771650657,
  "started_at": 1692771667037,
  "finished_at": 1692771669037,
  "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=***",
    "mtl": "https://assets.meshy.ai/***/tasks/018a210d-8ba4-705c-b111-1f1776f7f578/output/model.mtl?Expires=***",
    "stl": "https://assets.meshy.ai/***/tasks/018a210d-8ba4-705c-b111-1f1776f7f578/output/model.stl?Expires=***"
  },
  "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"
    }
  ],
  "task_error": null,

  "consumed_credits": 10
}

參數

  • Name
    id
    Type
    path
    Description

    建立回應中回傳的任務 ID。

回傳

以 Server-Sent Events 形式回傳的 重新貼圖任務物件 串流。

每個事件都包含完整的任務物件,其結構與 Get endpoint 回傳的相同。當任務處於 PENDING 或 IN_PROGRESS 狀態時,其結果欄位尚無值。


The Retexture task object

一個 Retexture 任務物件描述了一次 3D 模型的 retexture 操作。它保存了任務的狀態、progress,以及任務成功後的模型和 texture 檔案。

屬性

Example Retexture Task Model

{
  "id": "018a210d-8ba4-705c-b111-1f1776f7f578",
  "type": "retexture",
  "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=***",
    "usdz": "https://assets.meshy.ai/***/tasks/018a210d-8ba4-705c-b111-1f1776f7f578/output/model.usdz?Expires=***"
  },
  "text_style_prompt": "red fangs, Samurai outfit that fused with japanese batik style",
  "image_style_url": "https://assets.meshy.ai/***/image/example_image.jpg?Expires=***",
  "thumbnail_url": "https://assets.meshy.ai/***/tasks/018a210d-8ba4-705c-b111-1f1776f7f578/output/preview.png?Expires=***",
  "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"
    }
  ],
  "task_error": null,

  "consumed_credits": 10
}
  • Name
    id
    Type
    string
    Description

    任務 ID。請將其視為一個不透明的字串,不要依賴其格式。

  • Name
    type
    Type
    string
    Description

    任務類型,始終為 retexture。

  • Name
    model_urls
    Type
    object
    Description

    帶 texture 的 3D 模型的下載連結,每種檔案格式對應一個。

    • Name
      glb
      Type
      string
      Description

      GLB 檔案。

    • Name
      fbx
      Type
      string
      Description

      FBX 檔案。

    • Name
      obj
      Type
      string
      Description

      OBJ 檔案。

    • Name
      usdz
      Type
      string
      Description

      USDZ 檔案。

    • Name
      mtl
      Type
      string
      Description

      MTL 檔案。當模型帶有 texture 時,Meshy 會隨 OBJ 檔案一起回傳該檔案。

    • Name
      stl
      Type
      string
      Description

      STL 檔案。

    • Name
      3mf
      Type
      string
      Description

      3MF 檔案。僅當 target_formats 包含 3mf 時才會出現。

  • Name
    text_style_prompt
    Type
    string
    Description

    你建立任務時使用的文字 prompt。

  • Name
    image_style_url
    Type
    string
    Description

    你建立任務時使用的風格圖片。

  • Name
    multiview_image_urls
    Type
    string[]
    Description

    你建立任務時使用的多視圖參考圖片的下載連結。僅當你使用 multiview_image_urls 建立任務時才會出現。

  • Name
    thumbnail_url
    Type
    string
    Description

    模型縮圖圖片的下載連結。

  • Name
    alpha_thumbnail_url
    Type
    string
    Description

    thumbnail_url 的透明背景(RGBA)版本的下載連結。僅當你使用 alpha_thumbnail: true 建立任務,且 Meshy 繪製了透明預覽圖時才會出現。

  • Name
    progress
    Type
    integer
    Description

    任務完成的百分比。任務開始前為 0,成功後為 100。

  • Name
    started_at
    Type
    timestamp
    Description

    任務開始的時間,單位為 Unix 毫秒。任務開始前為 0。

  • Name
    created_at
    Type
    timestamp
    Description

    任務建立的時間,單位為 Unix 毫秒。

  • Name
    expires_at
    Type
    timestamp
    Description

    任務結果過期的時間,單位為 Unix 毫秒。

  • Name
    finished_at
    Type
    timestamp
    Description

    任務完成的時間,單位為 Unix 毫秒。任務完成前為 0。

  • Name
    status
    Type
    string
    Description

    任務狀態,取值為 PENDING、IN_PROGRESS、SUCCEEDED、FAILED 或 CANCELED 之一。

  • Name
    texture_urls
    Type
    array
    Description

    產生的 texture 的下載連結,是一個物件陣列。該陣列通常只包含一個物件。每個物件包含以下欄位:

    • Name
      base_color
      Type
      string
      Description

      基礎顏色貼圖的下載連結。

    • Name
      metallic
      Type
      string
      Description

      金屬度貼圖的下載連結。當你使用 enable_pbr: false 建立任務時,Meshy 不會回傳該欄位。

    • Name
      normal
      Type
      string
      Description

      法線貼圖的下載連結。當你使用 enable_pbr: false 建立任務時,Meshy 不會回傳該欄位。

    • Name
      roughness
      Type
      string
      Description

      粗糙度貼圖的下載連結。當你使用 enable_pbr: false 建立任務時,Meshy 不會回傳該欄位。

    • Name
      emission
      Type
      string
      Description

      自發光貼圖的下載連結。當你使用以下任一條件建立任務時,Meshy 不會回傳該欄位:

      • enable_pbr: false
      • ai_model 為 meshy-6-lite、meshy-7 或 latest
      • texture_resolution: 8k
  • Name
    preceding_tasks
    Type
    integer
    Description

    佇列中排在此任務之前的任務數量。僅在任務處於 PENDING 狀態時出現;當值為 0 時該欄位會被省略。

  • Name
    task_error
    Type
    object
    Description

    任務失敗時的錯誤詳情。請參閱錯誤。

  • Name
    consumed_credits
    Type
    integer
    Description

    任務消耗的積分數量。當狀態為 PENDING、IN_PROGRESS 或 SUCCEEDED 時出現。對於 FAILED 的任務,該值為 0,因為 Meshy 會在任務失敗時退還積分。