Text to 3D API

Text to 3D API 是一項功能,可讓你將 Meshy 的 Text to 3D 能力整合到自己的應用程式中。在本節中,你將找到開始使用此 API 所需的全部資訊。

文字生成 3D 採用兩步驟工作流程。首先,建立一個 預覽(preview) 任務(mode: "preview"),產生不帶 texture 的 3D mesh,以便你評估其形狀。然後,將已完成的預覽任務的任務 ID 傳入 refine 任務(mode: "refine"),為該 mesh 套用 texture。這兩個步驟共用同一個 endpoint。


POST/openapi/v2/text-to-3d

建立 Text to 3D 預覽任務

此 endpoint 用於建立一個 Text to 3D 預覽任務,根據文字 prompt 生成不帶紋理的 3D mesh(僅 geometry)。這是兩步工作流程的第一步。預覽成功後,可使用回傳的任務 ID 建立 refine 任務進行貼圖處理。完整的回應結構請參考 Text to 3D 任務物件。

參數

  • Name
    mode
    Type
    string
    必選
    Description

    建立預覽任務時,此欄位應設為 "preview"。

  • Name
    prompt
    Type
    string
    必選
    Description

    描述該 3D 模型是什麼類型的物體。最多 800 個字元。

  • Name
    model_type
    Type
    string
    預設值 standard
    Description

    指定 3D mesh 生成的類型。

    可用值:

    • standard:常規的高細節 3D mesh 生成。
    • smart-topology:透過 ai_model(meshy-t2)選擇 Smart Topology 模型。
    • lowpoly(已棄用):生成經過最佳化、多邊形更簡潔的 low-poly mesh。我們建議改用 smart-topology。
  • Name
    ai_model
    Type
    string
    預設值 latest
    Description

    要使用的模型 ID。可用值取決於 model_type。

    標準生成(model_type: standard):

    • meshy-6-lite、meshy-6、meshy-7.1、latest(Meshy 7.1)
    • meshy-7(已棄用):請改用 meshy-7.1。

    Smart Topology 生成(model_type: smart-topology):

    • meshy-t2(預設):Smart Topology 模型 —— 擁有更簡潔的 topology、原生分離的部件、triangle 輸出,並可透過 target_polycount 設定面數。
  • Name
    geometry_resolution
    Type
    string
    預設值 standard
    Description

    geometry 生成階段。2k 以 2048³ 執行 Ultra 階段;4k 以 4096³ 執行,以取得 最精細的表面細節。

    可用值:standard、2k、4k

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

    請改用 geometry_resolution。ultra_mode: true 等同於 geometry_resolution: "2k"。

  • 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
    decimation_mode
    Type
    integer
    Description

    透過設定 polycount 等級來啟用自適應精簡。設定後,target_polycount 會被忽略。

    可用值:

    • 1:自適應 —— 超高 polycount。
    • 2:自適應 —— 高 polycount。
    • 3:自適應 —— 中等 polycount。
    • 4:自適應 —— 低 polycount。
  • Name
    target_polycount
    Type
    integer
    Description

    輸出結果中目標多邊形(面)數量。實際數量可能會因 geometry 的不同而與目標值有所偏差。

    target_polycount 在兩種獨立情況下生效:

    • Remesh —— 在 standard 模型上設定 should_remesh: true。mesh 會被 remesh(精簡)到大約這個數量。範圍為 100 到 300,000,預設 30,000。若設定了 decimation_mode,則以它為準,target_polycount 會被忽略。
    • Smart Topology —— 使用 model_type: smart-topology 和 ai_model: meshy-t2。模型會直接以此面數生成;不會執行 remesh,也無需設定 should_remesh。範圍為 100 到 15,000,預設 4,000。
  • 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
    art_style
    Type
    string
    ⚠ 已棄用
    預設值 realistic
    Description

    Meshy-6 不支援此參數。使用 Meshy-6 的請求會忽略 art_style,且某些組合可能導致錯誤。可用值:realistic、sculpture。

  • Name
    moderation
    Type
    boolean
    預設值 false
    Description

    設為 true 時,系統會自動對輸入內容進行潛在有害內容的篩查。如偵測到有害內容,任務將不會進入生成階段。

    prompt 中的文字將被篩查。

  • Name
    target_formats
    Type
    string[]
    Description

    指定輸出中要包含的 3D 檔案格式。僅會生成並回傳所請求的格式,這可以縮短任務完成時間。若省略此參數,則包含所有支援的格式。

    可用值:glb、obj、fbx、stl、usdz、3mf

  • Name
    alpha_thumbnail
    Type
    boolean
    預設值 false
    Description

    設為 true 時,任務會額外渲染一個透明背景(RGBA)版本的預覽圖,並在 GET 回應中以 alpha_thumbnail_url 回傳。現有的 thumbnail_url 欄位保持不變。

  • Name
    auto_size
    Type
    boolean
    預設值 false
    Description

    設為 true 時,服務會使用 AI 視覺自動估算物體的真實世界高度,並相應地調整模型尺寸。除非明確設定 origin_at,否則 origin 預設為 bottom。

