創意工坊 — Q 版手辦 API
把你的照片變成 Q 版風格的可收集 3D 手辦。整個流程分兩段:
prototype 用源照片生成一張風格化概念圖,build 再把概念圖轉成帶貼圖的
3D 模型。兩段通過 input_task_id 串聯。
POST /openapi/creative-lab/figure/v1/prototypePOST /openapi/creative-lab/figure/v1/build
建立 Q 版手辦 Prototype 任務
從源照片生成一張 Q 版風格的概念圖。返回的任務 ID 即作為後續 build 端點的
input_task_id。響應結構詳見
Prototype 任務物件。
參數
- Name
- image_url
- Type
- string
- 必選
- Description
提供給 Meshy 用於 Q 版手辦風格化的源照片。目前支援
.jpg、.jpeg、.png、.webp格式。可通過兩種方式提供圖片:
- 公網可訪問 URL:可從公網訪問的 URL。
- Data URI:圖片的 base64 編碼 data URI,範例:
data:image/jpeg;base64,<your base64-encoded image data>。
- Name
- name
- Type
- string
- Description
可選的任務名稱,僅用於展示。最長 100 個字元。
回傳值
響應的 result 欄位返回新建立的 figure prototype 任務的 id。輪詢
查詢任務 或訂閱 流式更新
直到任務狀態變為 SUCCEEDED,再把該 ID 作為
build 端點 的 input_task_id 傳入。
失敗場景
- Name
400 - Bad Request- Description
請求不合法,常見原因:
- 缺少參數:
image_url必傳。 - 圖片格式不支援:
image_url不是受支援的格式(.jpg、.jpeg、.png、.webp)。 - 圖片尺寸不合法:圖片過小、檔案超過最大體積上限,或像素數超過上限。
- URL 無法訪問:
image_url下載失敗(404 或超時)。 - Data URI 不合法:base64 字串格式錯誤。
- 內容被審核攔截:圖片被 NSFW 或知識產權審核標示。
- 缺少參數:
- Name
401 - Unauthorized- Description
身分驗證失敗,請檢查 API 金鑰。
- Name
402 - Payment Required- Description
積分不足,無法建立任務。
- Name
429 - Too Many Requests- Description
請求超出速率限制。
Request
# Stage 1:生成 Q 版風格的概念圖
curl https://api.meshy.ai/openapi/creative-lab/figure/v1/prototype \
-X POST \
-H "Authorization: Bearer ${YOUR_API_KEY}" \
-H 'Content-Type: application/json' \
-d '{
"image_url": "<your publicly accessible image url or base64-encoded data URI>"
}'
Response
{
"result": "018a210d-8ba4-705c-b111-1f1776f7f578"
}


建立 Q 版手辦 Build 任務
根據已成功的 prototype 任務,生成最終的帶貼圖 3D Q 版手辦。Build 使用與 影象生成 3D 相同的圖生 3D 管線,因此回應字段與輸出 URL 與之完全一致。回應結構詳見 Build 任務對象。
參數
- Name
- input_task_id
- Type
- string
- 必選
- Description
通過同一個 OpenAPI 端點建立的 prototype 任務的 ID。該 prototype 必須由同一 API key 建立、狀態已變為
SUCCEEDED,且產出恰好一張候選圖。通過 webapp 建立的 prototype 任務不接受 —— build 端點只接受由
POST /openapi/creative-lab/figure/v1/prototype產生的任務,其他來源一律返回404。
- Name
- name
- Type
- string
- Description
可選的任務名稱,僅用於展示。最長 100 個字元。
返回值
回應的 result 字段返回新建立的 figure build 任務的 id。輪詢
查詢任務 或訂閱 流式更新
直到任務狀態變為 SUCCEEDED,即可從 model_urls.glb 下載帶貼圖的 GLB;如果下游流程更習慣 Wavefront OBJ,可以同時從 model_urls.obj 與 model_urls.mtl 下載 OBJ + MTL 組合。
失敗場景
- Name
400 - Bad Request- Description
請求不合法,常見原因:
- 缺少參數:
input_task_id必傳。 - UUID 不合法:
input_task_id不是合法 UUID。 - 父任務未成功:引用的 prototype 任務尚未達到
SUCCEEDED。 - 沒有候選圖:prototype 任務雖然成功,但未產出任何候選圖。
- 缺少參數:
- Name
401 - Unauthorized- Description
身份驗證失敗,請檢查 API key。
- Name
402 - Payment Required- Description
積分不足,無法建立任務。
- Name
404 - Not Found- Description
引用的 prototype 任務不存在、屬於其他用戶,或是 webapp 建立的(只接受 API 模式的 prototype 任務)。
- Name
429 - Too Many Requests- Description
請求超出速率限制。
Request
# 階段 2:基於已成功的 prototype 任務串聯 build
curl https://api.meshy.ai/openapi/creative-lab/figure/v1/build \
-X POST \
-H "Authorization: Bearer ${YOUR_API_KEY}" \
-H 'Content-Type: application/json' \
-d '{
"input_task_id": "018a210d-8ba4-705c-b111-1f1776f7f578"
}'
Response
{
"result": "019c320e-9a8f-7a1c-9c11-2a1876f8a9bb"
}

