Nano Banana 2 (Gemini 3.1 Flash Image)
gemini-3.1-flash-imageAvailableNano Banana 2 (Gemini 3.1 Flash Image). Google's image generation and editing model (the Flash version of Gemini 3.1). Built for speed and a lower price; creates images from 0.5K to 4K.
- Context
- 131.1K tokens
- Max output
- 32.8K tokens
- vs. official price
- 40% cheaper
Pricing (USD per 1M tokens)
How prices are calculated| Item | Official | Basic | Premium |
|---|---|---|---|
| Input | $0.50≈ ¥79.3 | $0.30≈ ¥48.0 | $0.25≈ ¥40.0 |
| Output | $60.00≈ ¥9,518 | $36.00≈ ¥5,760 | $30.00≈ ¥4,800 |
| Cache read | — | $0.30≈ ¥48.0 | $0.25≈ ¥40.0 |
Notes
Output is charged at the official image output price ($60 per 1M tokens). Text output uses the same rate. One image is 747 tokens at 0.5K, 1,120 at 1K, 1,680 at 2K and 2,520 at 4K.
How to call
POST/v1/chat/completions
import os
from openai import OpenAI
client = OpenAI(
base_url="https://token.echohub.io/v1",
api_key=os.environ["ECHO_API_KEY"],
)
res = client.chat.completions.create(
model="gemini-3.1-flash-image",
messages=[{"role": "user", "content": "Hello"}],
)
print(res.choices[0].message.content)import os
from anthropic import Anthropic
# The Anthropic SDK adds /v1 at the end automatically
client = Anthropic(
base_url="https://token.echohub.io",
api_key=os.environ["ECHO_API_KEY"],
)
msg = client.messages.create(
model="gemini-3.1-flash-image",
max_tokens=1024,
messages=[{"role": "user", "content": "Hello"}],
)
print(msg.content[0].text)curl https://token.echohub.io/v1/chat/completions \
-H "Authorization: Bearer $ECHO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gemini-3.1-flash-image",
"messages": [{"role": "user", "content": "Hello"}]
}'