Gemini 3.1 Flash Image Preview
Integrace
gemini-3.1-flash-image-preview
# 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/gemini-3.1-flash-image-preview?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"
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/gemini-3.1-flash-image-preview?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"
}),
});
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",
}
# Run the model; wait up to 20 s for the finished result in the same call
r = requests.post(API + "/run/gemini-3.1-flash-image-preview", 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/cs/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": "gemini-3.1-flash-image-preview",
"input": {
"prompt": "A red fox trots through fresh snow at sunrise, soft golden light, shallow depth of field"
}
}
Volejte model Gemini 3.1 Flash Image Preview (gemini-3.1-flash-image-preview) prostřednictvím Doitong API. Dokumentace pro agenty: https://doitong.com/cs/developers/models/gemini-3.1-flash-image-preview.md
POST https://api.doitong.com/v1/run/gemini-3.1-flash-image-preview?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"
}
Pokud je stav odpovědi "queued" nebo "running", dotazujte GET https://api.doitong.com/v1/requests/REQUEST_ID?wait=20, dokud nebude "succeeded"; soubory jsou v outputs[].url. POST https://api.doitong.com/v1/quote/gemini-3.1-flash-image-preview se stejným tělem vrátí přesnou cenu před spuštěním.
Tento požadavek: 0,08 $ 80 kreditů API Spustit na této stránce
Váš nový API klíč. Zobrazuje se pouze nyní a už je vložen do kódu a do pole API klíč níže. Uchovávejte ho v tajnosti: nikdy ho nevkládejte do kódu, který se spouští v prohlížeči.
Vytvořeno na Doitong
Veřejná díla vytvořená komunitou Doitong pomocí Gemini 3.1 Flash Image Preview. Znovu použijte prompt jedním kliknutím.
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...
Sestavit požadavek
Ovládací prvky se generují ze schématu modelu. Kód a cena se aktualizují podle provedených změn.
/run/gemini-3.1-flash-image-preview?wait=20
cena → 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/gemini-3.1-flash-image-preview?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"
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/gemini-3.1-flash-image-preview?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"
}),
});
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",
}
# Run the model; wait up to 20 s for the finished result in the same call
r = requests.post(API + "/run/gemini-3.1-flash-image-preview", 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": "gemini-3.1-flash-image-preview",
"input": {
"prompt": "A red fox trots through fresh snow at sunrise, soft golden light, shallow depth of field"
},
"wait_seconds": 20
}
}
}
Spustit tento požadavek
Váš klíč zůstává v tomto prohlížeči: odesílá se pouze do Doitong API a uloží se do localStorage jen tehdy, když zaškrtnete možnost Zapamatovat. Získat klíč API
O modelu Gemini 3.1 Flash Image Preview
Generuje obrázky z `prompt` s `resolution` 0.5K, 1K, 2K nebo 4K a poměry stran včetně extrémních, například 8:1 a 1:8. Volitelné parametry `system_prompt`, `enable_web_search` a `thinking_level` (minimal nebo high) ovlivňují generování. Vytváří 1 až 4 obrázky ve formátu PNG, JPEG nebo WebP.
Parametry
Odešlete buď kanonický název, nebo nativní název, ne oba. Kanonické názvy
promptpovinné
num_imagesvolitelné
num_outputs
seedvolitelné
aspect_ratiovolitelné
output_formatvolitelné
safety_tolerancevolitelné
system_promptvolitelné
resolutionvolitelné
limit_generationsvolitelné
enable_web_searchvolitelné
thinking_levelvolitelné
Výstup
{
"id": "req_8k2m4q7x1z9c3v5b6n0p2r4t",
"object": "request",
"model": "gemini-3.1-flash-image-preview",
"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": "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",
"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"
}
}
Pole výstupu
- images
- array of object {url, content_type, file_name, file_size, width, height}Obrázky vytvořené modelem.
- description
- stringPopis doprovázející generované obrázky.
Další varianty Gemini 3.1 Flash Image Preview
Další modely: Text na obrázek
Pro AI agenty: tato stránka je ve formátu Markdown na adrese https://doitong.com/cs/developers/models/gemini-3.1-flash-image-preview.md. Všechny modely a návody: https://doitong.com/developers/llms.txt







