ข้ามไปยังเนื้อหา

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.ru/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.ru/v1/requests/REQUEST_ID?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY"

คำขอนี้: $0.04 40 เครดิต API · ≈ ₽4.22 เรียกใช้ในหน้านี้

รับคีย์ API
Bria AI แก้ไขภาพ #stylized#transform#typography

เรนเดอร์ภาพสินค้าลงในกราฟิกแสดงขนาดพร้อมเส้นกำกับการวัด และป้ายชื่อเรื่อง น้ำหนัก และความจุที่ไม่บังคับ

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 ซึ่งส่งคืนทั้งภาพประกอบและโอเวอร์เลย์โปร่งใส

units_display ค่าเริ่มต้น single

รูปแบบการแสดงป้ายกำกับเมื่อระบุหน่วยทั้งในรูปแบบหลักและรอง

หัวข้อเสริมที่แสดงเหนือสินค้า

ค่าเริ่มต้น white

สีที่ระบุเป็นค่า hex หรือเป็น 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.ru/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.ru/v1/requests/REQUEST_ID?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY"

เรียกใช้คำขอนี้

คีย์ของคุณจะอยู่ในเบราว์เซอร์นี้ โดยส่งไปยัง Doitong API เท่านั้น และจะบันทึกใน localStorage ก็ต่อเมื่อคุณเลือกจดจำ รับคีย์ API

เกี่ยวกับ Bria Product Dimensions

รับ `image` ของสินค้าและรายการอย่างน้อยหนึ่งรายการใน `dimensions` จากนั้นวาดเส้นวัดพร้อมป้ายกำกับรอบสินค้า เลือก `style` (ค่าเริ่มต้น แบบเด็ก หรือแบบหรูหรา) `title` ความยาวไม่เกิน 80 อักขระ สีพื้นหลัง และ `output_size` แบบสี่เหลี่ยมจัตุรัสตั้งแต่ 256 ถึง 2200 พิกเซล เอาต์พุตเป็น 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
ขนาดที่จะแสดง ไม่รองรับ length และ depth โดยเจตนา
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 ซึ่งส่งคืนทั้งภาพประกอบและโอเวอร์เลย์โปร่งใส
backgroundไม่บังคับ
ประเภทstring
ค่าเริ่มต้นwhite
สีที่ระบุเป็นค่า hex หรือเป็น 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.ru/v1/requests/req_8k2m4q7x1z9c3v5b6n0p2r4t",
    "cancel": "https://api.doitong.ru/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/th/developers/models/bria/product-dimensions.md. โมเดลและคู่มือทั้งหมด: https://doitong.com/developers/llms.txt