跳至內容

Marigold V2 Depth

整合

模型 id marigold-v2
# Run the model; wait up to 20 s for the finished result in the same call
curl -X POST "https://api.doitong.com/v1/run/marigold-v2?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "image": "https://content.doitong.com/images/showcase/v3/gen_fox_cartoon.jpg"
  }'

# Still "queued" or "running"? Poll with the id from the response:
curl "https://api.doitong.com/v1/requests/REQUEST_ID?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY"

此請求: $0.03 30 API 點數 在此頁面執行

取得 API 金鑰
Open model 圖像編輯 #depth#utility

圖片分析模型,從單張圖片輸出深度、透明深度、法線或反照率圖

Open model · 圖像

您的第一個結果會顯示在這裡

在下方建立請求,並使用您的 API 金鑰執行。輸出會複製到我們的儲存空間,可永久保留或免費保留 7 天。

建立請求

控制項是根據模型結構描述生成的。變更設定時,程式碼和價格會同步更新。

•必填 image_url
拖放檔案,或

輸入圖像的 URL。

image_size

推論尺寸;省略時會使用輸入圖像的尺寸,並將每個尺寸四捨五入至最接近的 16 倍數。指定如 `"square_hd"` 或 `"landscape_4_3"` 的預設值,或提供 `{width, height}` 物件。寬度和高度都必須可被 16 整除,且不得超過 2048 像素;兩者比例必須介於 1:16 至 16:1。

進階 prediction_type · seed · enable_safety_checker
prediction_type 預設 depth

要產生的預測圖類型。

隨機種子;在重複使用相同圖像時可重現輸出。其影響僅限於 VAE 編碼器的潛在取樣,因為前向傳播本身是單一步驟的確定性運算。

POST /run/marigold-v2?wait=20 報價 → $0.03
# Run the model; wait up to 20 s for the finished result in the same call
curl -X POST "https://api.doitong.com/v1/run/marigold-v2?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "image": "https://content.doitong.com/images/showcase/v3/gen_fox_cartoon.jpg"
  }'

# Still "queued" or "running"? Poll with the id from the response:
curl "https://api.doitong.com/v1/requests/REQUEST_ID?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY"

執行此請求

您的金鑰會保留在此瀏覽器中:只會傳送至 Doitong API,且只有在勾選「記住」時才會儲存至 localStorage。 取得 API 金鑰

關於 Marigold V2 Depth

從單張影像估算地圖。`prediction_type` 可選擇深度、透視深度、法線或反照率,詳見說明。結果是 PNG 視覺化圖像,而非數值張量。`image_size` 可使用預設值,或使用寬度/高度物件;數值須為 16 的倍數且最高 2048,`seed` 可讓結果可重現。

參數

請傳送標準名稱或原生名稱其中之一,不要同時傳送兩者。 標準名稱

名稱類型 預設值允許值 說明
prediction_type選填
類型enum
預設值depth
depthsee-through-depthnormalsalbedo
要產生的預測圖類型。
image_url必填 image
類型url · image
輸入圖像的 URL。
image_size選填
類型object
square_hdsquareportrait_4_3portrait_16_9landscape_4_3landscape_16_9
推論尺寸;省略時會使用輸入圖像的尺寸,並將每個尺寸四捨五入至最接近的 16 倍數。指定如 `"square_hd"` 或 `"landscape_4_3"` 的預設值,或提供 `{width, height}` 物件。寬度和高度都必須可被 16 整除,且不得超過 2048 像素;兩者比例必須介於 1:16 至 16:1。
seed選填
類型integer | null
隨機種子;在重複使用相同圖像時可重現輸出。其影響僅限於 VAE 編碼器的潛在取樣,因為前向傳播本身是單一步驟的確定性運算。
enable_safety_checker選填
類型boolean
預設值true
在呼叫端獲得授權的情況下,將此值設為 false 可放寬審核。
必填 標準名稱,也可使用

檔案參數接受公開的 https:// URL、最大 10 MB 的 data: URI,或上傳檔案的 file_url。 檔案

輸出

GET /requests/req_8k2m4q7x1z9c3v5b6n0p2r4t
{
  "id": "req_8k2m4q7x1z9c3v5b6n0p2r4t",
  "object": "request",
  "model": "marigold-v2",
  "status": "succeeded",
  "created_at": "2026-10-20T12:00:00Z",
  "started_at": "2026-10-20T12:00:02Z",
  "completed_at": "2026-10-20T12:00:09Z",
  "queue_position": null,
  "cost": {
    "credits": 30,
    "usd": "0.03",
    "charged": 30,
    "refunded": 0
  },
  "input": {
    "image_url": "https://content.doitong.com/images/showcase/v3/gen_fox_cartoon.jpg"
  },
  "output": {
    "image": {
      "url": "https://content.doitong.com/dev-api/2026/10/20/req_8k2m4q7x1z9c3v5b6n0p2r4t/0-output.jpeg",
      "content_type": "image/jpeg",
      "file_name": "0-output.jpeg",
      "file_size": 1843200,
      "width": 1024,
      "height": 768
    },
    "seed": 42
  },
  "outputs": [
    {
      "type": "image",
      "url": "https://content.doitong.com/dev-api/2026/10/20/req_8k2m4q7x1z9c3v5b6n0p2r4t/0-output.jpeg",
      "content_type": "image/jpeg",
      "file_size": 1843200,
      "width": 1024,
      "height": 768,
      "stored": true
    }
  ],
  "error": null,
  "metrics": {
    "inference_seconds": 6.8
  },
  "urls": {
    "self": "https://api.doitong.com/v1/requests/req_8k2m4q7x1z9c3v5b6n0p2r4t",
    "cancel": "https://api.doitong.com/v1/requests/req_8k2m4q7x1z9c3v5b6n0p2r4t/cancel"
  }
}
您的檔案,由您選擇每個 outputs[].url 都是儲存空間中的副本:可永久保留(按 GB-月計費),或免費保留 7 天;可透過帳戶設定或 ?storage= 設定。
所有模型使用相同結構圖片、影片和音訊皆包含 type、url、content_type、width、height 和 duration。output 是模型自己的結果物件。
輸出欄位
image
object {url, content_type, file_name, file_size, width, height}以 PNG 呈現的預測結果供檢視;回應不會透過此圖像提供無損的數值張量。
seed
integer在 VAE 編碼器中取樣潛在表示時使用的種子。

給 AI 代理程式:此頁面的 Markdown 位於 https://doitong.com/zh-TW/developers/models/marigold-v2.md. 所有模型與指南: https://doitong.com/developers/llms.txt