僅當 auto_size = true
  • Name
    origin_at
    Type
    string
    預設值 bottom
    Description

    啟用 auto_size 時 origin 的位置。

    可用值:bottom、center。

回傳值

回應中的 result 屬性包含新建立的 Text to 3D 任務的任務 id。

失敗模式

  • Name
    400 - Bad Request
    Description

    請求不可接受。常見原因包括:

    • 缺少參數:缺少必需參數(例如 prompt、mode)。
    • 參數無效:art_style 不是允許的值之一。
    • prompt 過長:prompt 超出字元限制。
    • 模型不支援 low poly:ai_model: "meshy-6-lite" 不支援 model_type: "lowpoly"。
    • 模型不支援 Ultra:geometry_resolution 需要 meshy-7.1 或 latest。
  • Name
    401 - Unauthorized
    Description

    身份驗證失敗。請檢查你的 API 金鑰。

  • Name
    402 - Payment Required
    Description

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

  • Name
    429 - Too Many Requests
    Description

    你已超出速率限制。

Request

POST
/openapi/v2/text-to-3d
# Simple preview with required params only
curl https://api.meshy.ai/openapi/v2/text-to-3d \
  -H 'Authorization: Bearer ${YOUR_API_KEY}' \
  -H 'Content-Type: application/json' \
  -d '{
  "mode": "preview",
  "prompt": "a monster mask"
}'

# Preview with Ultra 4K geometry, remesh and A-pose
curl https://api.meshy.ai/openapi/v2/text-to-3d \
  -H 'Authorization: Bearer ${YOUR_API_KEY}' \
  -H 'Content-Type: application/json' \
  -d '{
  "mode": "preview",
  "prompt": "a futuristic robot warrior",
  "ai_model": "meshy-7.1",
  "geometry_resolution": "4k",
  "should_remesh": true,
  "target_polycount": 100000,
  "pose_mode": "a-pose",
  "target_formats": ["glb"]
}'

Response

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

POST/openapi/v2/text-to-3d

創建 Text to 3D Refine 任務

此 endpoint 用於創建一個 Text to 3D refine 任務,該任務會為已完成的預覽 mesh 套用 texture。您必須提供來自成功的預覽任務的 preview_task_id。這是兩步工作流程中的第二步。

參數

  • Name
    mode
    Type
    string
    必選
    Description

    創建 refine 任務時,此欄位應設置為 "refine"。

  • Name
    preview_task_id
    Type
    string
    必選
    Description

    對應的預覽任務 id。

    給定預覽任務的狀態必須為 SUCCEEDED。

  • Name
    enable_pbr
    Type
    boolean
    預設值 false
    Description

    除基礎顏色外,還生成 PBR 貼圖(metallic、roughness、normal)。當 ai_model 為 meshy-6 時也會包含 emission map,但在 texture_resolution: 8k 時不會生成 emission map。meshy-6-lite、meshy-7.1 和 latest 不會生成 emission map。

  • Name
    texture_resolution
    Type
    string
    預設值 2k
    Description

    基礎顏色 texture 解析度。可選值為 2k(2048×2048)、4k(4096×4096)或 8k(8192×8192)。解析度越高,捕捉到的表面細節越多。僅適用於 refine mode。

  • 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
    ai_model
    Type
    string
    預設值 inherited from the preview task
    Description

    用於 refine 的模型 ID。

    可用值:

    • meshy-6-lite、meshy-6、meshy-7.1、latest(Meshy 7.1)
    • meshy-7(已 deprecated):請改用 meshy-7.1。

    省略此 參數 將繼承預覽任務所使用的模型,從而使預覽任務及其 refine 任務從頭到尾使用同一模型。傳入明確的值可覆蓋此繼承行為。

  • Name
    moderation
    Type
    boolean
    預設值 false
    Description

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

    texture_prompt 中的文字和 texture_image_url 中的圖片都會被篩查。

  • Name
    remove_lighting
    Type
    boolean
    預設值 true
    Description

    從基礎顏色 texture 中移除高光和陰影,生成更乾淨的結果,更適合自訂燈光設定。

  • Name
    target_formats
    Type
    string[]
    Description

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

    可用值:glb、obj、fbx、stl、usdz、3mf

  • Name
    alpha_thumbnail
    Type
    boolean
    預設值 false
    Description

    當設置為 true 時,任務會額外渲染預覽的透明背景(RGBA)版本,並在 GET 回應中以 alpha_thumbnail_url 回傳。現有的 thumbnail_url 欄位保持不變。

  • Name
    auto_size
    Type
    boolean
    預設值 false
    Description

    當設置為 true 時,服務會使用 AI 視覺自動估算物體的真實世界高度,並據此對模型進行 尺寸調整。除非明確設定了 origin_at,否則 origin 預設為 bottom。

