هوش مصنوعی هرمزهرمزورود

Google: Nano Banana 2 (Gemini 3.1 Flash Image Preview): مدل هوش مصنوعی

Gemini 3.1 Flash Image Preview یک مدل تولید و ویرایش تصویر از گوگل است که پرامپت و تصاویر مرجع را به تصاویر تازه تبدیل می‌کند. به‌صورت ناهمگام از طریق هرمز.

پنجره زمینه:
65,536 توکن
ورودی:
$0.5 / هر ۱M توکن
خروجی:
$3 / هر ۱M توکن
نوع:
text, image
  • بینایی
  • استریم

سطح‌های تفکر: high · minimal

Gemini 3.1 Flash Image Preview یک مدل تولید و ویرایش تصویر از گوگل است. از روی پرامپت متنی تصاویر تازه می‌سازد و می‌تواند تصاویر مرجع را ویرایش یا ترکیب کند و در عین حال ترکیب‌بندی، سوژه‌ها و سبک خواسته‌شده را حفظ کند. ورودی آن تصویر، متن است و خروجی تصویر تولیدشده می‌دهد.

درخواست‌های تصویر به‌صورت ناهمگام اجرا می‌شوند: یک پیش‌بینی (prediction) ثبت می‌کنید و سپس نتیجه را pull می‌کنید؛ این الگو برای تولید طولانی‌تر و کارهای دسته‌ای مناسب است. کاربردهای رایج شامل تصاویر محصول، خلاقیت تبلیغاتی، تصویرسازی و جریان‌های ویرایش و پالایش تکرارشونده است.

قیمت‌گذاری بر پایه‌ی مصرف است: $0.5/M in · $3/M out · $60/M image-output tokens. Gemini 3.1 Flash Image Preview از طریق هرمز و پشت یک API پیش‌بینی ناهمگام با دسترسی پایدار از داخل ایران ارائه می‌شود.

Gemini 3.1 Flash Image Preview, a.k.a. "Nano Banana 2," is Google’s latest state of the art image generation and editing model, delivering Pro-level visual quality at Flash speed. It combines...

شروع سریع

# The image comes back as a data: URI on message.images, not as text.
URL=$(curl -s https://api.hormouz.net/v1/chat/completions \
  -H "Authorization: Bearer ng-YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "google/gemini-3.1-flash-image-preview",
    "modalities": ["image", "text"],
    "messages": [{"role": "user", "content": "A red apple on a wooden table"}]
  }' | jq -r '.choices[0].message.images[0].image_url.url')

# Take the extension from the URI itself — this model may answer png or jpeg.
EXT=$(printf '%s' "$URL" | sed -n 's|^data:image/\([a-z]*\);.*|\1|p')
printf '%s' "$URL" | sed 's/^data:[^,]*,//' | base64 -d > "output.${EXT:-png}"

مشخصات

سازندهGoogle
نوعمتن، تصویر
پنجره زمینه۶۵٬۵۳۶ توکن
قیمت$0.50/M in · $3.00/M out
نوع APIChat Completions
قابلیت‌هااستریم · بینایی
طراحی گرافیک
۲۵٪ برتر
۱٬۲۶۴اِلو
نرخ برد: ۶۶٫۳%زمان میانگین: ۲۲٫۶s
تصویر
۲۵٪ برتر
۱٬۲۷۹اِلو
نرخ برد: ۶۵٫۱%زمان میانگین: ۲۳٫۸s
لوگو
۲۵٪ برتر
۱٬۲۶۴اِلو
نرخ برد: ۶۲٫۹%زمان میانگین: ۲۲٫۲s

منبع داده‌ها: Design Arena

نمونه کد

cURL
# The image comes back as a data: URI on message.images, not as text.
URL=$(curl -s https://api.hormouz.net/v1/chat/completions \
  -H "Authorization: Bearer ng-YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "google/gemini-3.1-flash-image-preview",
    "modalities": ["image", "text"],
    "messages": [{"role": "user", "content": "A red apple on a wooden table"}]
  }' | jq -r '.choices[0].message.images[0].image_url.url')

