Skip to content
English

Nano Banana 2

ProviderGoogle
Model nameNano-Banana-2
Endpoint/v1/chat/completions
ResultMarkdown image content in choices[0].message.content
PricingSee HiAPI Pricing

Nano Banana 2 balances speed, visual quality, and production throughput. It is a good default when you need repeated brand, social, or campaign assets.

ParameterTypeNotes
modelstringUse Nano-Banana-2
messagesarrayPut the prompt in a user message
extra_body.google.image_config.aspect_ratiostringCommon values include 1:1, 16:9, 9:16, 4:3
extra_body.google.image_config.image_sizestringCommon values include 1K and 2K
streambooleanSet to false for a complete image response
Terminal window
curl -X POST https://api.hiapi.ai/v1/chat/completions \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "Nano-Banana-2",
"stream": false,
"messages": [{"role": "user", "content": "Design a premium coffee brand social poster with a cold brew glass and minimal typography"}],
"extra_body": {
"google": {
"image_config": {"aspect_ratio": "4:3", "image_size": "2K"}
}
}
}'