อินพุตสคีมาจริง
ลงชื่อเข้าใช้เพื่อเรียกใช้โมเดลนี้ด้วยคีย์ API ของคุณเอง ลงชื่อเข้าใช้ →
gemini-3.1-flash-lite-image
ลงชื่อเข้าใช้เพื่อเรียกใช้โมเดลนี้ด้วยคีย์ API ของคุณเอง ลงชื่อเข้าใช้ →
Run the form on the left. Results, polling status and cURL appear under the form.
This model is priced by the usage dimensions listed here. เปรียบเทียบราคาทั้งหมด.
List prices in USD. Your effective price also depends on the billing group attached to your API key.
gemini-3.1-flash-lite-imagegemini-3.1-flash-lite-imagegemini-3.1-flash-lite-image/v1beta/models/gemini-3.1-flash-lite-image:generateContentconst BASE_URL = "https://api.dreamtoai.com";
const API_KEY = process.env.MIX_API_KEY;
const headers = {
"Authorization": `Bearer ${API_KEY}`,
"Content-Type": "application/json",
};
const payload = {
"model": "gemini-3.1-flash-lite-image",
"input": {
"prompt": "生成一张产品海报,白色背景,商业摄影风格",
"image_url": "https://example.com/input.png",
"reference_image_urls": [
"https://example.com/reference.png"
],
"reference_images": [
"https://example.com/reference.png"
],
"mask": "https://example.com/mask.png",
"size": "2752x1536",
"quality": "medium",
"output_format": "png",
"response_format": "url",
"background": "auto",
"n": 1,
"user": "user-123",
"style": "Describe the output you want",
"aspect_ratio": "1:1、3:2、2:3、3:4、4:3、4:5、5:4、9:16、16:9"
}
};
const submit = await fetch(`${BASE_URL}/v1/jobs`, {
method: "POST",
headers,
body: JSON.stringify(payload),
}).then((r) => r.json());
const status = await fetch(`${BASE_URL}/v1/jobs/${submit.id}`, { headers })
.then((r) => r.json());
console.log(status);
Create a key in Console → API Keys and replace the placeholder in the sample.
README
gemini-3.1-flash-lite-image
| พารามิเตอร์ | จำเป็น | คำอธิบาย |
|---|---|---|
promptstring | จำเป็น | คำอธิบายข้อความของสิ่งที่ต้องการสร้าง |
image_urlimage | ไม่บังคับ | ภาพอ้างอิงเพื่อกำหนดทิศทางผลลัพธ์ |
reference_image_urlsarray | ไม่บังคับ | ภาพอ้างอิงหลายภาพเพื่อกำหนดทิศทางผลลัพธ์ |
reference_imagesarray | ไม่บังคับ | 参考图 |
maskimage | ไม่บังคับ | 遮罩图 |
sizestring | ไม่บังคับ | ขนาดภาพผลลัพธ์ |
qualityenum | ไม่บังคับ | ระดับคุณภาพของผลลัพธ์ ตัวเลือก: auto, low, medium, high. ค่าเริ่มต้น: auto. |
output_formatenum | ไม่บังคับ | 输出格式 ตัวเลือก: png, jpeg, webp. |
response_formatenum | ไม่บังคับ | รูปแบบผลลัพธ์ที่ส่งกลับ เช่น URL หรือข้อมูล base64 ตัวเลือก: base64, url. |
backgroundenum | ไม่บังคับ | 背景 ตัวเลือก: auto, transparent, opaque. |
ninteger | ไม่บังคับ | จำนวนผลลัพธ์ที่จะสร้าง |
userstring | ไม่บังคับ | 终端用户标识 |
stylestring | ไม่บังคับ | 风格 |
aspect_ratiostring | ไม่บังคับ | อัตราส่วนภาพของผลลัพธ์ ค่าเริ่มต้น: 1:1. |
โมเดลอ่านพรอมต์เหมือนบรีฟงานสร้างสรรค์ ระบุวัตถุก่อน แล้วค่อยเพิ่มรายละเอียดที่สำคัญ
ใครหรืออะไรอยู่ในภาพ และกำลังทำอะไร
ภาพถ่าย เรนเดอร์ 3D สีน้ำ หรือภาพประกอบแบบแบน หากต้องการลุคภาพถ่าย ให้ระบุเลนส์หรือฟิล์ม
การจัดเฟรมและมุมมอง: โคลสอัป ไวด์ช็อต มุมสูง กึ่งกลาง กฎสามส่วน
แสงยามเย็น แสงสตูดิโอนุ่ม นีออน โทนพาสเทล คอนทราสต์สูง
ใส่คำที่ต้องการไว้ในเครื่องหมายคำพูดและบอกตำแหน่ง
โปสเตอร์ที่มีพาดหัว "OPEN LATE" ตัวหนาสีขาวด้านบน
| พรอมต์ | |
|---|---|
| อ่อน | ร้านกาแฟ |
| ดี | ร้านกาแฟหัวมุมบรรยากาศอบอุ่นในค่ำคืนฝนตก มองผ่านกระจกหน้าร้าน แสงทังสเตนอุ่นภายใน บาริสต้ากำลังเทลาเต้อาร์ต ไอน้ำเกาะกระจก เงาสะท้อนถนน ภาพถ่าย 35mm ระยะชัดตื้น โทนสีเทียลและแอมเบอร์หม่น |
| รายการคิดเงิน | ราคา | ราคาทางการ |
|---|---|---|
| prompt_tokens | $0.10 ต่อ 1 ล้าน | |
| completion_tokens | $12.00 ต่อ 1 ล้าน | |
| thoughts_tokens | $0.60 ต่อ 1 ล้าน |
ถูกกว่าราคาทางการ 60%
ตัวอย่าง: คำขอที่มีอินพุต 10,000 โทเค็นและเอาต์พุต 1,000 โทเค็นมีค่าใช้จ่ายราว $0.01
List prices in USD. Your effective price also depends on the billing group attached to your API key. เปรียบเทียบราคาทั้งหมด
gemini-3-1-flash-imagenano-banana-2nano-banana-proveo-3-1ดูโมเดลภาพทั้งหมดเรียกดู API Market
gemini-3.1-flash-lite-image
ส่ง POST /v1beta/models/gemini-3.1-flash-lite-image:generateContent พร้อม ID โมเดล gemini-3.1-flash-lite-image และ API คีย์ของคุณ ตัวอย่างพร้อมรันอยู่ในส่วน API ด้านบน
Requests are billed at the prices listed above and charged to your wallet. Final cost depends on usage and the billing group attached to your API key.
Create one in Console → API Keys. The same key works for every model on the gateway.
ได้ คุณนำสิ่งที่สร้างไปใช้ในโปรเจกต์เชิงพาณิชย์ได้ ภายใต้ข้อกำหนดของผู้ให้บริการโมเดล
gemini-3.1-flash-lite-image