gemini-3.1-flash-image

google/gemini-3.1-flash-image
Capabilities
3
1K2K4K
Context length
Tokens
Max output tokens
Tokens
Type
Image
Google

Playground

Input

Output

Pricing

Pricing breakdown
Usage-based pricing, broken down by billing item at your current rates.

Input tokens

Standard rate
0.5 credits / 1M

Input image tokens

Standard rate
0.5 credits / 1M

Output tokens

Standard rate
3 credits / 1M

Output image tokens

Standard rate
6 credits / 1M

Billing items are additive. Only one matching price tier applies to each item. Charges are calculated from actual usage per request, with each item rounded up.

API

cURL example
POST/v1beta/models/google/gemini-3.1-flash-image:generateContent
SynchronousGemini
curl "http://127.0.0.1:11113/v1beta/models/google/gemini-3.1-flash-image:generateContent" \  -X POST \  -H "x-goog-api-key: $API_KEY" \  -H "Content-Type: application/json" \  -d '{  "contents": [    {      "role": "user",      "parts": [        {          "text": "A quiet mountain lake."        }      ]    }  ],  "generationConfig": {    "responseModalities": [      "IMAGE"    ]  }}'

Set your API_KEY environment variable before running. Keep your key server-side.

API documentation

Uptime

Coming soon
Uptime workspace
This release includes the core layout and display area. The full feature will be added later.