Nano Banana 2.1
Closed-weight Google model accepting text and image input, with tool calling, reasoning mode and structured output. It has no benchmark results, and its blended price sits well above the registry median.
Spec sheet
- Family
- Gemini
- Released
- 6 Oct 20262 months ago
- Weights
- Closed
- Context window
- 66k tokens
- Largest response
- 59k tokens
- Accepts
- text, image
- Supports
- tools, reasoning, structured output
- Knowledge cutoff
- –
- Intelligence index
- –
- Input price
- $1.5 / 1M
- Output price
- $7.5 / 1M
- Blended price (3:1)
- $3 / 1M
- Index points per $
- –
- Speed
- –
- Popularity
- #150 of 194by usage
- Providers
- 2
Benchmarks
Score · rank among models testedNo results yet on the benchmarks we track.
The tick on each bar marks the registry median; hover over a bar for the numbers. Sources and how the index is computed: methodology.
Providers and prices
$ per 1M tokens · from genai-prices| Provider | Gateway | Pydantic AI model string | Input | Cached input | Output | Blended |
|---|---|---|---|---|---|---|
| Google Vertex | gateway/google-cloud:gemini-nano-banana-2.1 | $1.5 | – | $7.5 | $3 | |
| OpenRouter | BYOK | openrouter:google/gemini-nano-banana-2.1 | $1.5 | – | $7.5 | $3 |
Every provider charges the same. Blended price assumes three input tokens for each output token.
Example code
# /// script # dependencies = ["pydantic-ai"] # /// import os from pydantic_ai import Agent os.environ['PYDANTIC_AI_GATEWAY_API_KEY'] = '...' agent = Agent('gateway/google-cloud:gemini-nano-banana-2.1', instructions='Be concise, reply with one sentence.') result = agent.run_sync('Where does "hello world" come from?') print(result.output)
# /// script # dependencies = ["pydantic-ai"] # /// import os from pydantic import BaseModel from pydantic_ai import Agent os.environ['PYDANTIC_AI_GATEWAY_API_KEY'] = '...' class CityLocation(BaseModel): city: str country: str agent = Agent('gateway/google-cloud:gemini-nano-banana-2.1', output_type=CityLocation) result = agent.run_sync('Where were the olympics held in 2012?') print(result.output) #> city='London' country='United Kingdom'
# /// script # dependencies = ["pydantic-ai"] # /// import os import random from pydantic_ai import Agent, RunContext os.environ['PYDANTIC_AI_GATEWAY_API_KEY'] = '...' agent = Agent( 'gateway/google-cloud:gemini-nano-banana-2.1', deps_type=str, instructions="You're a dice game, roll the die and see if it matches the user's guess.", ) @agent.tool_plain def roll_dice() -> str: """Roll a six-sided die and return the result.""" return str(random.randint(1, 6)) @agent.tool def get_player_name(ctx: RunContext[str]) -> str: """Get the player's name.""" return ctx.deps result = agent.run_sync('My guess is 4', deps='Anne') print(result.output)
# /// script # dependencies = ["pydantic-ai"] # /// import asyncio import os from pydantic_ai import Agent os.environ['PYDANTIC_AI_GATEWAY_API_KEY'] = '...' agent = Agent('gateway/google-cloud:gemini-nano-banana-2.1') async def main(): async with agent.run_stream('Explain prompt caching in three bullet points.') as response: async for text in response.stream_text(delta=True): print(text, end='', flush=True) asyncio.run(main())
export PYDANTIC_AI_GATEWAY_API_KEY='...' uvx pax --model 'gateway/google-cloud:gemini-nano-banana-2.1'
// npm install ai @ai-sdk/google-vertex import { createVertex } from '@ai-sdk/google-vertex' import { generateText } from 'ai' process.env.PYDANTIC_AI_GATEWAY_API_KEY = '...' const googleCloud = createVertex({ baseURL: 'https://gateway.pydantic.dev/proxy/google-vertex', apiKey: process.env.PYDANTIC_AI_GATEWAY_API_KEY, }) const { text } = await generateText({ model: googleCloud('gemini-nano-banana-2.1'), system: 'Be concise, reply with one sentence.', prompt: 'Where does "hello world" come from?', }) console.log(text)
Ask Nano Banana 2.1 a question with a Pydantic AI agent and print the answer. Run it with uv run hello.py.
Get validated, typed output from Nano Banana 2.1 by giving the agent a Pydantic model. Run it with uv run structured_output.py.
Give Nano Banana 2.1 two tools to call, one of which reads the agent's dependencies. Run it with uv run tools.py.
Stream Nano Banana 2.1's reply to the terminal as it is generated. Run it with uv run streaming.py.
Chat with Nano Banana 2.1 in your terminal using pax, the TUI for pydantic-ai-harness. Coming soon.
Call Nano Banana 2.1 from TypeScript with the Vercel AI SDK, through Pydantic AI Gateway.
Compare
Score against blended price per 1M tokens (log scale). Nano Banana 2.1 Kimi K3.1 Pro other models
About Nano Banana 2.1
Description written by an LLM from the data on this pageClosed-weight Google model accepting text and image input, with tool calling, reasoning mode and structured output. It has no benchmark results, and its blended price sits well above the registry median.
Nano Banana 2.1 is a closed-weight model from Google, offered through Google Vertex and OpenRouter. It accepts text and image input and supports tool calling, reasoning mode and structured output. Its 65k-token context window is small, though responses can run to 58,982 tokens.
The registry holds no benchmark results for it, so its quality cannot be compared with other models. Pricing is $1.5 per million input tokens and $7.5 per million output tokens, giving a blended price of $3, roughly three times the registry median of about $1.
Its popularity ranks 150 of 194 and its price ranks 132 of 194. No knowledge cutoff is recorded. It is built into the Pydantic AI Gateway, so it can be used there without a separate integration.
Strengths
- Supports tool calling, reasoning mode and structured output
- Accepts both text and image input
- Responses can run to 58,982 tokens, the largest response length listed
- Built into the Pydantic AI Gateway
Weaknesses
- No benchmark results, so its quality cannot be ranked
- Blended price of $3 per million tokens, about three times the median
- Context window of 65k tokens is small for long documents
Best for
Agents that need tool calling, image input and structured output, and can proceed without benchmark evidence.