GPT Image 1 Mini · Edit
ผสานการทำงาน
gpt-image-1-mini/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/gpt-image-1-mini/edit?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",
"images": [
"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"
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/gpt-image-1-mini/edit?wait=20", {
method: "POST",
headers,
body: JSON.stringify({
"prompt": "A red fox trots through fresh snow at sunrise, soft golden light, shallow depth of field",
"images": [
"https://content.doitong.com/images/showcase/v3/gen_fox_cartoon.jpg"
]
}),
});
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": "A red fox trots through fresh snow at sunrise, soft golden light, shallow depth of field",
"images": [
"https://content.doitong.com/images/showcase/v3/gen_fox_cartoon.jpg",
],
}
# Run the model; wait up to 20 s for the finished result in the same call
r = requests.post(API + "/run/gpt-image-1-mini/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": "gpt-image-1-mini/edit",
"input": {
"prompt": "A red fox trots through fresh snow at sunrise, soft golden light, shallow depth of field",
"images": [
"https://content.doitong.com/images/showcase/v3/gen_fox_cartoon.jpg"
]
}
}
เรียกใช้โมเดล GPT Image 1 Mini · Edit (gpt-image-1-mini/edit) ผ่าน Doitong API เอกสารสำหรับเอเจนต์: https://doitong.com/th/developers/models/gpt-image-1-mini/edit.md
POST https://api.doitong.com/v1/run/gpt-image-1-mini/edit?wait=20
Authorization: Bearer $DOITONG_API_KEY
Content-Type: application/json
{
"prompt": "A red fox trots through fresh snow at sunrise, soft golden light, shallow depth of field",
"images": [
"https://content.doitong.com/images/showcase/v3/gen_fox_cartoon.jpg"
]
}
หากสถานะการตอบกลับเป็น "queued" หรือ "running" ให้ส่งคำขอแบบสำรวจ GET https://api.doitong.com/v1/requests/REQUEST_ID?wait=20 จนกว่าจะเป็น "succeeded" ไฟล์อยู่ใน outputs[].url การส่ง POST https://api.doitong.com/v1/quote/gpt-image-1-mini/edit ด้วยบอดี้เดียวกันจะแสดงราคาที่แน่นอนก่อนเรียกใช้
ไฟล์เช่นเดียวกับตัวอย่าง: $0.06 60 เครดิต API ไฟล์ของคุณจะถูกวัดก่อนเรียกใช้ เรียกใช้ในหน้านี้
คีย์ API ใหม่ของคุณ คีย์นี้จะแสดงเฉพาะตอนนี้ และมีอยู่ในโค้ดและช่องคีย์ API ด้านล่างแล้ว เก็บเป็นความลับ: อย่าใส่คีย์นี้ไว้ในโค้ดที่ทำงานบนเบราว์เซอร์
สร้างบน Doitong
ผลงานสาธารณะที่สร้างด้วย GPT Image 1 Mini โดยชุมชน Doitong นำพรอมต์กลับมาใช้ได้ในคลิกเดียว
Art style: Реалистичный кулинарный блог. Финальный кадр, средний план ведущей. Она улыбается своей самой широкой и дружелюбной улыбкой, глядя в камеру. Она делает призывающий жест руками, словно приглашая к общению. Перед ней на столе по-прежнему лежат аппетитные булочки. Освещение становится...
Grungy analog photo of Daphne Blake (from Serial scooby doo) watching her own movie on a 90s CRT TV in a dimly lit bedroom. The TV clearly shows animated scene from scooby doo, with a cartoon-style Daphne in her classic clothes on screen, smiling. Daphne Blake is sitting cross-legged on the floor...
Fotografia realistica scattata dall’interno di un appartamento situato a un piano abbastanza alto, guardando verso il basso attraverso una finestra aperta su una normale strada cittadina. In strada, una folla numerosa di manifestanti avanza compatta; alcune persone indossano passamontagna. Sul...
Art style: Disney-inspired. Золушка walking further back in the frame; Косметолог standing in the near foreground. The couch and strip of reflective floor separate them. Золушка is walking on glossy floor near the open doorway further back in the frame in the midground. Torso in three-quarter...
Art style: Реалистичный кулинарный блог. Экстремально крупный план рук ведущей, разламывающих готовую, горячую булочку. Булочка имеет аппетитную золотисто-коричневую корочку, густо посыпанную поджаренным кунжутом. В месте разлома видна пористая, воздушная и очень мягкая текстура мякиша...
Art style: Реалистичный кулинарный блог. Финальный кадр, средний план ведущей. Она улыбается своей самой широкой и дружелюбной улыбкой, глядя в камеру. Она делает призывающий жест руками, словно приглашая к общению. Перед ней на столе по-прежнему лежат аппетитные булочки. Освещение становится...
Square album cover for an energetic house dance single. A dancing crowd silhouette in a night club under warm orange and golden stage lights, flying sparks and flames rising from the dance floor, misty Scottish highland mountains faintly visible in the glowing background. Bold modern clean...
Medium shot of launch team executives in smart casual blazers over plain t-shirts, sitting in a modern conference room facing a large display showing the 'International AI Safety Report' document title from February 2026, professional lighting. Context markers: smart casual blazer, plain t-shirt,...
Art style: DreamWorks-inspired. Zolushka lying in the middle ground; kosmetolog leaning further back in the frame. Zolushka is lying on белая кушетка in the middle ground in the foreground. Head facing camera. Eyes on потолок. Руки вне фокуса вдоль тела. Усталость и бессилие. Zolushka wears образ...
Use facial feature of attached photo. A realistic portrait of a woman with black hair loosely tied back, sitting outside a whitewashed stone house with a conical roof in a quiet Italian village. She wears a soft yellow floral summer dress with puff sleeves and white strappy heels. A wicker basket...
Art style: Кинематографичный, реалистичная съемка. Узкая улочка в Мумбаи ранним утром. В воздухе висит легкий туман. Арджун, молодой человек, стоит у небольшой чайной будки. Он держит стаканчик с чаем и широко улыбается, только что угостив всех вокруг. Атмосфера теплая и дружеская....
Real photo retouching of existing room, medium warm grey walls, white rectangular panel wall mouldings in classic grid pattern, same moulding layout as original photo, warm oak hardwood plank floor, brass gold straight track lighting rail on white ceiling with multiple adjustable spotlights,...
2D flat animation character design reference sheet for an advanced AI assistant avatar, hybrid of The Simpsons and lo-fi indie cartoon. Use the attached visual reference as the primary shape guide for head construction, optics, and premium engineering vibe. Clear black outlines (not too thick),...
Art style: Реалистичный кулинарный блог. A clearly recognizable likeness of Ведущая — keep their real face shape, skin tone, hairstyle, build and any signature look (hair, kit, number). Молодая женщина лет 38-41 с темными каштановыми волосы длинные распущенные по плечам вниз легкий макияж, одета...
Art style: Реалистичная китайская дорама, кинематографичная съёмка, живые городские локации, выразительные крупные планы; драматический абсурд с комедийными паузами. Атмосфера шумного китайского рынка и старых улочек. Музыкальная подложка — китайские народные мотивы, переходящие от лёгких и...
Art style: 3d pixar. Пара идет за руки по узкой грунтовой дороге, камера спереди. На спине женщины на рюкзаке закреплен огромный слегка закругленный камень над головой на рюкзаке с четкой надписью 'РАБОТА'. Мужчина несет в руках точно такой же камень как у женщины камень с такой же надписью....
สร้างคำขอ
ตัวควบคุมสร้างจากสคีมาของโมเดล โค้ดและราคาจะอัปเดตเมื่อคุณเปลี่ยนค่า
/run/gpt-image-1-mini/edit?wait=20
ใบเสนอราคา → $0.06
# 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/gpt-image-1-mini/edit?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",
"images": [
"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"
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/gpt-image-1-mini/edit?wait=20", {
method: "POST",
headers,
body: JSON.stringify({
"prompt": "A red fox trots through fresh snow at sunrise, soft golden light, shallow depth of field",
"images": [
"https://content.doitong.com/images/showcase/v3/gen_fox_cartoon.jpg"
]
}),
});
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": "A red fox trots through fresh snow at sunrise, soft golden light, shallow depth of field",
"images": [
"https://content.doitong.com/images/showcase/v3/gen_fox_cartoon.jpg",
],
}
# Run the model; wait up to 20 s for the finished result in the same call
r = requests.post(API + "/run/gpt-image-1-mini/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": "gpt-image-1-mini/edit",
"input": {
"prompt": "A red fox trots through fresh snow at sunrise, soft golden light, shallow depth of field",
"images": [
"https://content.doitong.com/images/showcase/v3/gen_fox_cartoon.jpg"
]
},
"wait_seconds": 20
}
}
}
เรียกใช้คำขอนี้
คีย์ของคุณจะอยู่ในเบราว์เซอร์นี้ โดยส่งไปยัง Doitong API เท่านั้น และจะบันทึกใน localStorage ก็ต่อเมื่อคุณเลือกจดจำ รับคีย์ API
เกี่ยวกับ GPT Image 1 Mini · Edit
แก้ไขหรือผสานรูปภาพที่ส่งมาใน `image_urls` ตามพรอมต์ ขนาดเอาต์พุตคือ auto, 1024x1024, 1536x1024 หรือ 1024x1536 พร้อมตัวเลือกคุณภาพ พื้นหลัง และรูปแบบ (png, jpeg, webp) สร้างรูปภาพได้สูงสุด 4 รูปต่อคำขอ ไม่รองรับอินพุตมาสก์
พารามิเตอร์
ส่งชื่อมาตรฐานหรือชื่อดั้งเดิมอย่างใดอย่างหนึ่งเท่านั้น ห้ามส่งทั้งสองชื่อ ชื่อมาตรฐาน
promptจำเป็น
image_urlsจำเป็น
images
image_sizeไม่บังคับ
backgroundไม่บังคับ
qualityไม่บังคับ
num_imagesไม่บังคับ
num_outputs
output_formatไม่บังคับ
enable_safety_checkerไม่บังคับ
พารามิเตอร์ไฟล์รับ URL https:// สาธารณะ, data: URI ขนาดไม่เกิน 10 MB หรือ file_url ของไฟล์ที่อัปโหลด ไฟล์
เอาต์พุต
{
"id": "req_8k2m4q7x1z9c3v5b6n0p2r4t",
"object": "request",
"model": "gpt-image-1-mini/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": 60,
"usd": "0.06",
"charged": 60,
"refunded": 0
},
"input": {
"prompt": "A red fox trots through fresh snow at sunrise, soft golden light, shallow depth of field",
"image_urls": [
"https://content.doitong.com/images/showcase/v3/gen_fox_cartoon.jpg"
]
},
"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
}
]
},
"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"
}
}
ฟิลด์ของเอาต์พุต
- images
- array of object {url, content_type, file_name, file_size, width, height}รูปภาพที่โมเดลสร้าง
รูปแบบอื่นของ GPT Image 1 Mini
โมเดลเพิ่มเติม: แก้ไขภาพ
สำหรับเอเจนต์ AI: หน้า Markdown นี้อยู่ที่ https://doitong.com/th/developers/models/gpt-image-1-mini/edit.md. โมเดลและคู่มือทั้งหมด: https://doitong.com/developers/llms.txt






