Gemini 3.1 Flash Image (Nano Banana 2)
Approved Data Classifications
Description
Gemini 3.1 Flash Image is a member of the Gemini series of models, a suite of highly-capable, natively multimodal reasoning models. Gemini 3.1 Flash Image can comprehend input from different information sources, including text, images, audio and video. Image and text output is generated in the response.
Capabilities
| Model | Release Date | Input | Output | Context Length | Cost (per 1 million tokens / per image) |
|---|---|---|---|---|---|
| gemini-3.1-flash-image | Feb 2026 | Text, Image | Text, Image | up to 1M | $0.50/1M input (text/image) $0.067 per image (1024x1024) |
info
1Mrepresents 1 Million Tokens- Image inputs are charged at 1120 tokens ($0.0006) per input image
- Image output costs scale by output image resolution - 1120 tokens ($0.067) for 1K (roughly 1MP)
Availability
Cloud Provider
Usage
- curl
- python
- javascript
curl -X POST https://api.ai.it.ufl.edu/v1/images/generations \
-H "Content-Type: application/json" \
-H "Authorization: Bearer <API_TOKEN>" \
-d '{
"model": "gemini-3.1-flash-image",
"prompt": "A cheerful alligator mascot in UF colors, poster style.",
"size": "1024x1024"
}'
from openai import OpenAI
client = OpenAI(
api_key="your_api_key",
base_url="https://api.ai.it.ufl.edu/v1"
)
response = client.images.generate(
model="gemini-3.1-flash-image",
prompt="A cheerful alligator mascot in UF colors, poster style.",
size="1024x1024",
response_format="url"
)
image_url = response.data[0].url
import OpenAI from 'openai';
const openai = new OpenAI({
apiKey: 'your_api_key',
baseURL: 'https://api.ai.it.ufl.edu/v1'
});
const completion = await openai.images.generate({
model: "gemini-3.1-flash-image",
prompt: "A cheerful alligator mascot in UF colors, poster style.",
size: "1024x1024",
response_format: "url",
});
image_url = completion.data[0].url;