僅當 auto_size = true
  • Name
    origin_at
    Type
    string
    預設值 bottom
    Description

    啟用 auto_size 時 origin 的位置。

    可用值:bottom、center。

回傳值

回應中的 result 屬性包含新創建的 Text to 3D 任務的任務 id。

失敗模式

  • Name
    400 - Bad Request
    Description

    請求無法被接受。常見原因:

    • 無效的任務 ID:preview_task_id 無效或不存在。
    • 任務尚未就緒:預覽任務尚未成功完成。
    • 模型不匹配:預覽任務所使用的 AI 模型與請求的 refine 模型不相容。
  • Name
    401 - Unauthorized
    Description

    身份驗證失敗。請檢查您的 API key。

  • Name
    402 - Payment Required
    Description

    credits 不足,無法執行此任務。

  • Name
    404 - Not Found
    Description

    未找到由 preview_task_id 指定的預覽任務。

  • Name
    429 - Too Many Requests
    Description

    您已超出 速率限制。

Request

POST
/openapi/v2/text-to-3d
# Basic refine task
curl https://api.meshy.ai/openapi/v2/text-to-3d \
  -H 'Authorization: Bearer ${YOUR_API_KEY}' \
  -H 'Content-Type: application/json' \
  -d '{
  "mode": "refine",
  "preview_task_id": "018a210d-8ba4-705c-b111-1f1776f7f578",
  "enable_pbr": true
}'

# Refine with auto-size and GLB format
curl https://api.meshy.ai/openapi/v2/text-to-3d \
  -H 'Authorization: Bearer ${YOUR_API_KEY}' \
  -H 'Content-Type: application/json' \
  -d '{
  "mode": "refine",
  "preview_task_id": "018a210d-8ba4-705c-b111-1f1776f7f578",
  "target_formats": ["glb"],
  "auto_size": true
}'

Response

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

GET/openapi/v2/text-to-3d/:id

檢索一個文字生成 3D 任務

此 endpoint 允許您透過有效的任務 id 檢索一個文字生成 3D 任務。 請參閱 文字生成 3D 任務物件 以了解文字生成 3D 任務物件包含哪些屬性。

此 endpoint 同時適用於 preview 和 refine 任務。

參數

  • Name
    id
    Type
    path
    Description

    要檢索的文字生成 3D 任務的唯一識別碼。

回傳值

回應內容包含文字生成 3D 任務物件。詳情請查看 文字生成 3D 任務物件 部分。

範例

Mode範例模型
PreviewPreview model
RefineRefined model

Request

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

Response

{
  "id": "018a210d-8ba4-705c-b111-1f1776f7f578",
  "type": "text-to-3d-preview",
  "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=***",
    "mtl": "https://assets.meshy.ai/***/tasks/018a210d-8ba4-705c-b111-1f1776f7f578/output/model.mtl?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=***"
  },
  "thumbnail_url": "https://assets.meshy.ai/***/tasks/018a210d-8ba4-705c-b111-1f1776f7f578/output/preview.png?Expires=***",
  "prompt": "a monster mask",
  "progress": 100,
  "started_at": 1692771667037,
  "created_at": 1692771650657,
  "finished_at": 1692771669037,
  "status": "SUCCEEDED",
  "texture_urls": [
    {
      "base_color": "https://assets.meshy.ai/***/tasks/018a210d-8ba4-705c-b111-1f1776f7f578/output/texture_0.png?Expires=***"
    }
  ],
  "preceding_tasks": 0,
  "task_error": {

    "message": ""

  },

  "consumed_credits": 20
}

