Text to 3D API

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

文字生成 3D 採用兩步驟工作流程。首先,建立一個預覽任務(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-5meshy-6meshy-7latest(Meshy 7)

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

    • meshy-t2(預設):Smart Topology 模型 —— topology 更簡潔、原生分離部件、三角形輸出,並且可以透過 target_polycount 設定面數。
  • Name
    ultra_mode
    Type
    boolean
    預設值 false
    Description

    啟用 Ultra 生成,以獲得更高保真度的 geometry 和更精細的表面細節。生成耗時更長,並額外消耗 5 credits。

  • Name
    should_remesh
    Type
    boolean
    預設值 false (meshy-6, meshy-7), 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 將被重新劃分(簡化)至大約此數量。範圍為 100 到 300,000,預設 30,000。如果設定了 decimation_mode,則優先生效,target_polycount 將被忽略。
    • Smart Topology —— 使用 model_type: smart-topologyai_model: meshy-t2 時。模型將直接以此面數生成;不會執行 remesh,也不需要 should_remesh。範圍為 100 到 15,000,預設 4,000。
  • Name
    symmetry_mode
    Type
    string
    已棄用
    預設值 auto
    Description

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

    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,某些組合可能會導致錯誤。可用值:realisticsculpture

  • Name
    moderation
    Type
    boolean
    預設值 false
    Description

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

    將對 prompt 中的文字進行篩查。

  • Name
    target_formats
    Type
    string[]
    Description

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

    可用值:glbobjfbxstlusdz3mf

  • 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 的位置。

    可用值:bottomcenter

回傳值

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

失敗模式

  • Name
    400 - Bad Request
    Description

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

    • 缺少參數:缺少必需的參數(例如 promptmode)。
    • 參數無效:art_style 不是允許的值之一。
    • prompt 過長:prompt 超出了字元限制。
  • Name
    401 - Unauthorized
    Description

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

  • Name
    402 - Payment Required
    Description

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

  • 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 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",
  "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

Create a Text to 3D Refine Task

此 endpoint 用於建立一個 Text to 3D refine 任務,將 texture 套用到已完成的預覽 mesh 上。你必須提供來自成功的預覽任務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_modelmeshy-6 時,還會包含 emission 貼圖,但在 texture_resolution: 8k 時除外(不會產生 emission 貼圖)。meshy-7(以及 latest)不會產生 emission 貼圖。

  • 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 以引導貼圖過程。最多 800 個字元。

  • Name
    texture_image_url
    Type
    string
    Description

    提供一張 2D 圖片以引導貼圖過程。目前支援 .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-5meshy-6meshy-7latest(Meshy 7)。

    省略此 參數 將繼承預覽任務所使用的模型,讓預覽及其 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 檔案格式。只會產生並回傳請求的格式,這可以減少任務完成時間。省略時,將包含所有支援的格式。

    可用值:glbobjfbxstlusdz3mf

  • 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 的位置。

    可用值:bottomcenter

回傳值

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

失敗模式

  • Name
    400 - Bad Request
    Description

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

    • 無效的任務 IDpreview_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

獲取一個 Text to 3D 任務

此 endpoint 允許你根據有效的任務 id 獲取一個 Text to 3D 任務。 請參閱 Text to 3D 任務物件 以查看 Text to 3D 任務物件中包含哪些屬性。

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

參數

  • Name
    id
    Type
    path
    Description

    要獲取的 Text to 3D 任務的唯一識別碼。

回傳

回應內容包含 Text to 3D 任務物件。詳情請參閱 Text to 3D 任務物件 部分。

範例

模式範例模型
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 將永久刪除一個文字生成 3D 任務,包括所有相關的模型和資料。此操作不可復原。

路徑參數

  • Name
    id
    Type
    path
    Description

    要刪除的文字生成 3D 任務的 ID。

返回值

成功時返回 200 OK

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

// Returns 200 Ok on success.

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

獲取 Text to 3D 任務列表

此 endpoint 允許您檢索文字生成 3D 任務列表。

參數

  • Name
    page_num
    Type
    integer
    預設值 1
    Description

    用於分頁的頁碼。

  • Name
    page_size
    Type
    integer
    預設值 10
    Description

    每頁大小限制。最多允許 50 項。

  • Name
    sort_by
    Type
    string
    Description

    用於排序的欄位。

    可用值:

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

返回值

返回一個分頁的文字生成 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 任務物件 串流。

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

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 模型的工作單元。文字生成 3D API 有兩個階段,previewrefine。Preview 階段用於生成僅含網格的 3D 模型,refine 階段則基於 preview 階段的結果生成帶貼圖的 3D 模型。

該物件具有以下屬性:

屬性

  • Name
    id
    Type
    string
    Description

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

  • Name
    type
    Type
    string
    Description

    文字生成 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

    回顯建立 preview 任務時使用的 ultra_mode 值。僅在 meshy-7(或 latest)的 preview 任務明確設定了 ultra_mode 時才會出現;否則將被省略。

  • 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

    任務的狀態。可能的值為 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 物件參考請參閱 Errors

  • Name
    consumed_credits
    Type
    integer
    Description

    此任務消耗的 credits 數量。當任務狀態為 PENDINGIN_PROGRESSSUCCEEDED 時會出現此欄位。對於 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
}