lowpoly 將於 2026年10月30日 下線。 請在這些日期前切換模型,以免請求出錯。

Creative Lab — 燈具 API

分兩個階段,將一張來源照片轉變為可 3D 列印的燈罩: 原型(prototype)階段會產生一張風格化的霧白概念圖,並將其轉換為一個 空心 3D 模型(GLB);隨後建構(build)階段會在該模型上執行燈具處理器, 產生可列印的 STL 零件——一個帶有光源固定件底座板的開底燈罩,以及固定件掛座 本身。這兩個階段透過 input_task_id 建立關聯。

  • POST /openapi/creative-lab/lamp/v1/prototype
  • POST /openapi/creative-lab/lamp/v1/build

POST/openapi/creative-lab/lamp/v1/prototype

建立燈具原型任務

根據參考照片生成一張磨砂白色概念圖,並將其轉換為中空的 3D 燈罩模型。回應中同時包含概念圖(image_urls)和 3D 模型(model_urls.glb 及 thumbnail_url)。返回的任務 ID 即為傳遞給建置 endpoint 的 input_task_id。回應結構請參閱 燈具原型任務物件。

參數

  • Name
    image_url
    Type
    string
    必選
    Description

    Meshy 用作燈罩視覺參考的來源照片。目前支援 .jpg、.jpeg、.png 和 .webp 格式。

    最大檔案大小:20 MB。

    提供圖像有兩種方式:

    • 可公開存取的 URL:可從公共網際網路存取的 URL。
    • Data URI:圖像的 base64 編碼 data URI。Data URI 範例:data:image/jpeg;base64,<your base64-encoded image data>。
  • Name
    image_subject
    Type
    string
    預設值 character
    Description

    用於選擇風格化 prompt 的主體類別提示。可用值:

    • character(預設)— 單一角色/物體主體(人偶、動物、吉祥物等)。
    • landscape — 戶外場景/全景主體(山脈、城市風光、森林等)。
  • Name
    name
    Type
    string
    Description

    可選的任務名稱,用於展示目的。最多 100 個字元。

  • Name
    remove_background
    Type
    boolean
    預設值 false
    Description

    設為 true 時,原型圖將以透明 RGBA PNG 格式返回並移除背景,便於你將主體合成到任意背景上。

回傳值

回應中的 result 屬性包含新建立的燈具原型任務的任務 id。輪詢 取得任務 endpoint 或訂閱 串流介面,直到任務達到 SUCCEEDED 狀態,然後將該 ID 作為 input_task_id 傳遞給 建置 endpoint。

失敗模式

  • Name
    400 - Bad Request
    Description

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

    • 缺少參數:image_url 為必填項。
    • 圖像格式無效:提供的 image_url 格式不受支援(.jpg、.jpeg、.png、.webp)。
    • 圖像尺寸超出範圍:圖像過小、超過最大檔案大小,或超過最大像素數。
    • URL 無法存取:無法下載 image_url(404 或 timeout)。
    • Data URI 無效:base64 字串格式錯誤。
    • 內容被標記:輸入圖像被 NSFW 或智慧財產權 moderation 標記。
    • image_subject 無效:不是 character / landscape 之一。
  • Name
    401 - Unauthorized
    Description

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

  • Name
    402 - Payment Required
    Description

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

  • Name
    429 - Too Many Requests
    Description

    你已超出速率限制。

Request

POST
/openapi/creative-lab/lamp/v1/prototype
# Stage 1: concept image + hollow 3D lampshade model from a source photo
curl https://api.meshy.ai/openapi/creative-lab/lamp/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>",
    "image_subject": "character"
  }'

Response

{
  "result": "018a210d-8ba4-705c-b111-1f1776f7f578"
}
Prototype example
Start with a source photo; the prototype returns the concept image and a hollow 3D model that the build stage processes.
Source cat photo used as the Creative Lab Lamp input
Prototype input
Creative Lab Lamp prototype output generated from the source photo
Prototype output

