gemini-3.1-flash-image-preview-official API
Generate images from text or references at up to 4K with Google's official Nano Banana 2 route on APISea.
gemini-3.1-flash-image-preview-officialتسعير API لنموذج gemini-3.1-flash-image-preview-official
جميع الأسعار بالدولار الأمريكي (USD). مقارنة أسعار APISea بالسعر الرسمي المعلن للوحدة نفسها.
| نوع الـ token | APISea | رسمي | وفّر |
|---|---|---|---|
| إدخال نصي لكل 1M رمز | $0.44 | $0.50 | −12% |
| إدخال نصي مخزّن مؤقتًا لكل 1M رمز | $0 | $0 | — |
| إدخال صورة لكل 1M رمز | $0.44 | $0.50 | −12% |
| إدخال صورة مخزّنة مؤقتًا لكل 1M رمز | $0 | $0 | — |
| إخراج نصي لكل 1M رمز | $2.64 | $3.00 | −12% |
| إخراج صورة لكل 1M رمز | $52.80 | $60.00 | −12% |
التكلفة التقريبية لكل مخرج
| الخيار | APISea | رسمي |
|---|---|---|
| 0.5K | ≈ $0.05896 | $0.067 |
| 1K | ≈ $0.05896 | $0.067 |
| 2K | ≈ $0.08888 | $0.101 |
| 4K | ≈ $0.1329 | $0.151 |
ما هو gemini-3.1-flash-image-preview-official؟
Google's gemini-3.1-flash-image-preview-official is an image generation model in the Nano Banana family, available through APISea's official provider route. Use it to create images from text descriptions or transform reference images into new visuals. It supports up to 14 reference images for style and character consistency, output resolutions from 0.5K to 4K, and aspect ratios ranging from square to extreme banners. Optional Google text and image search enhancement can supply real-world information and visual references.
Call it through APISea's image generation endpoint using one API key, with nano-banana-2 as a compatible alias. Billing is pay-as-you-go and token-based, with charges only for successful requests. Estimated image costs are about $0.05896 per image at 1K and about $0.1329 per image at 4K. The default configuration is about 12% below the provider list price; actual charges depend on token usage.
أبرز مزايا gemini-3.1-flash-image-preview-official
Text and Reference Inputs
Generate images from a prompt or supply up to 14 reference images for image-to-image generation and style or character consistency.
Up to 4K Output
Choose 0.5K, 1K, 2K, or 4K output resolution. The default resolution is 1K.
Flexible Aspect Ratios
Specify square, portrait, widescreen, and extended layouts. Supported extreme ratios include 1:4, 4:1, 1:8, and 8:1.
Google Search Enhancement
Enable Google text search to assist generation with real-world information. Google image search enhancement adds visual references alongside text search.
كيفية استدعاء API الخاص بـ gemini-3.1-flash-image-preview-official في 4 خطوات
- 01
احصل على API key
سجّل الدخول إلى APISea، واشحن رصيدك بدءًا من $50، وأنشئ مفتاح sk-sea من وحدة التحكم.
- 02
اضبط عنوان URL الأساسي
استخدم https://api.apisea.ai/v1 عنوانًا أساسيًا في SDK أو عميل HTTP.
- 03
أرسل الطلب
استدعِ POST /v1/images/generations مع "model": "gemini-3.1-flash-image-preview-official" والمعلمات أدناه.
- 04
تعامل مع الاستجابة
تتضمن الاستجابة task_id. أرسل طلبات GET /v1/tasks/{task_id} دوريًا حتى تصبح الحالة completed، ثم نزّل روابط النتائج.
أمثلة على الطلبات
الوثائق: Nano banana2 Image Generation# model can be "gemini-3.1-flash-image-preview-official", or the compatible alias "nano-banana-2-ext"
curl --request POST \
--url https://api.apisea.ai/v1/images/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "gemini-3.1-flash-image-preview-official",
"prompt": "Cyberpunk cityscape at night with neon lights",
"size": "16:9",
"resolution": "2K",
"n": 1
}'المعلمات
| المعلمة | النوع | مطلوب | افتراضي | الوصف |
|---|---|---|---|---|
model | string | مطلوب | gemini-3.1-flash-image-preview | Image generation model name |
nsfw_check | boolean | اختياري | false | Whether to run content moderation before submitting the image task. |
prompt | string | مطلوب | — | Text description for image generation |
size | string | اختياري | — | Image aspect ratio |
resolution | string | اختياري | 1K | Output image resolution |
n | integer | اختياري | — | Number of images to generate |
official_fallback | boolean | اختياري | false | Whether to use the official channel fallback |
image_urls | array | اختياري | — | Reference image URL list for image-to-image generation |
google_search | boolean | اختياري | false | Enable Google text search enhancement |
google_image_search | boolean | اختياري | false | Enable Google image search enhancement |
ما الذي يمكنك إنشاؤه باستخدام gemini-3.1-flash-image-preview-official
Campaign Asset Generation
Build a tool that creates square social images, vertical covers, and wide banners from campaign prompts using explicit aspect ratios.
Reference-Based Creative Workflows
Let teams upload character and style references to guide new image variations, using up to 14 reference images per request.
Search-Assisted Visuals
Create a generation workflow with optional Google text and image search for prompts that benefit from real-world information or visual references.
Preview and Final Assets
Offer low-resolution previews and higher-resolution output in the same application, with resolution choices from 0.5K through 4K.
نصائح للحصول على نتائج أفضل
- 01
Select the Official Model
Set model to
gemini-3.1-flash-image-preview-officialornano-banana-2. Do not use official_fallback with this official model. - 02
Specify Your Layout
Set size explicitly when a layout matters. With auto, text-to-image defaults to 1:1 or 16:9, while image-to-image follows the returned aspect ratio.
- 03
Budget by Resolution
Choose resolution deliberately: estimated token-billed costs are about $0.05896 per image at 1K, about $0.08888 per image at 2K, and about $0.1329 per image at 4K.
- 04
Prepare Reference Images
Supply publicly accessible URLs or full Base64 Data URIs in image_urls. Use jpeg, png, or webp files no larger than 10MB each.
القيود ومعلومات مهمة
Each request supports one generated image; n must be the unquoted number 1.
Reference inputs are limited to 14 images, each no larger than 10MB.
This is a preview model, so behavior may change.
الأسئلة الشائعة حول API الخاص بـ gemini-3.1-flash-image-preview-official
How much does this model cost on APISea?
Estimated token-billed costs are about $0.05896 per image at 0.5K, about $0.05896 per image at 1K, about $0.08888 per image at 2K, and about $0.1329 per image at 4K. The default configuration is about 12% below the provider list price, and APISea bills only successful requests.
How do I call the official Nano Banana 2 API?
Send a POST request to https://api.apisea.ai/v1/images/generations with Bearer Token authentication. Provide a prompt and set model to gemini-3.1-flash-image-preview-official or its compatible alias nano-banana-2.
Which image generation parameters are supported?
Controls include size for aspect ratio, resolution for output resolution, image_urls for references, and optional google_search and google_image_search enhancement. The nsfw_check parameter enables moderation before submission; n must be 1.
What are the input and output limits?
The listed token limits are 1,000,000 input tokens and 128,000 output tokens, with prompt-cache reads supported. Image requests accept up to 14 reference images in jpeg, png, or webp format, with a maximum of 10MB per reference image.
Can I use generated images commercially?
Commercial use is subject to the provider's terms. Review the applicable Google terms and usage requirements before using generated images in commercial products or campaigns.
How does the official version differ from the standard version?
gemini-3.1-flash-image-preview-official uses the official provider route and accepts the alias nano-banana-2. The standard version is gemini-3.1-flash-image-preview, with alias nano-banana-2-ext; the supplied facts do not establish a quality or speed difference between them.
نماذج ذات صلة
Nano Banana
gemini-2.5-flash-image-previewgemini-2.5-flash-image-preview-official
Nano Banana Pro
gemini-3-pro-image-previewgemini-3-pro-image-preview-official
Nano Banana 2
gemini-3.1-flash-image-previewNano-Banana-2-Lite
gemini-3.1-flash-lite-imagegemini-3.1-flash-lite-image-ext
Nano Banana 2.1
gemini-nano-banana-2.1ابدأ التطوير باستخدام gemini-3.1-flash-image-preview-official
مفتاح واحد، وادفع حسب الاستخدام بدءًا من $50؛ ولا تُحتسب الرسوم إلا على الطلبات الناجحة.