About Nano Banana 2
Nano Banana 2 is Google's Gemini Flash image model. It generates images from a text prompt, or edits one or more reference images when you pass them in, with strong prompt adherence and legible text rendering.
Ready to build with Nano Banana 2?
Try Nano Banana 2 in the Workbench to prompt it, compare outputs, and iterate on prompts without writing any code. When you're ready to ship, call the same model from our API and build your own apps on top of it.
curl -sSf -X POST https://hub.oxen.ai/api/ai/images/edit \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $OXEN_API_KEY" \
-d '{
"model": "nano-banana-2",
"prompt": "A cat sitting on a chair",
"aspect_ratio": "16:9",
"resolution": "2K",
"google_search": false,
"thinking_level": "minimal"
}'Request parameters
Every field Nano Banana 2 accepts in the request body. See the API reference for response formats.
POST
https://hub.oxen.ai/api/ai/images/edit| Field | Type | Required | Default | Description |
|---|---|---|---|---|
prompt | string | Yes | — | Text description of what you want to generate, or the instruction on how to edit the given image. Use @Image1, @Image2, etc. to reference the input images. |
input_image | array<string>nullable | No | — | Optional reference image(s) to edit. Leave empty to generate from the prompt alone. Reference them in the prompt as @Image1, @Image2, etc. |
aspect_ratio | string | No | "16:9" | auto1:116:99:164:33:43:22:34:55:421:94:11:48:11:8 |
resolution | string | No | "2K" | 5121K2K4K |
google_search | boolean | No | false | Ground the image in real-time web search results, useful for factual or current-events content like charts, maps, and recent events. |
thinking_level | string | No | "minimal" | How much the model reasons before generating. 'high' improves complex compositions at higher latency. It does not change the price, which is set by resolution alone.minimalhigh |