文字生成 3D API
文字生成 3D API 是一項功能,讓你能將 Meshy 的文字生成 3D 能力整合到你自己的應用程式中。在本節中,你將找到開始使用此 API 所需的所有資訊。
文字生成 3D 使用兩步驟工作流程。首先,建立一個預覽任務(mode: "preview")以產生沒有 texture 的 3D mesh,以便你評估其形狀。然後,將已完成預覽任務的任務 ID 傳遞給精細任務(mode: "refine"),以為 mesh 套用 texture。這兩個步驟共用同一個 endpoint。
建立 Text to 3D 預覽任務
此 endpoint 用於建立一個 Text to 3D 預覽任務,該任務會根據文字 prompt 生成一個未貼圖的 3D mesh(僅幾何體)。這是兩步工作流程中的第一步。預覽任務成功後,使用回傳的任務 ID 來建立精細化任務進行貼圖處理。完整的回應結構請參閱 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-5、meshy-6、meshy-7、latest(Meshy 7)
Smart Topology 生成(
model_type: smart-topology):meshy-t2(預設):Smart Topology 模型 —— 擁有更簡潔的 topology、原生分離的部件、triangle 輸出,並可透過target_polycount設定面數。
- Name
- ultra_mode
- Type
- boolean
- 預設值 false
- Description
啟用 Ultra 生成,以獲得更高保真度、表面細節更精細的 geometry。生成耗時更長,並額外消耗 5 個 credits。
僅在
ai_model為meshy-7(或latest)且僅在previewmode 下受支援。
- 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。
Smart Topology 輸出僅支援 triangle。若同時請求
quad與ai_model: meshy-t2,將回傳錯誤。
- Name
- decimation_mode
- Type
- integer
- Description
透過設定 面數 級別來啟用自適應簡化。設定後,
target_polycount將被忽略。可選值:
1:自適應 —— 超高 面數。2:自適應 —— 高 面數。3:自適應 —— 中等 面數。4:自適應 —— 低 面數。
- 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
已棄用。此參數不再影響輸出。
symmetry_mode欄位控制模型生成過程中的 symmetry 行為。有效值為:
off:停用 symmetry。auto:根據輸入的 geometry 自動判斷並套用 symmetry。on:在生成過程中強制使用 symmetry。
- Name
- pose_mode
- Type
- string
- 預設值 ""
- Description
指定生成模型的姿勢 mode。
可選值:
a-pose:以 A pose 生成模型。t-pose:以 T pose 生成模型。""(空字串):不套用特定姿勢。
- Name
- is_a_t_pose
- Type
- boolean
- ⚠ 已棄用
- 預設值 false
- Description
請改用
pose_mode。是否以 A/T pose 生成模型。
- 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超出字元限制。
- 缺少參數:缺少必需參數(例如
- 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 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"
}
建立 Text to 3D 精細化(Refine)任務
此 endpoint 用於建立 Text to 3D 精細化任務,將 texture 套用到已完成的預覽 mesh 上。您必須提供來自成功的預覽任務的 preview_task_id。這是兩步驟工作流程中的第二步。
參數
- Name
- mode
- Type
- string
- 必選
- Description
建立精細化任務時,此欄位應設定為 "refine"。
- Name
- preview_task_id
- Type
- string
- 必選
- Description
對應預覽任務的 id。
給定預覽任務的狀態必須為
SUCCEEDED。
- Name
- enable_pbr
- Type
- boolean
- 預設值 false
- Description
除基礎色彩外,還會生成 PBR 貼圖(金屬度、粗糙度、法線)。當
ai_model為meshy-6時還會包含自發光貼圖,但在texture_resolution: 8k時除外(不會生成自發光貼圖)。meshy-7(以及latest)不會生成自發光貼圖。
- 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或latest。在8k時,不會生成自發光貼圖。
- 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>
如果原始 asset 與上傳圖片之間存在較大的 geometry 差異,圖片貼圖可能無法達到最佳效果。指導貼圖生成過程時,
texture_image_url和texture_prompt只能使用其中一個。如果兩個 參數 都提供了,則預設使用texture_prompt對模型進行貼圖。
- Name
- ai_model
- Type
- string
- 預設值 latest
- Description
用於精細化的模型 ID。可用值:
meshy-5、meshy-6、meshy-7、latest(Meshy 7)。latest在此處的解析方式與預覽任務中完全一致(目前為 Meshy 7),因此latest預覽及其對應的latest精細化始終使用同一個 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時生效。在meshy-7(以及latest)上,該 參數 會被接受但被忽略。
- 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 模型與請求的精細化模型不相容。
- 任務 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"
}
取得 Text to 3D 任務
此 endpoint 允許您根據有效的任務 id 取得一個 Text to 3D 任務。
請參閱 The Text to 3D Task Object,了解 Text to 3D 任務物件包含哪些屬性。
此 endpoint 同時適用於 preview 和 refine 任務。
參數
- Name
- id
- Type
- path
- Description
要取得的 Text to 3D 任務的唯一識別碼。
回傳值
回應中包含 Text to 3D 任務物件。詳情請參閱 The Text to 3D Task Object 部分。
範例
| 模式 | 範例模型 |
|---|---|
| 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
}
刪除文字生成 3D 任務
此 endpoint 將永久刪除一個文字生成 3D 任務,包括所有關聯的模型和資料。此操作不可逆。
路徑參數
- Name
- id
- Type
- path
- Description
要刪除的文字生成 3D 任務的 ID。
返回值
成功時返回 200 OK。
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
// Returns 200 Ok on success.
獲取 Text to 3D 任務列表
此 endpoint 允許您檢索 Text to 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:依建立時間遞減排序。
回傳值
回傳一個分頁的 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)為 文字生成 3D 任務串流即時更新。
參數
- Name
- id
- Type
- path
- Description
要進行串流傳輸的 文字生成 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 Task 物件是 Meshy 用於追蹤根據文字輸入生成 3D 模型的工作單元。文字生成 3D API 有兩個階段,preview 和 refine。Preview 階段用於生成僅有網格的 3D 模型,refine 階段則基於 preview 階段的結果生成帶貼圖的 3D 模型。
該物件具有以下屬性:
屬性
- Name
- id
- Type
- string
- Description
任務的唯一識別碼。雖然我們在實作細節上使用 k-可排序的 UUID 作為任務 id,但你不應對 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。時間戳表示自 1970 年 1 月 1 日 UTC 起經過的毫秒數,遵循 RFC 3339
標準。 例如,2023 年 9 月 1 日星期五 GMT 中午 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-5,則該屬性將被省略。
- Name
- preceding_tasks
- Type
- integer
- Description
排在前面的任務數量。
該欄位的值僅在任務狀態為
PENDING時才有意義。
- Name
- task_error
- Type
- object
- Description
失敗任務的錯誤詳情。完整的
task_error物件參考請參見 錯誤。
- Name
- consumed_credits
- Type
- integer
- Description
該任務消耗的積分數量。當任務狀態為
PENDING、IN_PROGRESS或SUCCEEDED時會出現此欄位。對於FAILED任務,回傳0(失敗時積分會被退還)。
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
}