POST/openapi/creative-lab/lamp/v1/build

建立燈具建置任務

從已成功的原型任務產生最終的可 3D 列印零件。建置過程會在原型的 3D 模型上執行燈具處理器:將模型縮放至 diameter_mm,按 cut_amount_percent 削平底部,按 thickness_mm 進行中空處理,打開底部,並且——當選擇了固定件預設時——加入帶固定孔的底板以及一個獨立的光源安裝座。有關回應結構,請參閱 燈具建置任務物件。

參數

  • Name
    input_task_id
    Type
    string
    必選
    Description

    透過同一 OpenAPI endpoint 建立的原型任務的任務 ID。該原型必須使用同一 API key 建立,必須已達到 SUCCEEDED 狀態,並且必須已產生 3D 模型。

    透過網頁應用建立的原型任務不被接受——建置 endpoint 僅接受由 POST /openapi/creative-lab/lamp/v1/prototype 產生的原型任務,對任何其他來源都會回傳 404 拒絕。

  • Name
    name
    Type
    string
    Description

    用於顯示的可選任務名稱。最多 100 個字元。

options

燈罩 geometry 的可選調整參數。每個欄位都有合理的預設值——僅需傳送你想覆寫的欄位。

  • Name
    diameter_mm
    Type
    number
    預設值 150
    Description

    燈罩包圍盒的目標最大尺寸,單位為毫米。mesh 將被統一縮放以符合該尺寸。範圍:[50, 400]。

  • Name
    thickness_mm
    Type
    number
    預設值 1
    Description

    中空燈罩的壁厚,單位為毫米。範圍:(0, 10]。

  • Name
    cut_amount_percent
    Type
    number
    預設值 1
    Description

    底部被削平的模型高度百分比,使燈罩能夠平放在列印床上,並為固定件留出開口。範圍:[1, 100]。

  • Name
    light_source_preset
    Type
    string
    預設值 bambu_mh001_60mm
    Description

    決定底部建置方式的光源固定件預設。可用值:

    • bambu_mh001_60mm(預設)——開放式底部燈罩,加上帶有 60 毫米固定孔的底板,兩者均在 model_urls.lamp_stl 中,固定座作為 model_urls.base_stl 提供。
    • none —— 單個封閉式燈罩,位於 model_urls.lamp_stl 中;此時省略 model_urls.base_stl。
  • Name
    fixture_offset_x_mm
    Type
    number
    預設值 0
    Description

    底板上固定孔相對於燈罩中心的 X 軸偏移量,單位為毫米。僅當 light_source_preset ≠ none 時有意義。範圍:[-80, 80]。

  • Name
    fixture_offset_z_mm
    Type
    number
    預設值 0
    Description

    底板上固定孔相對於燈罩中心的 Z 軸(深度)偏移量,單位為毫米。僅當 light_source_preset ≠ none 時有意義。範圍:[-80, 80]。

  • Name
    rotate_x_deg
    Type
    number
    預設值 0
    Description

    在處理前對模型施加的繞 X 軸的旋轉角度,單位為度。三個旋轉按 XYZ 歐拉角順序繞模型中心施加。範圍:[-360, 360]。

  • Name
    rotate_y_deg
    Type
    number
    預設值 0
    Description

    在處理前對匯入的 mesh 施加的繞 Y 軸的旋轉角度,單位為度。範圍:[-360, 360]。

  • Name
    rotate_z_deg
    Type
    number
    預設值 0
    Description

    在處理前對匯入的 mesh 施加的繞 Z 軸的旋轉角度,單位為度。範圍:[-360, 360]。

  • Name
    include_result_json
    Type
    boolean
    預設值 false
    Description

    當為 true 且 output.format 為 zip 時,將燈具處理器的 result.json(管線名稱、警告資訊及產物路徑)包含在打包檔案中。當 output.format 為 stl 時此參數將被忽略。

output

