Description
Gemini 3.1 Flash Image Preview, a.k.a. "Nano Banana 2," is Google’s latest state of the art image generation and editing model, delivering Pro-level visual quality at Flash speed. It combines advanced contextual understanding with fast, cost-efficient inference, making complex image generation and iterative edits significantly more accessible. Aspect ratios can be controlled with the [image_config API Parameter](https://openrouter.ai/docs/features/multimodal/image-generation#image-aspect-ratio-configuration)
API Usage Examples
OpenAI Compatible Endpoint
Use this endpoint with any OpenAI-compatible library. Model: Google: Nano Banana 2 (Gemini 3.1 Flash Image Preview) (google/gemini-3.1-flash-image-preview)
curl https://api.ridvay.com/v1/chat/completions -H "Content-Type: application/json" -H "Authorization: Bearer YOUR_API_KEY" -d '{
"model": "google/gemini-3.1-flash-image-preview",
"messages": [
{
"role": "user",
"content": "Explain the capabilities of the Google: Nano Banana 2 (Gemini 3.1 Flash Image Preview) model"
}
],
"temperature": 0.7,
"max_tokens": 1024
}'Supported Modalities
- Text
- Images
API Pricing
- Input: 0.5$ / 1M tokens
- Output: 3$ / 1M tokens
Token Limits
- Max Output: 65,536 tokens
- Max Context: 65,536 tokens
Subscription Tiers
- free
- pro
- ultimate