Skip to content

Commit 57443b1

Browse files
techpro-aimlapigitbook-bot
authored andcommitted
GITBOOK-534: docs: add nanobabanans pros
1 parent bcb9357 commit 57443b1

8 files changed

Lines changed: 291 additions & 18 deletions

File tree

1.5 MB
Loading
1.84 MB
Loading

docs/SUMMARY.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,9 @@
166166
* [Imagen 4 Fast Generate](api-references/image-models/google/imagen-4-fast-generate.md)
167167
* [Imagen 4 Ultra Generate](api-references/image-models/google/imagen-4-ultra-generate.md)
168168
* [Gemini 2.5 Flash Image (Nano Banana)](api-references/image-models/google/gemini-2.5-flash-image.md)
169-
* [Gemini 2.5 Flash Image Edit](api-references/image-models/google/gemini-2.5-flash-image-edit.md)
169+
* [Gemini 2.5 Flash Image Edit (Nano Banana)](api-references/image-models/google/gemini-2.5-flash-image-edit.md)
170+
* [Gemini 3 Pro Image Preview (Nano Banana Pro Preview)](api-references/image-models/google/gemini-3-pro-image-preview.md)
171+
* [Gemini 3 Pro Image Preview Edit (Nano Banana Pro Preview)](api-references/image-models/google/gemini-3-pro-image-preview-edit.md)
170172
* [OpenAI](api-references/image-models/OpenAI/README.md)
171173
* [DALL·E 2](api-references/image-models/OpenAI/dall-e-2.md)
172174
* [DALL·E 3](api-references/image-models/OpenAI/dall-e-3.md)

docs/api-references/image-models/README.md

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

docs/api-references/image-models/google/gemini-2.5-flash-image-edit.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
# Gemini 2.5 Flash Image Edit
1+
# Gemini 2.5 Flash Image Edit (Nano Banana)
22

33
{% columns %}
4-
{% column %}
4+
{% column width="66.66666666666666%" %}
55
{% hint style="info" %}
66
This documentation is valid for the following list of our models:
77

88
* `google/gemini-2.5-flash-image-edit`
99
{% endhint %}
1010
{% endcolumn %}
1111

12-
{% column %}
12+
{% column width="33.33333333333334%" %}
1313