可選的輸出格式選擇器。預設為 stl。

  • Name
    format
    Type
    string
    預設值 stl
    Description

    建置回傳的產物包。可用值:

    • stl(預設)——回傳 model_urls.lamp_stl(燈罩,若設定了固定件預設則連同底板一起回傳),當 light_source_preset ≠ none 時還會回傳 model_urls.base_stl。
    • zip —— 將處理器產生的所有產物(lamp.stl、可選的 base.stl、可選的 result.json)打包為單一 zip 檔案,並在 model_urls.bundle_zip 下回傳。

回傳值

回應中的 result 屬性包含新建立的燈具建置任務的任務 id。輪詢取得任務 endpoint 或訂閱串流,直到任務達到 SUCCEEDED 狀態,然後從 model_urls 下載產物。

失敗模式

  • Name
    400 - Bad Request
    Description

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

    • 缺少參數:input_task_id 為必填項。
    • UUID 無效:input_task_id 不是有效的 UUID。
    • 父任務未成功:所引用的原型任務尚未達到 SUCCEEDED 狀態。
    • 無模型:原型任務已成功,但未產生 3D 模型。
    • 選項超出範圍:options 中的某個欄位超出了其允許的範圍或列舉集合。
  • Name
    401 - Unauthorized
    Description

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

  • Name
    402 - Payment Required
    Description

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

  • Name
    404 - Not Found
    Description

    所引用的原型任務不存在、屬於其他使用者,或是透過網頁應用建立的(只有 API 模式下的原型任務才能連結到建置任務)。

  • Name
    429 - Too Many Requests
    Description

    你已超出速率限制。

Request

POST
/openapi/creative-lab/lamp/v1/build
# Stage 2: chain build off a succeeded prototype task
curl https://api.meshy.ai/openapi/creative-lab/lamp/v1/build \
  -X POST \
  -H "Authorization: Bearer ${YOUR_API_KEY}" \
  -H 'Content-Type: application/json' \
  -d '{
    "input_task_id": "018a210d-8ba4-705c-b111-1f1776f7f578",
    "options": {
      "diameter_mm": 120,
      "thickness_mm": 2,
      "light_source_preset": "bambu_mh001_60mm",
      "cut_amount_percent": 30
    },
    "output": {
      "format": "stl"
    }
  }'

Response

{
  "result": "019c320e-9a8f-7a1c-9c11-2a1876f8a9bb"
}
建置範例
建置任務會將原型的 3D 模型轉化為可列印的燈罩零件。
Creative Lab 燈具建置模型預覽
建置模型預覽

GET/openapi/creative-lab/lamp/v1/(prototype|build)/:id

取得燈具任務

根據有效的任務 id 取得一個原型(prototype)或建置(build)任務。URL 路徑必須與任務所處的階段相符——透過 /prototype/:id 取得一個建置任務將回傳 404,反之亦然。

回應結構請參閱燈具原型任務物件和燈具建置任務物件。

參數

  • Name
    id
    Type
    path
    Description

    要取得的燈具任務的唯一識別碼。

回傳值

回應中包含燈具任務物件。具體結構取決於所請求的階段。

Request

GET
/openapi/creative-lab/lamp/v1/prototype/018a210d-8ba4-705c-b111-1f1776f7f578
# Prototype
curl https://api.meshy.ai/openapi/creative-lab/lamp/v1/prototype/018a210d-8ba4-705c-b111-1f1776f7f578 \
  -H "Authorization: Bearer ${YOUR_API_KEY}"

# Build
curl https://api.meshy.ai/openapi/creative-lab/lamp/v1/build/019c320e-9a8f-7a1c-9c11-2a1876f8a9bb \
  -H "Authorization: Bearer ${YOUR_API_KEY}"

Prototype Response