DELETE/openapi/v2/text-to-3d/:id

刪除一個 Text to 3D 任務

此 endpoint 將永久刪除一個 Text to 3D 任務,包括所有關聯的模型和資料。此操作不可逆。

路徑參數

  • Name
    id
    Type
    path
    Description

    要刪除的 Text to 3D 任務的 ID。

任務狀態

仍處於 PENDING 狀態的任務會被刪除,並且建立時消耗的 credits 會被退還。

已經處於 IN_PROGRESS 狀態的任務無法刪除:請求會被 409 Conflict 拒絕,任務會繼續運行。工作處理程序已經開始處理的任務,其 credits 不可退還,因此在運行過程中刪除它將使你同時失去 credits 和結果。請等待其 達到 SUCCEEDED、FAILED 或 CANCELED 狀態,然後再刪除。

處於終止狀態(SUCCEEDED、FAILED 或 CANCELED)的任務會被刪除, 且不會退還 credits。

回傳值

成功時回傳 200 OK,當任務處於 IN_PROGRESS 狀態時回傳 409 Conflict。

Request

DELETE
/openapi/v2/text-to-3d/018a210d-8ba4-705c-b111-1f1776f7f578
curl --request DELETE \
  --url https://api.meshy.ai/openapi/v2/text-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/v2/text-to-3d

列出 Text to 3D 任務

此 endpoint 允許您檢索 Text to 3D 任務的清單。

參數

  • Name
    page_num
    Type
    integer
    預設值 1
    Description

    用於分頁的頁碼。

  • Name
    page_size
    Type
    integer
    預設值 10
    Description

    分頁大小限制。允許的最大值為 100 個。

  • Name
    sort_by
    Type
    string
    Description

    用於排序的欄位。

    可用的值:

    • +created_at:按建立時間升冪排序。
    • -created_at:按建立時間降冪排序。

回傳值

回傳一個分頁的 Text to 3D 任務物件 清單。

Request

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

Response

[
  {
    "id": "018a210d-8ba4-705c-b111-1f1776f7f578",
    "type": "text-to-3d-preview",
    "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=***",
      "mtl": "https://assets.meshy.ai/***/tasks/018a210d-8ba4-705c-b111-1f1776f7f578/output/model.mtl?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=***",
    "prompt": "a monster mask",
    "progress": 100,
    "started_at": 1692771667037,
    "created_at": 1692771650657,
    "finished_at": 1692771669037,
    "status": "SUCCEEDED",
    "texture_urls": [
      {
        "base_color": "https://assets.meshy.ai/***/tasks/018a210d-8ba4-705c-b111-1f1776f7f578/output/texture_0.png?Expires=***"
      }
    ],
    "preceding_tasks": 0,
    "task_error": {

      "message": ""

    },

    "consumed_credits": 20
  }
]

GET/openapi/v2/text-to-3d/:id/stream

流式取得 Text to 3D 任務

此 endpoint 使用 Server-Sent Events(SSE)即時串流傳輸 Text to 3D 任務的更新。

參數

  • Name
    id
    Type
    path
    Description

    要串流傳輸的 Text to 3D 任務的唯一識別碼。

回傳值

以 Server-Sent Events 的形式回傳 Text to 3D 任務物件 的串流。

對於 PENDING 或 IN_PROGRESS 狀態的任務,回應串流中只會包含必要的 progress 和 status 欄位。

Request

GET
/openapi/v2/text-to-3d/018a210d-8ba4-705c-b111-1f1776f7f578/stream
curl -N https://api.meshy.ai/openapi/v2/text-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",
  "progress": 50,
  "status": "IN_PROGRESS"
}

event: message
data: {
"id": "018a210d-8ba4-705c-b111-1f1776f7f578",
"type": "text-to-3d-preview",
"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=***"
},
"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": 20
}

The Text to 3D Task Object

Text to 3D 任務物件是 Meshy 用於追蹤從文字輸入生成 3D 模型的工作單元。Text to 3D API 有兩個階段,preview 和 refine。Preview 階段用於生成僅包含 mesh 的 3D 模型,refine 階段則基於 preview 階段的結果生成帶紋理的 3D 模型。

