
ไม่พบรายการที่ตรงกัน ลอง “วิดีโอ”, “FLUX” หรือ “webhooks”
กำลังโหลดโมเดล…
nano-banana-2/edit
# 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/nano-banana-2/edit?wait=20" \
-H "Authorization: Bearer $DOITONG_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"prompt": "Turn this photo into a 1:7 scale collectible figurine of the dog on a round clear acrylic base, standing on a tidy wooden desk with soft studio light; keep the dog'\''s pose, fur colors and expression.",
"images": [
"https://content.doitong.com/dev-api/2026/10/21/req_3yckkmcr3dayonfhigdeaiia/0-pz7p4ydjvjJmL__s7lK6p_L0WSl1GK.png"
],
"resolution": "1K"
}'
# 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"
const API = "https://api.doitong.com/v1";
const headers = {
"Authorization": "Bearer " + process.env.DOITONG_API_KEY,
"Content-Type": "application/json",
};
// Run the model; wait up to 20 s for the finished result in the same call
let res = await fetch(API + "/run/nano-banana-2/edit?wait=20", {
method: "POST",
headers,
body: JSON.stringify({
"prompt": "Turn this photo into a 1:7 scale collectible figurine of the dog on a round clear acrylic base, standing on a tidy wooden desk with soft studio light; keep the dog's pose, fur colors and expression.",
"images": [
"https://content.doitong.com/dev-api/2026/10/21/req_3yckkmcr3dayonfhigdeaiia/0-pz7p4ydjvjJmL__s7lK6p_L0WSl1GK.png"
],
"resolution": "1K"
}),
});
let request = await res.json();
if (!res.ok) throw new Error(request.error.code + ": " + request.error.message);
// Not finished yet: long-poll until it is
while (request.status === "queued" || request.status === "running") {
res = await fetch(API + "/requests/" + request.id + "?wait=20", { headers });
request = await res.json();
}
if (request.status !== "succeeded") throw new Error(JSON.stringify(request.error));
console.log(request.outputs.map((o) => o.url), request.cost.credits + " API credits ($" + request.cost.usd + ")");
import os
import requests
API = "https://api.doitong.com/v1"
headers = {"Authorization": "Bearer " + os.environ["DOITONG_API_KEY"]}
payload = {
"prompt": "Turn this photo into a 1:7 scale collectible figurine of the dog on a round clear acrylic base, standing on a tidy wooden desk with soft studio light; keep the dog's pose, fur colors and expression.",
"images": [
"https://content.doitong.com/dev-api/2026/10/21/req_3yckkmcr3dayonfhigdeaiia/0-pz7p4ydjvjJmL__s7lK6p_L0WSl1GK.png",
],
"resolution": "1K",
}
# Run the model; wait up to 20 s for the finished result in the same call
r = requests.post(API + "/run/nano-banana-2/edit", params={"wait": 20}, json=payload, headers=headers)
request = r.json()
if not r.ok:
raise RuntimeError(request["error"]["code"] + ": " + request["error"]["message"])
# Not finished yet: long-poll until it is
while request["status"] in ("queued", "running"):
request = requests.get(API + "/requests/" + request["id"], params={"wait": 20}, headers=headers).json()
if request["status"] != "succeeded":
raise RuntimeError(request["error"])
print([o["url"] for o in request["outputs"]], request["cost"]["credits"], "API credits", "$" + request["cost"]["usd"])
# 1. Connect once (Claude Code; Cursor, VS Code, Claude Desktop: https://doitong.com/th/developers/docs/mcp)
claude mcp add --transport http doitong-models https://api.doitong.com/v1/mcp \
--header "Authorization: Bearer $DOITONG_API_KEY"
# 2. Your agent calls the "run" tool with:
{
"model_id": "nano-banana-2/edit",
"input": {
"prompt": "Turn this photo into a 1:7 scale collectible figurine of the dog on a round clear acrylic base, standing on a tidy wooden desk with soft studio light; keep the dog's pose, fur colors and expression.",
"images": [
"https://content.doitong.com/dev-api/2026/10/21/req_3yckkmcr3dayonfhigdeaiia/0-pz7p4ydjvjJmL__s7lK6p_L0WSl1GK.png"
],
"resolution": "1K"
}
}
เรียกใช้โมเดล Nano Banana 2 Edit (nano-banana-2/edit) ผ่าน Doitong API เอกสารสำหรับเอเจนต์: https://doitong.com/th/developers/models/nano-banana-2/edit.md
POST https://api.doitong.com/v1/run/nano-banana-2/edit?wait=20
Authorization: Bearer $DOITONG_API_KEY
Content-Type: application/json
{
"prompt": "Turn this photo into a 1:7 scale collectible figurine of the dog on a round clear acrylic base, standing on a tidy wooden desk with soft studio light; keep the dog's pose, fur colors and expression.",
"images": [
"https://content.doitong.com/dev-api/2026/10/21/req_3yckkmcr3dayonfhigdeaiia/0-pz7p4ydjvjJmL__s7lK6p_L0WSl1GK.png"
],
"resolution": "1K"
}
หากสถานะการตอบกลับเป็น "queued" หรือ "running" ให้ส่งคำขอแบบสำรวจ GET https://api.doitong.com/v1/requests/REQUEST_ID?wait=20 จนกว่าจะเป็น "succeeded" ไฟล์อยู่ใน outputs[].url การส่ง POST https://api.doitong.com/v1/quote/nano-banana-2/edit ด้วยบอดี้เดียวกันจะแสดงราคาที่แน่นอนก่อนเรียกใช้
คำขอนี้: $0.08 80 เครดิต API เรียกใช้ในหน้านี้
คีย์ API ใหม่ของคุณ คีย์นี้จะแสดงเฉพาะตอนนี้ และมีอยู่ในโค้ดและช่องคีย์ API ด้านล่างแล้ว เก็บเป็นความลับ: อย่าใส่คีย์นี้ไว้ในโค้ดที่ทำงานบนเบราว์เซอร์
ตัวควบคุมสร้างจากสคีมาของโมเดล โค้ดและราคาจะอัปเดตเมื่อคุณเปลี่ยนค่า
/run/nano-banana-2/edit?wait=20
ใบเสนอราคา → $0.08
# 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/nano-banana-2/edit?wait=20" \
-H "Authorization: Bearer $DOITONG_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"prompt": "Turn this photo into a 1:7 scale collectible figurine of the dog on a round clear acrylic base, standing on a tidy wooden desk with soft studio light; keep the dog'\''s pose, fur colors and expression.",
"images": [
"https://content.doitong.com/dev-api/2026/10/21/req_3yckkmcr3dayonfhigdeaiia/0-pz7p4ydjvjJmL__s7lK6p_L0WSl1GK.png"
],
"resolution": "1K"
}'
# 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"
const API = "https://api.doitong.com/v1";
const headers = {
"Authorization": "Bearer " + process.env.DOITONG_API_KEY,
"Content-Type": "application/json",
};
// Run the model; wait up to 20 s for the finished result in the same call
let res = await fetch(API + "/run/nano-banana-2/edit?wait=20", {
method: "POST",
headers,
body: JSON.stringify({
"prompt": "Turn this photo into a 1:7 scale collectible figurine of the dog on a round clear acrylic base, standing on a tidy wooden desk with soft studio light; keep the dog's pose, fur colors and expression.",
"images": [
"https://content.doitong.com/dev-api/2026/10/21/req_3yckkmcr3dayonfhigdeaiia/0-pz7p4ydjvjJmL__s7lK6p_L0WSl1GK.png"
],
"resolution": "1K"
}),
});
let request = await res.json();
if (!res.ok) throw new Error(request.error.code + ": " + request.error.message);
// Not finished yet: long-poll until it is
while (request.status === "queued" || request.status === "running") {
res = await fetch(API + "/requests/" + request.id + "?wait=20", { headers });
request = await res.json();
}
if (request.status !== "succeeded") throw new Error(JSON.stringify(request.error));
console.log(request.outputs.map((o) => o.url), request.cost.credits + " API credits ($" + request.cost.usd + ")");
import os
import requests
API = "https://api.doitong.com/v1"
headers = {"Authorization": "Bearer " + os.environ["DOITONG_API_KEY"]}
payload = {
"prompt": "Turn this photo into a 1:7 scale collectible figurine of the dog on a round clear acrylic base, standing on a tidy wooden desk with soft studio light; keep the dog's pose, fur colors and expression.",
"images": [
"https://content.doitong.com/dev-api/2026/10/21/req_3yckkmcr3dayonfhigdeaiia/0-pz7p4ydjvjJmL__s7lK6p_L0WSl1GK.png",
],
"resolution": "1K",
}
# Run the model; wait up to 20 s for the finished result in the same call
r = requests.post(API + "/run/nano-banana-2/edit", params={"wait": 20}, json=payload, headers=headers)
request = r.json()
if not r.ok:
raise RuntimeError(request["error"]["code"] + ": " + request["error"]["message"])
# Not finished yet: long-poll until it is
while request["status"] in ("queued", "running"):
request = requests.get(API + "/requests/" + request["id"], params={"wait": 20}, headers=headers).json()
if request["status"] != "succeeded":
raise RuntimeError(request["error"])
print([o["url"] for o in request["outputs"]], request["cost"]["credits"], "API credits", "$" + request["cost"]["usd"])
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "run",
"arguments": {
"model_id": "nano-banana-2/edit",
"input": {
"prompt": "Turn this photo into a 1:7 scale collectible figurine of the dog on a round clear acrylic base, standing on a tidy wooden desk with soft studio light; keep the dog's pose, fur colors and expression.",
"images": [
"https://content.doitong.com/dev-api/2026/10/21/req_3yckkmcr3dayonfhigdeaiia/0-pz7p4ydjvjJmL__s7lK6p_L0WSl1GK.png"
],
"resolution": "1K"
},
"wait_seconds": 20
}
}
}
คีย์ของคุณจะอยู่ในเบราว์เซอร์นี้ โดยส่งไปยัง Doitong API เท่านั้น และจะบันทึกใน localStorage ก็ต่อเมื่อคุณเลือกจดจำ รับคีย์ API
ผลงานสาธารณะที่สร้างด้วย Nano Banana 2 โดยชุมชน Doitong นำพรอมต์กลับมาใช้ได้ในคลิกเดียว
Art style: Cinematic Realistic. Крупный план Джулса, который с философским видом накалывает кусок блина на вилку. Он смотрит на Винни с легким снисхождением. Винни на заднем плане выглядит взбешенным, его лицо искажено от злости. ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ FINAL STYLE ENFORCEMENT...
Art style: 3D Pixar. Мальчик раскрывает упаковку и находит внутри красивую книгу с историями о приключениях. Мама сидит рядом и улыбается. Мягкий свет, радость и уют. ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ FINAL STYLE ENFORCEMENT (this is the authoritative rendering directive — it overrides any...
Art style: 3D Pixar. Стойка ресепшн в дорогом отеле. Соня в униформе натянуто улыбается раздраженному гостю. Рядом стоит ее коллега с сочувствующим видом. Стиль Pixar, обстановка строгая и деловая, освещение холодное. ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ FINAL STYLE ENFORCEMENT (this is the...
Art style: 3D Pixar. Взрослый персонаж опускается на одно колено перед ребенком в центре загроможденной комнаты. Она мягко касается плеча девочки, глядя ей прямо в глаза с доброй улыбкой. Вокруг них разбросаны плюшевые медведи и детали конструктора. Камера на уровне глаз персонажей, создавая...
Art style: 3D stylized animation. Девушка со светлыми волосами в черном платье стоит у красной ковровой дорожки. Ее глаза широко раскрыты от удивления, рот слегка приоткрыт. Теплое освещение падает на ее лицо. ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ FINAL STYLE ENFORCEMENT (this is the...
Art style: 3D Pixar, cinematic lighting, glossy materials. Оникс и Жемчужина с маленькой белой собачкой на поводке стоят на улице перед очень богатым, современным особняком с большими окнами. Вечернее освещение, теплый свет из окон дома. 3D Pixar стиль, высокая детализация....
Art style: 3D Pixar. A cinematic close-up of a 3-year-old boy named Maxim looking guilty and clutching his stomach, large expressive eyes filled with regret, soft warm indoor lighting with a shallow depth of field. ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ FINAL STYLE ENFORCEMENT (this is the...
Art style: 3D Pixar cinematic. In the same chocolate hallway, Kai, the mango boy from the poster, walks past Luna. He suddenly stops in his tracks and looks at her, completely amazed. Soft cinematic lighting, 3D Pixar style. Он с ее не сводит глаз. ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ FINAL...
Art style: 3D Pixar. The romantic scene culminates in a kiss. As their lips touch, a bright golden orb of light transfers from the man's chest into Akari. His eyes, once full of love, become vacant and dull. ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ FINAL STYLE ENFORCEMENT (this is the authoritative...
Art style: 3D animated cinematic style. A young boy in a navy school blazer and tie standing confidently in the dining room. He points his finger forward with a determined, defiant expression on his metallic face. The background is a blurred, elegant room with warm lighting. Navy blue, silver,...
Art style: 3D Pixar. Тесная, темная комната типичного геймера, заставленная техникой. На столе стоят два монитора, светящиеся яркими цветами запущенной игры. Повсюду видны провода, банки из-под газировки и коробки от пиццы. Камера расположена под низким углом, создавая ощущение погружения в...
Art style: Ghibli-inspired Watercolor. Glass leaf cling, outside rain ease, inside cozy. Foreground: leaf edge. Midground: slide path. Background: calm green. Cool to warm. Fading tenacity. Medium eye. Textures: vein press. Depth trail. Rain light. Micro-details: quiver micro. (132 words)...
Art style: 3D Pixar. Уютная гостиная с мягкими диванами и вышитыми подушками. Марьям сидит на полу у ног матери, положив голову ей на колени. Мама нежно гладит ее по волосам. Освещение мягкое, рассеянное, создающее атмосферу близости. Цвета: терракотовый, оливковый и золотистый. Крупный план лиц....
Art style: 3D Pixar. Стерильный медицинский кабинет с современным аппаратом УЗИ. Пациентка спокойно лежит на кушетке, Нутриэль проводит обследование датчиком в области живота. На экране монитора видны четкие анатомические структуры. Освещение прохладное, с мягким голубоватым свечением от экрана...
Art style: Cinematic Realistic. Экстремально крупный план лица Халифа. В центре внимания — его радостные глаза и пухлые щеки. Он задорно улыбается, обнажая первые зубки. Свет падает сбоку, создавая мягкие тени и подчеркивая текстуру нежной кожи. На заднем плане едва угадываются контуры золотых...
Art style: 3D Pixar. Мама обнимает мальчика в гостиной. Мальчик улыбается, мама смотрит на него с нежностью и гордостью. На фоне тёплый домашний интерьер. ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ FINAL STYLE ENFORCEMENT (this is the authoritative rendering directive — it overrides any style wording...
โหมดแก้ไขของ Nano Banana 2: ส่งภาพพร้อมอธิบายการเปลี่ยนแปลง หรือไม่ต้องส่งภาพแล้วระบุวิดีโอ ไฟล์เสียง หรือ PDF (แต่ละรายการไม่เกิน 15 MB) เพื่อใช้เป็นบริบทในการสร้างภาพ เอาต์พุตตั้งแต่ 0.5K ถึง 4K พร้อมอัตราส่วนภาพ ตั้งแต่ 1:8 ถึง 8:1 รองรับการค้นเว็บและการคิดขั้นสูงแบบเลือกใช้ได้ และส่งคืนผลลัพธ์สูงสุด 4 รายการต่อคำขอ
ส่งชื่อมาตรฐานหรือชื่อดั้งเดิมอย่างใดอย่างหนึ่งเท่านั้น ห้ามส่งทั้งสองชื่อ ชื่อมาตรฐาน
promptจำเป็น
num_imagesไม่บังคับ
num_outputs
seedไม่บังคับ
aspect_ratioไม่บังคับ
output_formatไม่บังคับ
safety_toleranceไม่บังคับ
image_urlsไม่บังคับ
images
system_promptไม่บังคับ
resolutionไม่บังคับ
video_urlไม่บังคับ
video
audio_urlไม่บังคับ
audio
pdf_urlไม่บังคับ
limit_generationsไม่บังคับ
enable_web_searchไม่บังคับ
thinking_levelไม่บังคับ
พารามิเตอร์ไฟล์รับ URL https:// สาธารณะ, data: URI ขนาดไม่เกิน 10 MB หรือ file_url ของไฟล์ที่อัปโหลด ไฟล์
{
"id": "req_8k2m4q7x1z9c3v5b6n0p2r4t",
"object": "request",
"model": "nano-banana-2/edit",
"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": 80,
"usd": "0.08",
"charged": 80,
"refunded": 0
},
"input": {
"prompt": "Turn this night street scene into a sunny morning, keep the sneaker and the puddle reflections",
"images": [
"https://content.doitong.com/images/showcase/v3/gen_sneaker_ad.jpg"
],
"resolution": "1K"
},
"output": {
"images": [
{
"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
}
],
"description": "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"
}
}
สำหรับเอเจนต์ AI: หน้า Markdown นี้อยู่ที่ https://doitong.com/th/developers/models/nano-banana-2/edit.md. โมเดลและคู่มือทั้งหมด: https://doitong.com/developers/llms.txt