查詢 Q 版手辦任務
根據合法的任務 id 查詢 prototype 或 build 任務。URL 路徑必須與任務所屬的 stage
一致 —— 通過 /prototype/:id 查詢一個 build 任務會返回 404,反之亦然。
回應結構詳見 Q 版手辦 Prototype 任務物件 和 Q 版手辦 Build 任務物件。
參數
- Name
- id
- Type
- path
- Description
要查詢的 figure 任務的唯一標識。
返回值
返回 figure 任務物件,具體形狀取決於請求的 stage。
Request
# Prototype
curl https://api.meshy.ai/openapi/creative-lab/figure/v1/prototype/018a210d-8ba4-705c-b111-1f1776f7f578 \
-H "Authorization: Bearer ${YOUR_API_KEY}"
# Build
curl https://api.meshy.ai/openapi/creative-lab/figure/v1/build/019c320e-9a8f-7a1c-9c11-2a1876f8a9bb \
-H "Authorization: Bearer ${YOUR_API_KEY}"
Prototype Response
{
"id": "018a210d-8ba4-705c-b111-1f1776f7f578",
"type": "creative-lab-figure-prototype",
"name": "",
"status": "SUCCEEDED",
"progress": 100,
"created_at": 1729123456000,
"started_at": 1729123460000,
"finished_at": 1729123486000,
"expires_at": 1729382686000,
"preceding_tasks": 0,
"task_error": null,
"consumed_credits": 6,
"image_urls": [
"https://assets.meshy.ai/***/concept.png?Expires=***"
]
}
Build Response
{
"id": "019c320e-9a8f-7a1c-9c11-2a1876f8a9bb",
"type": "creative-lab-figure-build",
"name": "",
"status": "SUCCEEDED",
"progress": 100,
"created_at": 1729123500000,
"started_at": 1729123510000,
"finished_at": 1729123535000,
"expires_at": 1729382735000,
"preceding_tasks": 0,
"task_error": null,
"consumed_credits": 20,
"prompt": "",
"negative_prompt": "",
"texture_prompt": "",
"texture_image_url": "",
"model_urls": {
"glb": "https://assets.meshy.ai/***/tasks/019c320e-9a8f-7a1c-9c11-2a1876f8a9bb/output/model.glb?Expires=***",
"obj": "https://assets.meshy.ai/***/tasks/019c320e-9a8f-7a1c-9c11-2a1876f8a9bb/output/model.obj?Expires=***",
"mtl": "https://assets.meshy.ai/***/tasks/019c320e-9a8f-7a1c-9c11-2a1876f8a9bb/output/model.mtl?Expires=***"
},
"thumbnail_url": "https://assets.meshy.ai/***/tasks/019c320e-9a8f-7a1c-9c11-2a1876f8a9bb/output/preview.png?Expires=***",
"texture_urls": [
{
"base_color": "https://assets.meshy.ai/***/tasks/019c320e-9a8f-7a1c-9c11-2a1876f8a9bb/output/texture_0.png?Expires=***"
}
]
}
刪除 Q 版手辦任務
取消一個 Q 版手辦任務。如果任務仍處於 PENDING,創建時扣除的積分會自動退還。
已經進入 IN_PROGRESS 的任務可以取消但不退款(worker 可能已經在消耗算力)。
已經處於終態(SUCCEEDED、FAILED、CANCELED)的任務無法取消。
URL 路徑必須與任務所屬的 stage 一致 —— 用 /prototype/:buildId 發送 DELETE 會返回 404。
路徑參數
- Name
- id
- Type
- path
- Description
要取消的 Q 版手辦任務的唯一標識。
返回值
成功時返回 204 No Content,回應體為空。
失敗場景
- Name
400 - Bad Request- Description
任務已經處於終態,無法取消。
- Name
404 - Not Found- Description
任務不存在、屬於其他用戶,或所屬 stage 與 URL 路徑不一致。
Request
curl --request DELETE \
--url https://api.meshy.ai/openapi/creative-lab/figure/v1/prototype/018a210d-8ba4-705c-b111-1f1776f7f578 \
-H "Authorization: Bearer ${YOUR_API_KEY}"
Response
// 成功時返回 204 No Content,回應體為空。
流式訂閱 Q 版手辦任務
透過 Server-Sent Events(SSE)即時訂閱 Q 版手辦任務更新。URL 路徑必須與任務所屬的
stage 一致 —— 在 /prototype/:buildId/stream 上開啟 stream 會立刻返回一條
event: error、status_code: 404 的 SSE 事件並關閉連線。
參數
- Name
- id
- Type
- path
- Description
要訂閱的 Q 版手辦任務的唯一標識。
返回值
返回一串 Q 版手辦 Prototype 或
Q 版手辦 Build 任務對象的 Server-Sent Events。對 PENDING 或 IN_PROGRESS 狀態的任務,事件流只會包含必要的 progress 與
status 欄位。
Request
curl -N https://api.meshy.ai/openapi/creative-lab/figure/v1/build/019c320e-9a8f-7a1c-9c11-2a1876f8a9bb/stream \
-H "Authorization: Bearer ${YOUR_API_KEY}"
Response Stream
// 錯誤事件範例(stage 不匹配或任務不存在)
event: error
data: {
"status_code": 404,
"message": "Task not found"
}
// 消息事件範例:表示任務進度。
// PENDING / IN_PROGRESS 狀態下,事件流不包含全部欄位。
event: message
data: {
"id": "019c320e-9a8f-7a1c-9c11-2a1876f8a9bb",
"progress": 0,
"status": "PENDING"
}
event: message
data: {
"id": "019c320e-9a8f-7a1c-9c11-2a1876f8a9bb",
"type": "creative-lab-figure-build",
"status": "SUCCEEDED",
"progress": 100,
"created_at": 1729123500000,
"started_at": 1729123510000,
"finished_at": 1729123535000,
"expires_at": 1729382735000,
"task_error": null,
"consumed_credits": 20,
"prompt": "",
"negative_prompt": "",
"texture_prompt": "",
"texture_image_url": "",
"model_urls": {
"glb": "https://assets.meshy.ai/***/tasks/019c320e-9a8f-7a1c-9c11-2a1876f8a9bb/output/model.glb?Expires=***",
"obj": "https://assets.meshy.ai/***/tasks/019c320e-9a8f-7a1c-9c11-2a1876f8a9bb/output/model.obj?Expires=***",
"mtl": "https://assets.meshy.ai/***/tasks/019c320e-9a8f-7a1c-9c11-2a1876f8a9bb/output/model.mtl?Expires=***"
},
"thumbnail_url": "https://assets.meshy.ai/***/tasks/019c320e-9a8f-7a1c-9c11-2a1876f8a9bb/output/preview.png?Expires=***",
"texture_urls": [
{
"base_color": "https://assets.meshy.ai/***/tasks/019c320e-9a8f-7a1c-9c11-2a1876f8a9bb/output/texture_0.png?Expires=***"
}
]
}
列出 Q 版手辦任務
按階段分頁列出當前 API 金鑰名下的 Q 版手辦任務。URL 路徑決定階段——
/prototype 返回 Prototype 任務;/build 返回 Build 任務。
跨階段的任務不會出現在另一邊的響應中。
路徑參數
- Name
- stage
- Type
- path
- 必選
- Description
必須為
prototype或build。集合只返回與 URL 階段一致的任務——/prototype永遠不會返回 Build 任務,反之亦然。
查詢參數
- Name
- page_num
- Type
- integer
- 預設值 1
- Description
分頁頁碼。
- Name
- page_size
- Type
- integer
- 預設值 10
- Description
每頁條目數。最大
50。
- Name
- sort_by
- Type
- string
- 預設值 -created_at
- Description
排序欄位。可選值:
+created_at:按創建時間升序排序。-created_at:按創建時間降序排序。
返回值
返回按階段過濾的任務對象分頁列表 —— 列出 /prototype 時返回
Q 版手辦 Prototype 任務對象,
列出 /build 時返回 Q 版手辦 Build 任務對象。
請求
# 列出 Prototype 任務
curl https://api.meshy.ai/openapi/creative-lab/figure/v1/prototype?page_size=10 \
-H "Authorization: Bearer ${YOUR_API_KEY}"
# 列出 Build 任務
curl https://api.meshy.ai/openapi/creative-lab/figure/v1/build?page_size=10 \
-H "Authorization: Bearer ${YOUR_API_KEY}"
響應(列出 Prototype 任務)
[
{
"id": "018a210d-8ba4-705c-b111-1f1776f7f578",
"type": "creative-lab-figure-prototype",
"name": "",
"status": "SUCCEEDED",
"progress": 100,
"created_at": 1729123456000,
"started_at": 1729123460000,
"finished_at": 1729123486000,
"expires_at": 1729382686000,
"preceding_tasks": 0,
"task_error": null,
"consumed_credits": 6,
"image_urls": [
"https://assets.meshy.ai/***/concept.png?Expires=***"
]
}
]
Q 版手辦 Prototype 任务对象
Q 版手辦 Prototype 任務是 Meshy 用來跟蹤「從源照片生成 Q 版概念圖」這一階段的工作單元。
該階段的輸出透過 input_task_id 連入
Build 階段。
字段
- Name
- id
- Type
- string
- Description
任務的唯一標識。我們目前使用 k-sortable UUID 作為實現細節,但不應對 id 的格式做任何假設。
- Name
- type
- Type
- string
- Description
任務類型,值為
creative-lab-figure-prototype。
- Name
- name
- Type
- string
- Description
創建任務時傳入的任務名稱。未傳入時為空字串。
- Name
- status
- Type
- string
- Description
任務狀態。可能值:
PENDING、IN_PROGRESS、SUCCEEDED、FAILED、CANCELED。
- Name
- progress
- Type
- integer
- Description
任務進度。任務未開始時為
0,成功後為100。
- Name
- created_at
- Type
- timestamp
- Description
任務創建時間戳,單位毫秒。
時間戳是自 1970 年 1 月 1 日 UTC 起經過的毫秒數,遵循 RFC 3339
標準。 例如,2023 年 9 月 1 日(星期五)UTC 12:00:00 表示為1693569600000。 Meshy API 中所有時間戳都遵循此規則。
- Name
- started_at
- Type
- timestamp
- Description
任務開始時間戳,單位毫秒。任務未開始時為
0。
- Name
- finished_at
- Type
- timestamp
- Description
任務完成時間戳,單位毫秒。任務未完成時為
0。
- Name
- expires_at
- Type
- timestamp
- Description
任務結果過期時間戳,單位毫秒。
- 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(失敗任務會退款)。
- Name
- image_urls
- Type
- array of strings
- Description
該 prototype 任務產出的概念圖候選 URL 陣列。目前 API 始終只返回一張候選;保留陣列形態,方便未來在不破壞相容性的前提下擴展到多候選。
Q 版手辦 Prototype 任務物件示例
{
"id": "018a210d-8ba4-705c-b111-1f1776f7f578",
"type": "creative-lab-figure-prototype",
"name": "",
"status": "SUCCEEDED",
"progress": 100,
"created_at": 1729123456000,
"started_at": 1729123460000,
"finished_at": 1729123486000,
"expires_at": 1729382686000,
"preceding_tasks": 0,
"task_error": null,
"consumed_credits": 6,
"image_urls": [
"https://assets.meshy.ai/***/concept.png?Expires=***"
]
}
Q 版手辦 Build 任務對象
Q 版手辦 Build 任務是 Meshy 用來追蹤「從已成功的 prototype 任務生成帶貼圖 3D Q 版手辦」 這一階段的工作單元。它內部走與 影象生成 3D 相同的圖生 3D 管線, 因此輸出欄位與該端點的 任務對象 形態一致。
字段
- Name
- id
- Type
- string
- Description
任務的唯一標識。
- Name
- type
- Type
- string
- Description
任務類型,值為
creative-lab-figure-build。
- Name
- name
- Type
- string
- Description
創建任務時傳入的任務名稱。未傳入時為空字串。
- Name
- status
- Type
- string
- Description
任務狀態。可能值:
PENDING、IN_PROGRESS、SUCCEEDED、FAILED、CANCELED。
- Name
- progress
- Type
- integer
- Description
任務進度。任務未開始時為
0,成功後為100。
- Name
- created_at
- Type
- timestamp
- Description
任務創建時間戳,單位毫秒。
- Name
- started_at
- Type
- timestamp
- Description
任務開始時間戳,單位毫秒。
- Name
- finished_at
- Type
- timestamp
- Description
任務完成時間戳,單位毫秒。
- Name
- expires_at
- Type
- timestamp
- Description
任務結果過期時間戳,單位毫秒。
- Name
- preceding_tasks
- Type
- integer
- Description
前面尚未處理的任務數。僅當任務狀態為
PENDING時有意義。
- Name
- task_error
- Type
- object
- Description
失敗任務的錯誤詳情。
task_error物件的完整字段定義詳情請參閱 Errors。
- Name
- consumed_credits
- Type
- integer
- Description
該任務消耗的積分數。
FAILED時返回0(失敗任務會退款)。
- Name
- prompt
- Type
- string
- Description
Q 版手辦 Build 始終為空字串。保留該字段用於與 Image to 3D 共享的
V2ImageTo3DTaskResponse形態保持相容。
- Name
- negative_prompt
- Type
- string
- Description
Q 版手辦 Build 始終為空字串。保留該字段用於跨端點相容。
- Name
- texture_prompt
- Type
- string
- Description
Q 版手辦 Build 始終為空字串。保留該字段用於跨端點相容。
- Name
- texture_image_url
- Type
- string
- Description
Q 版手辦 Build 始終為空字串。保留該字段用於跨端點相容。
- Name
- model_urls
- Type
- object
- Description
生成的 3D 模型文件下載 URL。Q 版手辦 Build 輸出帶貼圖的 GLB,以及偏好 Wavefront OBJ 程序使用的 OBJ + MTL 組合;字段形態對齊 Image to 3D model_urls 物件,未來新增格式不會破壞相容性。
- Name
glb- Type
- string
- Description
帶貼圖 GLB 文件的下載 URL。
- Name
obj- Type
- string
- Description
Wavefront OBJ 文件(包含幾何與 UV)的下載 URL。
- Name
mtl- Type
- string
- Description
OBJ 配套 MTL 材質文件的下載 URL。需與
obj與texture_urls[0].base_color一併使用。
- Name
- thumbnail_url
- Type
- string
- Description
模型縮圖的下載 URL。
- Name
- texture_urls
- Type
- array
- Description
該任務產出的貼圖 URL 物件陣列。目前只包含一個物件,僅含 base color。
- Name
base_color- Type
- string
- Description
基礎顏色(base color)貼圖的下載 URL。
Q 版手辦 Build 任務物件示例
{
"id": "019c320e-9a8f-7a1c-9c11-2a1876f8a9bb",
"type": "creative-lab-figure-build",
"name": "",
"status": "SUCCEEDED",
"progress": 100,
"created_at": 1729123500000,
"started_at": 1729123510000,
"finished_at": 1729123535000,
"expires_at": 1729382735000,
"preceding_tasks": 0,
"task_error": null,
"consumed_credits": 20,
"prompt": "",
"negative_prompt": "",
"texture_prompt": "",
"texture_image_url": "",
"model_urls": {
"glb": "https://assets.meshy.ai/***/tasks/019c320e-9a8f-7a1c-9c11-2a1876f8a9bb/output/model.glb?Expires=***",
"obj": "https://assets.meshy.ai/***/tasks/019c320e-9a8f-7a1c-9c11-2a1876f8a9bb/output/model.obj?Expires=***",
"mtl": "https://assets.meshy.ai/***/tasks/019c320e-9a8f-7a1c-9c11-2a1876f8a9bb/output/model.mtl?Expires=***"
},
"thumbnail_url": "https://assets.meshy.ai/***/tasks/019c320e-9a8f-7a1c-9c11-2a1876f8a9bb/output/preview.png?Expires=***",
"texture_urls": [
{
"base_color": "https://assets.meshy.ai/***/tasks/019c320e-9a8f-7a1c-9c11-2a1876f8a9bb/output/texture_0.png?Expires=***"
}
]
}