該物件具有以下屬性:

Properties

  • Name
    id
    Type
    string
    Description

    任務的唯一識別碼。雖然我們在實作細節中使用可 k 排序的 UUID 作為任務 id,但你不應對 id 的格式做任何假設。

  • Name
    type
    Type
    string
    Description

    Text to 3D 任務的類型。可能的值為 text-to-3d-preview(表示 preview 階段任務)和 text-to-3d-refine(表示 refine 階段任務)。

  • Name
    model_urls
    Type
    object
    Description

    Meshy 生成的帶紋理 3D 模型檔案的可下載 URL。如果某種格式未生成,對應格式的屬性將被省略,而不是回傳空字串。

    • Name
      glb
      Type
      string
      Description

      GLB 檔案的可下載 URL。

    • Name
      fbx
      Type
      string
      Description

      FBX 檔案的可下載 URL。

    • Name
      usdz
      Type
      string
      Description

      USDZ 檔案的可下載 URL。

    • Name
      obj
      Type
      string
      Description

      OBJ 檔案的可下載 URL。

    • Name
      mtl
      Type
      string
      Description

      MTL 檔案的可下載 URL。

    • Name
      stl
      Type
      string
      Description

      STL 檔案的可下載 URL。

    • Name
      3mf
      Type
      string
      Description

      3MF 檔案的可下載 URL。僅當透過 target_formats 請求了 3mf 時才會出現。

  • Name
    prompt
    Type
    string
    Description

    這是建立任務時使用的未經修改的 prompt。

  • Name
    negative_prompt
    Type
    string
    ⚠ 已棄用
    Description

    為向後相容而保留。此欄位對生成的模型沒有功能性影響。

  • Name
    art_style
    Type
    string
    ⚠ 已棄用
    Description

    建立 preview 任務時使用的未經修改的 art_style。Meshy-6 不支援此欄位。

  • Name
    texture_richness
    Type
    string
    ⚠ 已棄用
    Description

    為向後相容而保留。此欄位對生成的模型沒有功能性影響。

  • Name
    texture_prompt
    Type
    string
    Description

    在 refine 階段用於指導貼圖過程的附加文字提示。

  • Name
    ultra_mode
    Type
    boolean
    ⚠ 已棄用
    Description

    已棄用;請改為讀取 geometry_resolution。

  • Name
    geometry_resolution
    Type
    string
    Description

    preview 任務執行所使用的 Ultra 檔位(2k 或 4k);standard 檔位時省略此欄位。

  • Name
    texture_image_url
    Type
    string
    Description

    用於指導貼圖過程的紋理圖片的可下載 URL。

  • Name
    thumbnail_url
    Type
    string
    Description

    模型檔案縮圖的可下載 URL。

  • Name
    alpha_thumbnail_url
    Type
    string
    Description

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

  • Name
    video_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
    finished_at
    Type
    timestamp
    Description

    任務完成時間的時間戳,單位為毫秒。如果任務尚未完成,此屬性為 0。

  • Name
    status
    Type
    string
    Description

    任務的狀態。可能的值為 PENDING、IN_PROGRESS、SUCCEEDED、FAILED、CANCELED 之一。

  • 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 物件參考請參閱 Errors。

  • Name
    consumed_credits
    Type
    integer
    Description

    該任務消耗的 credits 數量。當任務狀態為 PENDING、IN_PROGRESS 或 SUCCEEDED 時會出現此欄位。對於 FAILED 任務,回傳 0(失敗時 credits 會被退回)。

Example Text to 3D Task Object

{
  "id": "018a210d-8ba4-705c-b111-1f1776f7f578",
  "type": "text-to-3d-preview",
  "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=***",
    "obj": "https://assets.meshy.ai/***/tasks/018a210d-8ba4-705c-b111-1f1776f7f578/output/model.obj?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=***"
  },
  "prompt": "a monster mask",
  "texture_prompt": "green slimy skin with scales and warts",
  "texture_image_url": "",
  "thumbnail_url": "https://assets.meshy.ai/***/tasks/018a210d-8ba4-705c-b111-1f1776f7f578/output/preview.png?Expires=***",
  "progress": 100,
  "started_at": 1692771667037,
  "created_at": 1692771650657,
  "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": 20
}