Poe API
Google DeepMind's Nano Banana (i.e. Gemini 2.5 Flash Image model) offers image generation and editing capabilities, state-of-the-art performance in photo-realistic multi-turn edits at exceptional speeds. Supports a maximum input context of 32k tokens.
Optional parameters:
Set aspect ratio. Select from (1:1, 2:3, 3:2, 3:4, 4:3, 4:5, 5:4, 9:16, 16:9, 21:9). It is set to 16:9 aspect ratio as default.
Image only to only generate image output. It is `off` by default
Note: Simply enabling image only will not result in an image unless the prompt is phrased specifically for image generation, but it does guarantee that only a single image (or none) will be produced.
Powered by a server managed by @google. Learn more
- OFFICIAL
Build with Nano-Banana using the Poe API
Start by creating an API key, for use with any bot on Poe:
Code samples
python
import openai
client = openai.OpenAI(
api_key = "YOUR_POE_API_KEY", # or os.getenv("POE_API_KEY")
base_url = "https://api.poe.com/v1",
)
chat = client.chat.completions.create(
model = "nano-banana",
messages = [{
"role": "user",
"content": "A chess game between forest animals, rendered in the style of Beatrix Potter's illustrations"
}]
)
print(chat.choices[0].message.content)See the full documentation for comprehensive guidance on getting started.