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

Bernini-R Edit Image

ผสานการทำงาน

ID โมเดล bernini-r/edit-image
# 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/bernini-r/edit-image?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "A red fox trots through fresh snow at sunrise, soft golden light, shallow depth of field",
    "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 แก้ไขภาพ #edit#image#transform

แก้ไขรูปภาพจากคำสั่งภาษาธรรมชาติโดยคงองค์ประกอบเดิมไว้

Open model · ภาพ

ผลลัพธ์แรกของคุณจะแสดงที่นี่

สร้างคำขอด้านล่างและเรียกใช้ด้วยคีย์ API ของคุณ เอาต์พุตจะถูกคัดลอกไปยังพื้นที่จัดเก็บของเรา และเก็บไว้ตลอดไปหรือฟรี 7 วัน

สร้างคำขอ

ตัวควบคุมสร้างจากสคีมาของโมเดล โค้ดและราคาจะอัปเดตเมื่อคุณเปลี่ยนค่า

•จำเป็น

ข้อความที่อธิบายพรอมต์หรือการแก้ไขที่ร้องขอ

•จำเป็น image_url
วางไฟล์ หรือ

รูปภาพที่ระบุเป็นแหล่งสำหรับการแก้ไข

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

การตั้งค่าพิกเซลของด้านที่ยาวกว่า: การแก้ไขจะใช้เป็นขีดจำกัดขนาดของสื่อต้นฉบับ/อ้างอิง ส่วนการสร้างจะใช้เพื่อกำหนดขนาดเอาต์พุต

ขั้นสูง negative_prompt · num_inference_steps · seed · enable_prompt_expansion · enable_safety_checker

พรอมต์เชิงลบ โดยจะใช้พรอมต์เชิงลบมาตรฐานของ Wan2.2 หากไม่ระบุ

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

จำนวนขั้นตอนการลดสัญญาณรบกวนที่จะดำเนินการ

seed ที่ช่วยให้ได้ผลลัพธ์ที่ทำซ้ำได้ หากไม่ระบุจะสุ่มเลือก

POST /run/bernini-r/edit-image?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/bernini-r/edit-image?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "A red fox trots through fresh snow at sunrise, soft golden light, shallow depth of field",
    "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

เกี่ยวกับ Bernini-R Edit Image

ระบุ `image_url` และคำสั่งใน `prompt` เช่น การเปลี่ยนสภาพอากาศ วัสดุ หรือสไตล์ `negative_prompt` เป็นตัวเลือกที่ไม่บังคับใช้ `num_inference_steps` อยู่ในช่วง 1 ถึง 50 และ `max_image_size` กำหนดขอบด้านยาวตั้งแต่ 256 ถึง 1280 px `enable_prompt_expansion` จะเขียนพรอมต์ใหม่ด้วย LLM และส่งคืนเป็น `actual_prompt`

พารามิเตอร์

ส่งชื่อมาตรฐานหรือชื่อดั้งเดิมอย่างใดอย่างหนึ่งเท่านั้น ห้ามส่งทั้งสองชื่อ ชื่อมาตรฐาน

ชื่อประเภท ค่าเริ่มต้นค่าที่อนุญาต คำอธิบาย
promptจำเป็น
ประเภทstring
ข้อความที่อธิบายพรอมต์หรือการแก้ไขที่ร้องขอ
negative_promptไม่บังคับ
ประเภทstring | null
พรอมต์เชิงลบ โดยจะใช้พรอมต์เชิงลบมาตรฐานของ Wan2.2 หากไม่ระบุ
num_inference_stepsไม่บังคับ
ประเภทinteger
ค่าเริ่มต้น30
1 – 50
จำนวนขั้นตอนการลดสัญญาณรบกวนที่จะดำเนินการ
max_image_sizeไม่บังคับ
ประเภทinteger
ค่าเริ่มต้น848
256 – 1,280
การตั้งค่าพิกเซลของด้านที่ยาวกว่า: การแก้ไขจะใช้เป็นขีดจำกัดขนาดของสื่อต้นฉบับ/อ้างอิง ส่วนการสร้างจะใช้เพื่อกำหนดขนาดเอาต์พุต
seedไม่บังคับ
ประเภทinteger | null
seed ที่ช่วยให้ได้ผลลัพธ์ที่ทำซ้ำได้ หากไม่ระบุจะสุ่มเลือก
enable_prompt_expansionไม่บังคับ
ประเภทboolean
ค่าเริ่มต้นfalse
การเขียนพรอมต์ใหม่โดย LLM ก่อนการสร้าง ซึ่งเป็นตัวเลือกเสริมและปิดใช้งานตามค่าเริ่มต้น แม้โมเดลจะได้รับการปรับแต่งด้วยพรอมต์ที่ปรับปรุงแล้ว
image_urlจำเป็น image
ประเภทurl · image
รูปภาพที่ระบุเป็นแหล่งสำหรับการแก้ไข
enable_safety_checkerไม่บังคับ
ประเภทboolean
ค่าเริ่มต้นtrue
สามารถผ่อนปรนการคัดกรองได้โดยตั้งค่าเป็น false หากผู้เรียกมีสิทธิ์
จำเป็น ชื่อมาตรฐาน ซึ่งรองรับเช่นกัน

พารามิเตอร์ไฟล์รับ URL https:// สาธารณะ, data: URI ขนาดไม่เกิน 10 MB หรือ file_url ของไฟล์ที่อัปโหลด ไฟล์

เอาต์พุต

GET /requests/req_8k2m4q7x1z9c3v5b6n0p2r4t
{
  "id": "req_8k2m4q7x1z9c3v5b6n0p2r4t",
  "object": "request",
  "model": "bernini-r/edit-image",
  "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": {
    "prompt": "A red fox trots through fresh snow at sunrise, soft golden light, shallow depth of field",
    "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,
    "actual_prompt": "string"
  },
  "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}รูปภาพที่ได้จากการสร้างหรือการแก้ไข
seed
integerseed ที่ใช้ระหว่างการสร้าง
actual_prompt
string | nullพรอมต์ที่ขยายแล้วฉบับสุดท้าย ซึ่งจะมีค่าเฉพาะเมื่อมีการขยายพรอมต์

โมเดลเพิ่มเติม: แก้ไขภาพ

สำหรับเอเจนต์ AI: หน้า Markdown นี้อยู่ที่ https://doitong.com/th/developers/models/bernini-r/edit-image.md. โมเดลและคู่มือทั้งหมด: https://doitong.com/developers/llms.txt