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。
建立 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。
選擇
smart-topology時,should_remesh和decimation_mode會被忽略,且僅接受topology: triangle。選擇
lowpoly時,ai_model、topology、target_polycount和should_remesh會被忽略。
- 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僅在
previewmode 下支援。需要meshy-7.1或latest。
- 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。
Smart Topology 的輸出僅支援 triangle。若同時使用
quad和ai_model: meshy-t2會回傳錯誤。
- 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。
- Remesh —— 在
- 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。使用 Sculpture 風格時應將
enable_pbr設為false,因為 Sculpture 風格會生成其自己的一套 PBR 貼圖。
- Name
- moderation
- Type
- boolean
- 預設值 false
- Description
設為
true時,系統會自動對輸入內容進行潛在有害內容的篩查。如偵測到有害內容,任務將不會進入生成階段。prompt中的文字將被篩查。
- Name
- target_formats
- Type
- string[]
- Description
指定輸出中要包含的 3D 檔案格式。僅會生成並回傳所請求的格式,這可以縮短任務完成時間。若省略此參數,則包含所有支援的格式。
可用值:
glb、obj、fbx、stl、usdz、3mf若省略此參數,除
3mf外的所有格式都會生成。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
# 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"
}
創建 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)。解析度越高,捕捉到的表面細節越多。僅適用於refinemode。4k和8k需要ai_model為meshy-6、meshy-7.1或latest。在8k時,不會生成 emission map。
- 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>
如果原始 asset 與上傳圖片之間存在較大的 geometry 差異,圖像 texture 生成可能無法達到最佳效果。指導 texture 生成過程時,只能使用
texture_image_url或texture_prompt中的一個。如果同時提供了這兩個 參數,預設將使用texture_prompt對模型進行 texture 處理。
- 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 任務從頭到尾使用同一模型。傳入明確的值可覆蓋此繼承行為。
明確指定的
latest在此處的解析結果與預覽任務中完全一致(目前為 Meshy 7.1),因此latest預覽任務及其latestrefine 任務始終會使用同一 texture 模型。
- Name
- moderation
- Type
- boolean
- 預設值 false
- Description
當設置為
true時,將自動對輸入內容進行潛在有害內容篩查。如檢測到有害內容,任務將不會進入生成階段。texture_prompt中的文字和texture_image_url中的圖片都會被篩查。
- Name
- remove_lighting
- Type
- boolean
- 預設值 true
- Description
從基礎顏色 texture 中移除高光和陰影,生成更乾淨的結果,更適合自訂燈光設定。
僅在
ai_model為meshy-6時生效;其他模型會忽略此設定。
- Name
- target_formats
- Type
- string[]
- Description
指定輸出中應包含的 3D 檔案格式。僅會生成並回傳所請求的格式,這可以縮短任務完成時間。省略時,將包含所有受支援的格式。
可用值:
glb、obj、fbx、stl、usdz、3mf省略時,將生成除
3mf之外的所有格式。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 模型不相容。
- 無效的任務 ID:
- 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
# 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"
}
檢索一個文字生成 3D 任務
此 endpoint 允許您透過有效的任務 id 檢索一個文字生成 3D 任務。
請參閱 文字生成 3D 任務物件 以了解文字生成 3D 任務物件包含哪些屬性。
此 endpoint 同時適用於 preview 和 refine 任務。
參數
- Name
- id
- Type
- path
- Description
要檢索的文字生成 3D 任務的唯一識別碼。
回傳值
回應內容包含文字生成 3D 任務物件。詳情請查看 文字生成 3D 任務物件 部分。
範例
| Mode | 範例模型 |
|---|---|
| Preview | ![]() |
| Refine | ![]() |
Request
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
}
刪除一個 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
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."
}
列出 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
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
}
]
流式取得 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
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。時間戳表示自 1970 年 1 月 1 日 UTC 起經過的毫秒數,遵循 RFC 3339
標準。 例如,格林威治標準時間 2023 年 9 月 1 日星期五中午 12:00:00 表示為1693569600000。這適用於 Meshy API 中的所有時間戳。
- 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。
如果任務建立時設定了
enable_pbr: false,將省略此屬性。
- Name
normal- Type
- string
- Description
法線貼圖圖片的可下載 URL。
如果任務建立時設定了
enable_pbr: false,將省略此屬性。
- Name
roughness- Type
- string
- Description
粗糙度貼圖圖片的可下載 URL。
如果任務建立時設定了
enable_pbr: false,將省略此屬性。
- Name
emission- Type
- string
- Description
自發光貼圖圖片的可下載 URL。
如果任務建立時設定了
enable_pbr: false,或ai_model為meshy-6-lite,將省略此屬性。
- Name
- preceding_tasks
- Type
- integer
- Description
前面排隊任務的數量。
僅當任務狀態為
PENDING時,此欄位的值才有意義。
- 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
}

