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

Google: Nano Banana 2.1: مدل هوش مصنوعی

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

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

Google: Nano Banana 2.1 یک مدل هوش مصنوعی از Google است که از طریق هرمز با یک API سازگار با OpenAI و دسترسی پایدار از داخل ایران در دسترس است.

Nano Banana 2.1 (Gemini Nano Banana 2.1) is Google's image generation and editing model on the Flash tier, succeeding Nano Banana 2 and Nano Banana Pro. It improves product recontextualization,...

شروع سریع

# 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-nano-banana-2.1",
    "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
نوعمتن، تصویر
پنجره زمینه۶۵٬۵۳۶ توکن
قیمت$1.50/M in · $7.50/M out
نوع APIChat Completions
قابلیت‌هااستریم · بینایی · ابزارها

نمونه کد

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-nano-banana-2.1",
    "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-nano-banana-2.1",
    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-nano-banana-2.1",
  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.1 با پرداخت ریالی

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

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

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

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

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