# Google Nano Banana 2 (Gemini 3.1 Flash Image) API

> Nano Banana 2 (Gemini 3.1 Flash Image) is Google's image generation and conversational image editing model in the Gemini 3 series, producing images alongside text from text, image, video and PDF input. Google positions it as the high-efficiency, low-latency counterpart to Nano Banana Pro for high-volume developer use, adding output resolutions from 0.5K to 4K, extra wide and tall aspect ratios, image search grounding and improved multilingual text rendering. Choose Nano Banana Pro for complex, precision design work.

Source: https://www.sandbase.ai/models/google/gemini-3.1-flash-image
API reference: https://www.sandbase.ai/models/google/gemini-3.1-flash-image/docs

## Facts

- Provider: Google
- Type: Language model
- Model ID: `google/gemini-3.1-flash-image`
- Price: $0.50 per 1M input tokens, $3 per 1M output tokens
- Context window: 131.1K tokens, up to 32.8K output tokens
- Capabilities: chat, vision, reasoning
- Billing: pay per use from one SandBase balance; no provider account or subscription needed

## Call it

- Gemini generateContent API: `POST https://api.sandbase.ai/v1beta/models/google/gemini-3.1-flash-image:generateContent`

```bash
curl -X POST https://api.sandbase.ai/v1beta/models/google/gemini-3.1-flash-image:generateContent \
  -H "Authorization: Bearer $SANDBASE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "contents": [
    {
      "role": "user",
      "parts": [
        {
          "text": "A watercolor illustration of a fox in a snowy forest"
        }
      ]
    }
  ],
  "generationConfig": {
    "responseModalities": [
      "TEXT",
      "IMAGE"
    ]
  }
}'
```

## FAQ

### How do I call Google Nano Banana 2 (Gemini 3.1 Flash Image) through SandBase?

Create a SandBase API key, then send requests with the model ID "google/gemini-3.1-flash-image" to Gemini generateContent API (/v1beta/models/google/gemini-3.1-flash-image:generateContent) at https://api.sandbase.ai. The request examples on this page show the exact payload.

### How much does Google Nano Banana 2 (Gemini 3.1 Flash Image) cost?

$0.50 per 1M input tokens and $3 per 1M output tokens, billed per request from your SandBase balance. Discounts, when available, are shown in the pricing on this page.

### What is the context window of Google Nano Banana 2 (Gemini 3.1 Flash Image)?

131.1K tokens of context, with up to 32.8K output tokens per response.

### Which features does Google Nano Banana 2 (Gemini 3.1 Flash Image) support?

Google Nano Banana 2 (Gemini 3.1 Flash Image) supports vision (image input), reasoning. See Specifications above for the full list.

### Do I need a separate Google account?

No. One SandBase API key and balance gives you access to Google Nano Banana 2 (Gemini 3.1 Flash Image) and the other models in the catalog; you do not need to sign up with Google separately.
