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

Ernie Image Lora

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

ID โมเดล ernie-image/lora
# 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/ernie-image/lora?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"
  }'

# 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.035 35 เครดิต API เรียกใช้ในหน้านี้

รับคีย์ API
Baidu ข้อความเป็นภาพ เอาต์พุต 4K

การสร้างรูปภาพด้วย Ernie Image ที่รวม LoRA ได้สูงสุด 3 รายการสำหรับสไตล์หรือหัวข้อแบบกำหนดเอง

Baidu · ภาพ

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

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

สร้างคำขอ

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

•จำเป็น

พรอมต์สำหรับการสร้างรูปภาพที่รองรับข้อความภาษาอังกฤษ ภาษาจีน หรือภาษาญี่ปุ่น

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

ขนาดของรูปภาพที่สร้างขึ้น

num_images ค่าเริ่มต้น 1

จำนวนรูปภาพที่จะสร้าง

ขั้นสูง negative_prompt · output_format · acceleration · num_inference_steps · guidance_scale · seed · enable_prompt_expansion · enable_safety_checker · loras
ค่าเริ่มต้น

พรอมต์เชิงลบที่ระบุเนื้อหาที่ต้องตัดออกจากรูปภาพ

output_format ค่าเริ่มต้น jpeg

รูปแบบของรูปภาพที่ได้

acceleration ค่าเริ่มต้น regular

การตั้งค่าการเร่งความเร็วสำหรับการสร้างรูปภาพ

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

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

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

ความเข้มของ classifier-free guidance

Seed ที่ควบคุมความสุ่มเพื่อให้ได้ผลลัพธ์ที่สร้างซ้ำได้

ค่าเริ่มต้น []

LoRA สำหรับการสร้างรูปภาพ ซึ่งจะรวมเป็นการกำหนดค่าร่วมสำหรับรูปภาพสุดท้าย โดยส่งได้ไม่เกิน 3 รายการ

POST /run/ernie-image/lora?wait=20 ใบเสนอราคา → $0.035
# 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/ernie-image/lora?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"
  }'

# 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

เกี่ยวกับ Ernie Image Lora

การแปลงข้อความเป็นรูปภาพด้วยการตั้งค่า Ernie Image มาตรฐาน (ค่าเริ่มต้น 50 ขั้น สูงสุด 100) พร้อมรายการ `loras` ระบุ LoRA ได้สูงสุด 3 รายการเพื่อรวมกันสร้างรูปภาพสุดท้าย พรอมต์ใช้ภาษาอังกฤษ จีน หรือญี่ปุ่นได้ และระบบส่งคืนรูปภาพสูงสุด 4 รูปต่อคำขอ

พารามิเตอร์

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

ชื่อประเภท ค่าเริ่มต้นค่าที่อนุญาต คำอธิบาย
promptจำเป็น
ประเภทstring
พรอมต์สำหรับการสร้างรูปภาพที่รองรับข้อความภาษาอังกฤษ ภาษาจีน หรือภาษาญี่ปุ่น
negative_promptไม่บังคับ
ประเภทstring
ค่าเริ่มต้น
พรอมต์เชิงลบที่ระบุเนื้อหาที่ต้องตัดออกจากรูปภาพ
image_sizeไม่บังคับ
ประเภทobject
ค่าเริ่มต้นsquare_hd
square_hdsquareportrait_4_3portrait_16_9landscape_4_3landscape_16_9square_uhdportrait_3_2landscape_3_2portrait_hdlandscape_hd
ขนาดของรูปภาพที่สร้างขึ้น
num_inference_stepsไม่บังคับ
ประเภทinteger
ค่าเริ่มต้น50
1 – 100
จำนวนขั้นตอนการลดสัญญาณรบกวนที่จะดำเนินการ
guidance_scaleไม่บังคับ
ประเภทnumber
ค่าเริ่มต้น5
1 – 20
ความเข้มของ classifier-free guidance
seedไม่บังคับ
ประเภทinteger | null
Seed ที่ควบคุมความสุ่มเพื่อให้ได้ผลลัพธ์ที่สร้างซ้ำได้
num_imagesไม่บังคับ num_outputs
ประเภทinteger
ค่าเริ่มต้น1
1 – 4
จำนวนรูปภาพที่จะสร้าง
enable_prompt_expansionไม่บังคับ
ประเภทboolean
ค่าเริ่มต้นtrue
ควบคุมการปรับปรุงพรอมต์ด้วย LLM ซึ่งจะเพิ่มรายละเอียดให้ผลลัพธ์เมื่อเปิดใช้
enable_safety_checkerไม่บังคับ
ประเภทboolean
ค่าเริ่มต้นtrue
การตรวจสอบ NSFW สำหรับรูปภาพที่สร้างขึ้น ซึ่งมีเพียงบัญชีที่ได้รับอนุญาตเท่านั้นที่ปิดได้ คำขอที่ไม่มีสิทธิ์ดังกล่าวจะยังต้องผ่านการตรวจสอบ
output_formatไม่บังคับ
ประเภทenum
ค่าเริ่มต้นjpeg
jpegpng
รูปแบบของรูปภาพที่ได้
accelerationไม่บังคับ
ประเภทenum
ค่าเริ่มต้นregular
noneregularhigh
การตั้งค่าการเร่งความเร็วสำหรับการสร้างรูปภาพ
lorasไม่บังคับ
ประเภทobject[]
ค่าเริ่มต้น[]
LoRA สำหรับการสร้างรูปภาพ ซึ่งจะรวมเป็นการกำหนดค่าร่วมสำหรับรูปภาพสุดท้าย โดยส่งได้ไม่เกิน 3 รายการ
loras[].pathจำเป็น
ประเภทstring
ตำแหน่งของน้ำหนัก LoRA ระบุเป็น URL หรือพาธ
loras[].scaleไม่บังคับ
ประเภทnumber
ค่าเริ่มต้น1
0 – 4
ตัวคูณที่ใช้กับน้ำหนัก LoRA ก่อนผสานเข้ากับโมเดลพื้นฐาน
จำเป็น ชื่อมาตรฐาน ซึ่งรองรับเช่นกัน

เอาต์พุต

GET /requests/req_8k2m4q7x1z9c3v5b6n0p2r4t
{
  "id": "req_8k2m4q7x1z9c3v5b6n0p2r4t",
  "object": "request",
  "model": "ernie-image/lora",
  "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": 35,
    "usd": "0.035",
    "charged": 35,
    "refunded": 0
  },
  "input": {
    "prompt": "A red fox trots through fresh snow at sunrise, soft golden light, shallow depth of field"
  },
  "output": {
    "images": [
      {
        "url": "https://content.doitong.com/dev-api/2026/10/20/req_8k2m4q7x1z9c3v5b6n0p2r4t/0-output.jpeg",
        "width": 1024,
        "height": 768,
        "content_type": "image/jpeg"
      }
    ],
    "seed": 42,
    "prompt": "string",
    "timings": {}
  },
  "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 คือออบเจ็กต์ผลลัพธ์ของโมเดลเอง
ฟิลด์ของเอาต์พุต
images
array of object {url, width, height, content_type}ชุดรูปภาพที่สร้างขึ้น
seed
integerseed ที่ใช้ระหว่างการสร้าง
prompt
stringพรอมต์ที่ใช้ระหว่างการสร้างรูปภาพ
timings
objectข้อมูลเวลา

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