1414
{% endcolumn %}
1515
{% endcolumns %}
@@ -28,18 +28,18 @@ If you don’t have an API key for the AI/ML API yet, feel free to use our [Quic
2828

2929
<summary>Aspect ratio/Resolution Table</summary>
3030

31-
| Aspect ratio | Resolution | Tokens |
32-
| ------------ | ---------- | ------ |
33-
| 1:1 | 1024×1024 | 1290 |
34-
| 2:3 | 832×1248 | 1290 |
35-
| 3:2 | 1248×832 | 1290 |
36-
| 3:4 | 864×1184 | 1290 |
37-
| 4:3 | 1184×864 | 1290 |
38-
| 4:5 | 896×1152 | 1290 |
39-
| 5:4 | 1152×896 | 1290 |
40-
| 9:16 | 768×1344 | 1290 |
41-
| 16:9 | 1344×768 | 1290 |
42-
| 21:9 | 1536×672 | 1290 |
31+
| Aspect ratio | Resolution | Credits |
32+
| ------------ | ---------- | ------- |
33+
| 1:1 | 1024×1024 | 84 000 |
34+
| 2:3 | 832×1248 | 84 000 |
35+
| 3:2 | 1248×832 | 84 000 |
36+
| 3:4 | 864×1184 | 84 000 |
37+
| 4:3 | 1184×864 | 84 000 |
38+
| 4:5 | 896×1152 | 84 000 |
39+
| 5:4 | 1152×896 | 84 000 |
40+
| 9:16 | 768×1344 | 84 000 |
41+
| 16:9 | 1344×768 | 84 000 |
42+
| 21:9 | 1536×672 | 84 000 |
4343

4444
</details>
4545

Lines changed: 144 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,144 @@
1+
# Gemini 3 Pro Image Preview Edit (Nano Banana Pro Preview)
2+
3+
{% columns %}
4+
{% column width="66.66666666666666%" %}
5+
{% hint style="info" %}
6+
This documentation is valid for the following list of our models:
7+
8+
* `google/gemini-3-pro-image-preview-edit`
9+
{% endhint %}
10+
{% endcolumn %}
11+
12+
{% column width="33.33333333333334%" %}
13+
14+
{% endcolumn %}
15+
{% endcolumns %}
16+
17+
## Model Overview
18+
19+
Google’s smartest image-to-image model as of November 2025 (preview release). The model takes multiple images as input, with the prompt defining how they are used or combined.
20+
21+
## Setup your API Key
22+
23+
If you don’t have an API key for the AI/ML API yet, feel free to use our [Quickstart guide](https://docs.aimlapi.com/quickstart/setting-up).
24+
25+
## API Schema
26+
27+
<details>
28+
29+
<summary>Aspect ratio/Resolution Table</summary>
30+
31+
| Aspect ratio | Resolution | Credits |
32+
| ------------ | ---------- | ------- |
33+
| 1:1 | 1024×1024 | 315 000 |
34+
| 2:3 | 832×1248 | 315 000 |
35+
| 3:2 | 1248×832 | 315 000 |
36+
| 3:4 | 864×1184 | 315 000 |
37+
| 4:3 | 1184×864 | 315 000 |
38+
| 4:5 | 896×1152 | 315 000 |
39+
| 5:4 | 1152×896 | 315 000 |
40+
| 9:16 | 768×1344 | 315 000 |
41+
| 16:9 | 1344×768 | 315 000 |
42+
| 21:9 | 1536×672 | 315 000 |
43+
44+
</details>
45+
46+
{% openapi-operation spec="gemini-3-pro-image-preview-edit" path="/v1/images/generations" method="post" %}
47+
[OpenAPI gemini-3-pro-image-preview-edit](https://raw.githubusercontent.com/aimlapi/api-docs/refs/heads/main/docs/api-references/image-models/Google/gemini-3-pro-image-preview-edit.json)
48+
{% endopenapi-operation %}
49+
50+
## Quick Example
51+
52+
Let's generate an image of the specified size using a simple prompt.
53+
54+
{% tabs %}
55+
{% tab title="Python" %}
56+
{% code overflow="wrap" %}
57+
```python
58+
import requests
59+
import json
60+
61+
def main():
62+
response = requests.post(
63+
"https://api.aimlapi.com/v1/images/generations",
64+
headers={
65+
# Insert your AIML API Key instead of <YOUR_AIMLAPI_KEY>:
66+
"Authorization": "Bearer <YOUR_AIMLAPI_KEY>",
67+
"Content-Type": "application/json",
68+
},
69+
json={
70+
"model": "google/gemini-3-pro-image-preview-edit",
71+
"image_urls": [
72+
"https://raw.githubusercontent.com/aimlapi/api-docs/main/reference-files/t-rex.png",
73+
"https://raw.githubusercontent.com/aimlapi/api-docs/main/reference-files/blue-mug.jpg"
74+
],
75+
"prompt": "Combine the images so the T-Rex is wearing a business suit, sitting in a cozy small café, drinking from the mug. Blur the background slightly to create a bokeh effect.",
76+
}
77+
)
78+
79+
data = response.json()
80+
print(json.dumps(data, indent=2, ensure_ascii=False))
81+
82+
if __name__ == "__main__":
83+
main()
84+
```
85+
{% endcode %}
86+
{% endtab %}
87+
88+
{% tab title="JS" %}
89+
{% code overflow="wrap" %}
90+
```javascript
91+
async function main() {
92+
const response = await fetch('https://api.aimlapi.com/v1/images/generations', {
93+
method: 'POST',
94+
headers: {
95+
// Insert your AIML API Key instead of <YOUR_AIMLAPI_KEY>:
96+
'Authorization': 'Bearer <YOUR_AIMLAPI_KEY>',
97+
'Content-Type': 'application/json',
98+
},
99+
body: JSON.stringify({
100+
model: 'google/gemini-3-pro-image-preview-edit',
101+
image_urls: [
102+
'https://raw.githubusercontent.com/aimlapi/api-docs/main/reference-files/t-rex.png',
103+
'https://raw.githubusercontent.com/aimlapi/api-docs/main/reference-files/blue-mug.jpg'
104+
],
105+
prompt: 'Combine the images so the T-Rex is wearing a business suit, sitting in a cozy small café, drinking from the mug. Blur the background slightly to create a bokeh effect.',
106+
}),
107+
});
108+
}
109+
110+
main();
111+
```
112+
{% endcode %}
113+
{% endtab %}
114+
{% endtabs %}
115+
116+
<details>
117+
118+
<summary>Response</summary>
119+
120+
{% code overflow="wrap" %}
121+
```json5
122+
{
123+
"description": "",
124+
"data": [
125+
{
126+
"url": "https://cdn.aimlapi.com/flamingo/files/b/koala/qnutcal6jcrPr43jMp_Xg.png",
127+
"content_type": "image/png",
128+
"width": null,
129+
"height": null,
130+
"file_name": "qnutcal6jcrPr43jMp_Xg.png"
131+
}
132+
],
133+
"meta": {
134+
"usage": {
135+
"tokens_used": 315000
136+
}
137+
}
138+
}
139+
```
140+
{% endcode %}
141+
142+
</details>
143+
144+
<table data-full-width="false"><thead><tr><th width="320.4666748046875" valign="top">Reference Images</th><th valign="top">Generated Image</th></tr></thead><tbody><tr><td valign="top"><div><figure><img src="../../../.gitbook/assets/t-rex (1) (1).png" alt=""><figcaption><p>Image #1</p></figcaption></figure></div></td><td valign="top"><div><figure><img src="../../../.gitbook/assets/gemini-3-pro-image-preview-edit.png" alt=""><figcaption><p><kbd><code>"Combine the images so the T-Rex is wearing a business suit, sitting in a cozy small café, drinking from the mug. Blur the background slightly to create a bokeh effect."</code></kbd></p></figcaption></figure></div></td></tr><tr><td valign="top"><div><figure><img src="../../../.gitbook/assets/blue-mug (1).jpg" alt=""><figcaption><p>Image #2</p></figcaption></figure></div></td><td valign="top"></td></tr></tbody></table>
Lines changed: 127 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,127 @@
1+
# Gemini 3 Pro Image Preview (Nano Banana Pro Preview)
2+
3+
{% columns %}
4+
{% column width="66.66666666666666%" %}
5+
{% hint style="info" %}
6+
This documentation is valid for the following list of our models:
7+
8+
* `google/gemini-3-pro-image-preview`
9+
{% endhint %}
10+
{% endcolumn %}
11+
12+
{% column width="33.33333333333334%" %}
13+
<a href="https://aimlapi.com/app/?model=google/gemini-3-pro-image-preview&#x26;mode=image" class="button primary">Try in Playground</a>
14+
{% endcolumn %}
15+
{% endcolumns %}
16+
17+
## Model Overview <a href="#model-overview" id="model-overview"></a>
18+
19+
Google’s smartest text-to-image model as of November 2025 (preview release).
20+
21+
{% hint style="info" %}
22+
Images produced or modified with this model carry an invisible SynthID digital watermark, allowing them to be recognized as AI-generated or edited.
23+
{% endhint %}
24+
25+
## Setup your API Key <a href="#setup-your-api-key" id="setup-your-api-key"></a>
26+
27+
If you don’t have an API key for the AI/ML API yet, feel free to use our [Quickstart guide](https://docs.aimlapi.com/quickstart/setting-up).
28+
29+
## API Schema
30+
31+
{% openapi-operation spec="gemini-3-pro-image-preview" path="/v1/images/generations" method="post" %}
32+
[OpenAPI gemini-3-pro-image-preview](https://raw.githubusercontent.com/aimlapi/api-docs/refs/heads/main/docs/api-references/image-models/Google/gemini-3-pro-image-preview.json)
33+
{% endopenapi-operation %}
34+
35+
## Quick Example
36+
37+
Let's generate an image of the specified aspect ratio using a simple prompt.
38+
39+
{% tabs %}
40+
{% tab title="Python" %}
41+
{% code overflow="wrap" %}
42+
```python
43+
import requests
44+
import json
45+
46+
def main():
47+
response = requests.post(
48+
"https://api.aimlapi.com/v1/images/generations",
49+
headers={
50+
# Insert your AIML API Key instead of <YOUR_AIMLAPI_KEY>:
51+
"Authorization": "Bearer <YOUR_AIMLAPI_KEY>",
52+
"Content-Type": "application/json",
53+
},
54+
json={
55+
"model": "google/gemini-3-pro-image-preview",
56+
"prompt": "Racoon eating ice-cream"
57+
}
58+
)
59+
60+
data = response.json()
61+
print(json.dumps(data, indent=2, ensure_ascii=False))
62+
63+
if __name__ == "__main__":
64+
main()
65+
```
66+
{% endcode %}
67+
{% endtab %}
68+
69+
{% tab title="JS" %}
70+
{% code overflow="wrap" %}
71+
```javascript
72+
async function main() {
73+
const response = await fetch('https://api.aimlapi.com/v1/images/generations', {
74+
method: 'POST',
75+
headers: {
76+
// Insert your AIML API Key instead of <YOUR_AIMLAPI_KEY>:
77+
'Authorization': 'Bearer <YOUR_AIMLAPI_KEY>',
78+
'Content-Type': 'application/json',
79+
},
80+
body: JSON.stringify({
81+
model: 'google/gemini-3-pro-image-preview',
82+
prompt: 'Racoon eating ice-cream',
83+
aspect_ratio: '16:9'
84+
}),
85+
});
86+
87+
const data = await response.json();
88+
console.log(data);
89+
}
90+
91+
main();
92+
```
93+
{% endcode %}
94+
{% endtab %}
95+
{% endtabs %}
96+
97+
<details>
98+
99+
<summary>Response</summary>
100+
101+
{% code overflow="wrap" %}
102+
```json5
103+
{
104+
"description": "",
105+
"data": [
106+
{
107+
"url": "https://cdn.aimlapi.com/flamingo/files/b/monkey/rvEPfEJe--7Nf41TwCGy3.png",
108+
"content_type": "image/png",
109+
"width": null,
110+
"height": null,
111+
"file_name": "rvEPfEJe--7Nf41TwCGy3.png"
112+
}
113+
],
114+
"meta": {
115+
"usage": {
116+
"tokens_used": 315000
117+
}
118+
}
119+
}
120+
```
121+
{% endcode %}
122+
123+
</details>
124+
125+
So we obtained the following 1024x1024 image by running this code example:
126+
127+
<figure><img src="../../../.gitbook/assets/nano_banana_pro.png" alt=""><figcaption><p>In reality, raccoons shouldn’t be given ice cream or chocolate—it’s harmful to their metabolism.<br>But in the AI world, raccoons party like there’s no tomorrow.</p></figcaption></figure>

docs/api-references/model-database.md

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)