{
  "id": "018a210d-8ba4-705c-b111-1f1776f7f578",
  "type": "creative-lab-lamp-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": 30,
  "model_urls": {
    "glb": "https://assets.meshy.ai/***/tasks/018a210d-8ba4-705c-b111-1f1776f7f578/output/model.glb?Expires=***"
  },
  "thumbnail_url": "https://assets.meshy.ai/***/tasks/018a210d-8ba4-705c-b111-1f1776f7f578/output/preview.png?Expires=***",
  "image_urls": [
    "https://assets.meshy.ai/***/concept.png?Expires=***"
  ]
}

Build Response

{
  "id": "019c320e-9a8f-7a1c-9c11-2a1876f8a9bb",
  "type": "creative-lab-lamp-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": 6,
  "model_urls": {
    "lamp_stl": "https://assets.meshy.ai/***/tasks/019c320e-9a8f-7a1c-9c11-2a1876f8a9bb/output/lamp.stl?Expires=***",
    "base_stl": "https://assets.meshy.ai/***/tasks/019c320e-9a8f-7a1c-9c11-2a1876f8a9bb/output/base.stl?Expires=***"
  }
}

DELETE/openapi/creative-lab/lamp/v1/(prototype|build)/:id

刪除燈具任務

取消一個燈具任務。如果任務仍處於 PENDING 狀態,建立時消耗的 積分將被退還。已經處於 IN_PROGRESS 狀態的任務會被取消,但不會退款 (工作行程可能已經在消耗資源)。已經到達終止狀態(SUCCEEDED、FAILED、 CANCELED)的任務無法被取消。

URL 路徑必須與任務所處階段相符 —— 對 /prototype/:buildId 執行 DELETE 會回傳 404。

路徑參數

  • Name
    id
    Type
    path
    Description

    要取消的燈具任務的唯一識別碼。

回傳值

成功時回傳 204 No Content,回應內容為空。

失敗模式

  • Name
    400 - Bad Request
    Description

    任務已處於終止狀態,無法取消。

  • Name
    404 - Not Found
    Description

    該任務不存在、屬於其他使用者,或其所處階段與 URL 路徑不符。

Request

DELETE
/openapi/creative-lab/lamp/v1/prototype/018a210d-8ba4-705c-b111-1f1776f7f578
curl --request DELETE \
  --url https://api.meshy.ai/openapi/creative-lab/lamp/v1/prototype/018a210d-8ba4-705c-b111-1f1776f7f578 \
  -H "Authorization: Bearer ${YOUR_API_KEY}"

Response

// Returns 204 No Content on success (empty body).

GET/openapi/creative-lab/lamp/v1/(prototype|build)/:id/stream

流式取得燈具任務

透過 Server-Sent Events(SSE)以串流方式取得燈具任務的即時更新。 URL 路徑必須與任務所處的階段相符 —— 在 /prototype/:buildId/stream 開啟串流會回傳一則帶有 status_code: 404 的 event: error 負載並關閉該串流。

參數

  • Name
    id
    Type
    path
    Description

    要進行串流取得的燈具任務的唯一識別碼。

返回值

以 Server-Sent Events 的形式回傳一系列 Lamp Prototype 或 Lamp Build 任務物件。每一幀都攜帶該階段的完整任務物件 —— 與 Get endpoint 回傳的形狀相同 —— 因此當任務處於 PENDING 或 IN_PROGRESS 狀態時, 輸出欄位尚未被填入(為 null、[] 或 {}),且 finished_at 為 null。

Request

GET
/openapi/creative-lab/lamp/v1/build/019c320e-9a8f-7a1c-9c11-2a1876f8a9bb/stream
curl -N https://api.meshy.ai/openapi/creative-lab/lamp/v1/build/019c320e-9a8f-7a1c-9c11-2a1876f8a9bb/stream \
-H "Authorization: Bearer ${YOUR_API_KEY}"

Response Stream

// Error event example (wrong stage or task not found)
event: error
data: {
  "status_code": 404,
  "message": "Task not found"
}

