跳至內容

Bria Product Dimensions

整合

模型 id bria/product-dimensions
# 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/bria/product-dimensions?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "image": "example",
    "dimensions": [
      {
        "name": "height",
        "position": "left",
        "unit": "cm",
        "value": 22
      },
      {
        "name": "width_bottom",
        "position": "bottom",
        "unit": "cm",
        "value": 7
      }
    ],
    "style": "default"
  }'

# 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.04 40 API 點數 在此頁面執行

取得 API 金鑰
Bria AI · 圖像

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

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

建立請求

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

style •必填

用於呈現的樣式。

•必填

產品圖像輸入,可透過連結至公開存取的圖像,或將原始位元組編碼為 base64 提供。

•必填

要繪製的尺寸標註;至少需要一個項目。

進階 title_position · output_format · units_display · title · background · output_size · proportional_lines · sync · weight · capacity
title_position 預設 top_center

標題在頂部橫向的位置。

output_format 預設 png

呈現的輸出選項:png、jpeg 或 dual;dual 會同時回傳合成圖與透明疊加層。

units_display 預設 single

同時提供主要與次要單位時的標籤顯示樣式。

可選的標題,顯示於產品上方。

預設 white

以十六進位值或 white、cream、charcoal 指定的顏色。

預設 2200

正方形輸出的每一邊長度(像素)。

可選的徽章,在產品下方顯示重量。

可選的徽章,在產品下方顯示容量。

POST /run/bria/product-dimensions?wait=20 報價 → $0.04
# 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/bria/product-dimensions?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "image": "example",
    "dimensions": [
      {
        "name": "height",
        "position": "left",
        "unit": "cm",
        "value": 22
      },
      {
        "name": "width_bottom",
        "position": "bottom",
        "unit": "cm",
        "value": 7
      }
    ],
    "style": "default"
  }'

# 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 金鑰

關於 Bria Product Dimensions

接收產品 `image` 及 `dimensions` 中至少一個項目,接著在產品周圍繪製帶標籤的測量線。可選擇 `style`(預設、童趣或優雅)、最多 80 個字元的 `title`、背景色,以及 256 至 2200 像素的正方形 `output_size`。輸出可以是 png、jpeg,或包含透明覆蓋層的雙重合成圖。

參數

名稱類型 預設值允許值 說明
title_position選填
類型enum
預設值top_center
top_lefttop_centertop_right
標題在頂部橫向的位置。
proportional_lines選填
類型boolean
預設值true
使尺寸線長度與其測量值成比例。
sync選填
類型boolean
預設值false
生成圖像的傳送模式:true 會嵌入 base64 資料,而不使用 CDN 連結。
image必填
類型string
產品圖像輸入,可透過連結至公開存取的圖像,或將原始位元組編碼為 base64 提供。
dimensions必填
類型object[]
要繪製的尺寸標註;至少需要一個項目。
dimensions[].name必填
類型enum
heightwidth_bottomwidth_top
要顯示的尺寸;刻意不提供長度與深度。
dimensions[].value必填
類型number
> 0
實際測量值。
dimensions[].unit必填
類型enum
mmcmmin"ft'
實際測量使用的單位。
dimensions[].position選填
類型enum
topbottomleftright
標註顯示的側邊。省略時,尺寸名稱會決定預設值。
style必填
類型enum
defaultchildlikeelegant
用於呈現的樣式。
title選填
類型string | null
≤ 80 個字元
可選的標題,顯示於產品上方。
output_size選填
類型integer
預設值2200
256 – 2,200
正方形輸出的每一邊長度(像素)。
output_format選填
類型enum
預設值png
pngjpegdual
呈現的輸出選項:png、jpeg 或 dual;dual 會同時回傳合成圖與透明疊加層。
background選填
類型string
預設值white
以十六進位值或 white、cream、charcoal 指定的顏色。
units_display選填
類型enum
預設值single
singledual_bulletdual_slashdual_parens
同時提供主要與次要單位時的標籤顯示樣式。
weight選填
類型object
可選的徽章,在產品下方顯示重量。
weight.value必填
類型number
> 0
weight.unit必填
類型enum
lbozgkg
weight.label選填
類型enum
預設值Weight
WeightNet Weight
capacity選填
類型object
可選的徽章,在產品下方顯示容量。
capacity.value必填
類型number
> 0
capacity.unit必填
類型enum
fl_ozmllqtgalcups
必填

輸出

GET /requests/req_8k2m4q7x1z9c3v5b6n0p2r4t
{
  "id": "req_8k2m4q7x1z9c3v5b6n0p2r4t",
  "object": "request",
  "model": "bria/product-dimensions",
  "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": 40,
    "usd": "0.04",
    "charged": 40,
    "refunded": 0
  },
  "input": {
    "image": "example",
    "dimensions": [
      {
        "name": "height",
        "position": "left",
        "unit": "cm",
        "value": 22
      },
      {
        "name": "width_bottom",
        "position": "bottom",
        "unit": "cm",
        "value": 7
      }
    ],
    "style": "default"
  },
  "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
    },
    "transparent_overlay": {
      "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
    }
  },
  "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}顯示產品尺寸的呈現圖像。
transparent_overlay
object {url, content_type, file_name, file_size, width, height} | null透明疊加層,僅在 output_format 設為 dual 時包含。

更多模型:圖像編輯

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