🎉 Get Free $5 on Signup!
Models
Enterprise
Subscribe
Resource
Activity
Documentation
Console

/google/gemini-3.1-flash-image

G

Google: Gemini 3.1 Flash Image

Gemini 3.1 Flash Image, also known as Nano Banana 2, is Google's high-efficiency image generation and conversational editing model optimized for speed, high-volume workloads, visual consistency, multilingual text rendering, and grounded image creation. It supports text, image, video, and PDF inputs with image and text outputs, advanced visual reasoning, video-to-image generation, and resolutions up to 4K.

Modetext、image、file、video → text、image
Input price$0.25 per M tokens
Output price—
Context length131072 tokens
Listed at2026-05-28T00:00:00Z

Google

Latency—
Throughput—
Upload rate—
Context length131072 tokens
Max output32768 tokens
Input price$0.25per request
Output price—per request
Cache read—per request
Cache write—per request

Performance

Avg TPS—
Avg latency—
Avg success rate—
TPS—
TTFT—
Latency—
Success rate—

Success rate

Speed

Code Example

curl ${API_BASE_URL}/v1/models/gemini-3.1-flash-image:generateContent \
  -H "Authorization: Bearer <YOUR_API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gemini-3.1-flash-image",
    "messages": [
      {
        "role": "user",
        "content": "Hello"
      }
    ]
  }'

Replace <YOUR_API_KEY> with the API key generated on your token management page.

Authentication

All requests must include the Authorization: Bearer <TOKEN> header.

Endpoint Path

POST
google-generate-content

Supported Parameters

ParameterTypeDefaultDescription
string1KControls the output image resolution. Supported values: 0.5K, 1K, 2K, and 4K. Default: 1K.
string1:1Controls the aspect ratio of the generated image.
stringminimalControls the amount of reasoning used during image generation. Supported values: minimal and high. Default: minimal.
object-Controls whether the response returns an image only or both text and image, and configures image size and aspect ratio.
booleanfalseEnables Google Web and Image Search grounding for real-time grounded image generation.

Rate Limits

GroupRPMTPMRPD

RPM = requests per minute, TPM = tokens per minute, RPD = requests per day. Limits apply by token group.

Pricing

ProviderBilling typePrice summary
G
Gemini
Per call
Input price$0.25per request
Completion price$—per request
Cache read price$—per request
Cache write price$—per request