// Message event examples illustrate task progress.
// Every frame is the full task object; fields not yet populated are null / empty.
// The PENDING frame below is abbreviated to the fields that change.
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-lamp-build",
  "status": "SUCCEEDED",
  "progress": 100,
  "created_at": 1729123500000,
  "started_at": 1729123510000,
  "finished_at": 1729123535000,
  "expires_at": 1729382735000,
  "task_error": null,
  "consumed_credits": 6,
  "model_urls": {
    "lamp_stl": "https://assets.meshy.ai/***/tasks/019c320e-9a8f-7a1c-9c11-2a1876f8a9bb/output/lamp.stl?Expires=***",
    "base_stl": "https://assets.meshy.ai/***/tasks/019c320e-9a8f-7a1c-9c11-2a1876f8a9bb/output/base.stl?Expires=***"
  }
}

GET/openapi/creative-lab/lamp/v1/(prototype|build)

取得燈具任務清單

取得某一階段下燈具任務的分頁清單。URL 路徑決定所選階段——/prototype 回傳原型階段的任務;/build 回傳構建階段的任務。另一階段的任務不會包含在任一回應中。

路徑參數

  • Name
    stage
    Type
    path
    必選
    Description

    取值為 prototype 或 build。該集合僅回傳階段與 URL 相符的任務—— 取得 /prototype 永遠不會回傳構建任務,反之亦然。

查詢參數

  • Name
    page_num
    Type
    integer
    預設值 1
    Description

    用於分頁的頁碼。

  • Name
    page_size
    Type
    integer
    預設值 10
    Description

    每頁大小限制。最大允許為 100 項。

  • Name
    sort_by
    Type
    string
    預設值 -created_at
    Description

    排序所依據的欄位。可選值:

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

回傳

回傳對應階段任務物件的分頁清單——列出 /prototype 時為 燈具原型任務物件, 列出 /build 時為 燈具構建任務物件。

Request

GET
/openapi/creative-lab/lamp/v1/prototype
# List prototype tasks
curl https://api.meshy.ai/openapi/creative-lab/lamp/v1/prototype?page_size=10 \
  -H "Authorization: Bearer ${YOUR_API_KEY}"

# List build tasks
curl https://api.meshy.ai/openapi/creative-lab/lamp/v1/build?page_size=10 \
  -H "Authorization: Bearer ${YOUR_API_KEY}"

Response (List Prototype Tasks)

[
  {
    "id": "018a210d-8ba4-705c-b111-1f1776f7f578",
    "type": "creative-lab-lamp-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": 30,
    "model_urls": {
      "glb": "https://assets.meshy.ai/***/tasks/018a210d-8ba4-705c-b111-1f1776f7f578/output/model.glb?Expires=***"
    },
    "thumbnail_url": "https://assets.meshy.ai/***/tasks/018a210d-8ba4-705c-b111-1f1776f7f578/output/preview.png?Expires=***",
    "image_urls": [
      "https://assets.meshy.ai/***/concept.png?Expires=***"
    ]
  }
]

燈具原型任務物件

燈具原型任務物件是 Meshy 用於追蹤的一個工作單元,用於根據一張來源照片生成風格化的霧面白色概念圖,並將其轉換為空心的3D 模型。此階段的輸出會透過 input_task_id 連結到建構階段。