# Take the extension from the URI itself — this model may answer png or jpeg.
EXT=$(printf '%s' "$URL" | sed -n 's|^data:image/\([a-z]*\);.*|\1|p')
printf '%s' "$URL" | sed 's/^data:[^,]*,//' | base64 -d > "output.${EXT:-png}"
Python
import base64
from openai import OpenAI

client = OpenAI(api_key="ng-YOUR_API_KEY", base_url="https://api.hormouz.net/v1")
response = client.chat.completions.create(
    model="google/gemini-3.1-flash-image-preview",
    messages=[{"role": "user", "content": "A red apple on a wooden table"}],
    modalities=["image", "text"],
)

# message.content is None on an image reply — the picture is in message.images.
for i, img in enumerate(response.choices[0].message.images or []):
    header, b64 = img["image_url"]["url"].split(",", 1)
    ext = "png" if "image/png" in header else "jpg"
    with open(f"output_{i}.{ext}", "wb") as f:
        f.write(base64.b64decode(b64))
JavaScript
import OpenAI from "openai";
import fs from "node:fs";

const client = new OpenAI({ apiKey: "ng-YOUR_API_KEY", baseURL: "https://api.hormouz.net/v1" });
const response = await client.chat.completions.create({
  model: "google/gemini-3.1-flash-image-preview",
  messages: [{ role: "user", content: "A red apple on a wooden table" }],
  modalities: ["image", "text"],
});

// message.content is null on an image reply — the picture is in message.images.
(response.choices[0].message.images ?? []).forEach((img, i) => {
  const url = img.image_url.url;
  const ext = url.startsWith("data:image/png") ? "png" : "jpg";
  fs.writeFileSync(`output_${i}.${ext}`, Buffer.from(url.slice(url.indexOf(",") + 1), "base64"));
});

خرید API Google: Nano Banana 2 (Gemini 3.1 Flash Image Preview) با پرداخت ریالی

  • با کارت بانکی ایرانی اعتبار بخرید؛ کارت ارزی و حساب خارجی لازم نیست.
  • با یک کلید هرمز به Google: Nano Banana 2 (Gemini 3.1 Flash Image Preview) و بیش از ۶۰۰ مدل دیگر دسترسی دارید و فقط به اندازه‌ی مصرف می‌پردازید.
  • بدون فیلترشکن و بدون خطر بن شدن حساب؛ کافی است آدرس پایه را به api.hormouz.net/v1 تغییر دهید.
ساخت حسابخرید API Gemini (جمینای) با پرداخت ریالی

استفاده از طریق هرمز

با یک کلید API به این مدل و بیش از ۶۰۰ مدل دیگر وصل شوید و مصرف هر مدل را تا سطح هر درخواست ببینید.

درخواست دسترسی شرکتی

سوالات متداول

Gemini 3.1 Flash Image Preview چه چیزی تولید می‌کند؟
از تصویر، متن تصویر تولید و ویرایش می‌کند. درخواست‌ها به‌صورت ناهمگام از طریق API پیش‌بینی اجرا می‌شوند. ثبت کنید و سپس نتیجه را pull کنید.
پنجره‌ی زمینه‌ی Gemini 3.1 Flash Image Preview چقدر است؟
تا ۱۳۱ هزار توکن، مناسب برای اسناد طولانی و گفت‌وگوهای چندمرحله‌ای.
هزینه‌ی Gemini 3.1 Flash Image Preview چقدر است؟
قیمت‌گذاری بر پایه‌ی مصرف: $0.5/M in · $3/M out · $60/M image-output tokens.
Gemini 3.1 Flash Image Preview برای چه کاری مناسب است؟
تصاویر محصول، خلاقیت تبلیغاتی، تصویرسازی و ویرایش‌های تصویری تکرارشونده که نتیجه را در چند مرحله پالایش می‌کنید.
چطور از داخل ایران به Gemini 3.1 Flash Image Preview دسترسی داشته باشم؟
در هرمز حساب بسازید و کلید API بگیرید؛ هرمز دسترسی پایدار از داخل ایران را از طریق یک API پیش‌بینی ناهمگام فراهم می‌کند.

به‌روزرسانی: 2026-10-13