# Nano Banana (Google Gemini Image)

## 1.Overview

An image generation/image editing model released by Google.

{% hint style="success" %}
This API is compatible with the OpenAI interface format.
{% endhint %}

**Model List:**

* `gemini-2.5-flash-image` (Nano-Banana)
* `gemini-3-pro-image-preview` (Nano-Banana-Pro)

{% hint style="warning" %}
This is a multimodal model. The description must explicitly include the scene to be drawn or explicitly request drawing. Simple words or phrases may not produce image output.
{% endhint %}

## 2. Request Description

* **Request Method**: `POST`
* **Request URL**:

  > `https://gateway.theturbo.ai/v1/images/edits`

***

## 3.Request Parameters

### 3.1 Header Parameters

| Parameter Name  | Type   | Required | Description                                                 | Example                                                                        |
| --------------- | ------ | -------- | ----------------------------------------------------------- | ------------------------------------------------------------------------------ |
| `Content-Type`  | string | Yes      | Sets the request header type, must be `multipart/form-data` | `multipart/form-data; boundary=------------------------y0QNRDhXQUE3yHQi7DEbLz` |
| `Accept`        | string | Yes      | Sets the response type, must be `application/json`          | `application/json`                                                             |
| `Authorization` | string | Yes      | API\_KEY for authentication, format `Bearer $YOUR_API_KEY`  | `Bearer $YOUR_API_KEY`                                                         |

### 3.2 Body Parameters (multipart/form-data)

| Parameter Name    | Type            | Required | Description                                                                                                                                                                                                               | Example (Default)        |
| ----------------- | --------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------ |
| **model**         | string          | Yes      | The model ID to use. See the available versions listed in the Overview, e.g., gemini-2.5-flash-image.                                                                                                                     | `gemini-2.5-flash-image` |
| **prompt**        | string          | Yes      | A text description of the desired image. (This is a multimodal model. The description must explicitly include the scene to be drawn or explicitly request drawing. Simple words or phrases may not produce image output.) | `A cute baby sea otter`  |
| **image**         | file/file array | No       | `gemini-2.5-flash-image` accepts up to 3 images as input, while `gemini-3-pro-image-preview` accepts up to 14 images, with 5 images achieving high fidelity.                                                              |                          |
| aspect\_ratio     | string          | No       | The aspect ratio of the image to generate. Supported aspect ratios: `1:1`, `2:3`, `3:2`, `3:4`, `4:3`, `4:5`, `5:4`, `9:16`, `16:9`, or `21:9`.                                                                           |                          |
| image\_size       | string          | No       | Specifies the size of the generated image. Supported values are 1K, 2K, 4K.                                                                                                                                               | `1K`                     |
| media\_resolution | string          | No       | Media resolution of the input media. `MEDIA_RESOLUTION_LOW` `MEDIA_RESOLUTION_MEDIUM` `MEDIA_RESOLUTION_HIGH`                                                                                                             |                          |

## 4.Request Examples

{% tabs %}
{% tab title="Single Image" %}

```http
curl -X POST https://gateway.theturbo.ai/v1/images/edits \
	-H "Authorization: Bearer $YOUR_API_KEY" \
	-F model="gemini-2.5-flash-image" \
	-F image="@input.png" \
	-F prompt="A cute baby sea otter wearing a beret" \
	-F other parameters
```

{% endtab %}

{% tab title="Multiple Images" %}

```sh
curl -X POST https://gateway.theturbo.ai/v1/images/edits \
	-H "Authorization: Bearer $YOUR_API_KEY" \
	-F model="gemini-2.5-flash-image" \
	-F image[]="@input1.png" \
	-F image[]="@input2.png" \
	-F prompt="A cute baby sea otter wearing a beret" \
	-F other parameters
```

{% endtab %}
{% endtabs %}

## 5.Response Example

```json
{
	"created": 1589478378,
	"data": [
		{
			"b64_json": "..."
		},
		{
			"b64_json": "..."
		}
	]
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.console.zenlayer.com/api-reference/compute/aig/image-edit/nano-banana-image-edit.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