屬性

  • Name
    id
    Type
    string
    Description

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

  • Name
    type
    Type
    string
    Description

    任務的類型。該值為 creative-lab-lamp-prototype。

  • Name
    name
    Type
    string
    Description

    建立任務時提供的任務名稱。如果未提供名稱,則為空字串。

  • Name
    status
    Type
    string
    Description

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

  • Name
    progress
    Type
    integer
    Description

    任務的 progress。如果任務尚未開始,該屬性將為 0。任務成功後,該值將變為 100。

  • Name
    created_at
    Type
    timestamp
    Description

    任務建立時的 時間戳,以毫秒為單位。

  • 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

    前置任務的數量。

  • Name
    task_error
    Type
    object
    Description

    失敗任務的錯誤詳情。完整的 task_error 物件參考請參見錯誤。

  • Name
    consumed_credits
    Type
    integer
    Description

    此任務消耗的 積分 數量。當任務狀態為 PENDING、IN_PROGRESS 或 SUCCEEDED 時存在。對於 FAILED 任務回傳 0(失敗時會退還 積分)。

  • Name
    model_urls
    Type
    object
    Description

    根據概念圖生成的 3D 模型的可下載 URL。任務成功後才會出現;在此之前為 {}。

    • Name
      glb
      Type
      string
      Description

      GLB 格式的空心霧面白色燈罩模型的可下載 URL。這是建構階段處理的模型。

  • Name
    thumbnail_url
    Type
    string
    Description

    3D 模型渲染預覽圖的可下載 URL。任務成功之前為空字串。

  • Name
    image_urls
    Type
    array of strings
    Description

    此原型任務生成的概念圖候選圖的可下載 URL。目前 API 始終恰好回傳一個候選圖;該欄位為陣列格式,以便未來版本可以在不產生破壞性變更的情況下提供多個候選圖。

Example Lamp Prototype Task Object

{
  "id": "018a210d-8ba4-705c-b111-1f1776f7f578",
  "type": "creative-lab-lamp-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": 30,
  "model_urls": {
    "glb": "https://assets.meshy.ai/***/tasks/018a210d-8ba4-705c-b111-1f1776f7f578/output/model.glb?Expires=***"
  },
  "thumbnail_url": "https://assets.meshy.ai/***/tasks/018a210d-8ba4-705c-b111-1f1776f7f578/output/preview.png?Expires=***",
  "image_urls": [
    "https://assets.meshy.ai/***/concept.png?Expires=***"
  ]
}

燈具構建任務物件

燈具構建任務物件是 Meshy 用於追蹤工作單元的物件,用於從成功的原型任務生成最終可 3D 列印的燈罩。構建過程會對原型的 3D 模型執行燈具處理器,對其進行挖空、拉平並打開底部,並(在使用固定件預設時)新增底板和固定件安裝座。

屬性

  • Name
    id
    Type
    string
    Description

    任務的唯一識別碼。

  • Name
    type
    Type
    string
    Description

    任務的類型。該值為 creative-lab-lamp-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
    model_urls
    Type
    object
    Description

    生成產物的可下載 URL,以產物名稱為鍵。鍵的集合取決於 output.format 和 options.light_source_preset:

    • Name
      lamp_stl
      Type
      string
      Description

      指向 lamp.stl 的可下載 URL:即帶有固定件孔位底板的開底燈罩,或者當 options.light_source_preset 為 none 時的單個密封燈罩。當 output.format 為 stl(預設值)時存在。

    • Name
      base_stl
      Type
      string
      Description

      指向 base.stl 的可下載 URL,即光源固定件安裝座。當 output.format 為 stl 且 options.light_source_preset 不為 none 時存在。當固定件預設為 none 時省略。

    • Name
      bundle_zip
      Type
      string
      Description

      指向包含處理器生成的所有產物(lamp.stl、選用的 base.stl,以及當 options.include_result_json 為 true 時的 result.json)的壓縮檔的可下載 URL。當 output.format 為 zip 時存在。當 bundle_zip 存在時,lamp_stl / base_stl 將被省略。

Example Lamp Build Task Object

{
  "id": "019c320e-9a8f-7a1c-9c11-2a1876f8a9bb",
  "type": "creative-lab-lamp-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": 6,
  "model_urls": {
    "lamp_stl": "https://assets.meshy.ai/***/tasks/019c320e-9a8f-7a1c-9c11-2a1876f8a9bb/output/lamp.stl?Expires=***",
    "base_stl": "https://assets.meshy.ai/***/tasks/019c320e-9a8f-7a1c-9c11-2a1876f8a9bb/output/base.stl?Expires=***"
  }
}