Nano Banana v2
nano-banana-v2Use the Nano Banana V2 API for image generation and editing. Use a text prompt to create a new image or provide a reference for an edit. Make product image variations or explore design changes from a reference. Compare the available provider routes, request examples, and usage prices on OpenAny.
Auto route pricing
Route source: Tencent
- Input / Output
- Input: $0.497Output: $3.007
- Cache read / write
- Cache read: Price not suppliedCache write: Price not supplied
- Context / Max output
- — / —
- Live routes
- 2
Rates / 1M tokens
Image output: $48.077
These are separate usage rates, not a total request price.
On this page
Overview
Use the Nano Banana V2 API for image generation and editing. Use a text prompt to create a new image or provide a reference for an edit. Make product image variations or explore design changes from a reference. Compare the available provider routes, request examples, and usage prices on OpenAny.
Playground
Result preview
Tencent · 124ms
This example shows the response structure. Generated images appear here after the run completes.
{
"status": "succeeded",
"created": 1789393017,
"openany_cost": 0
}Agent handoff preview
Providers
| Provider | Pricing | Latency | Uptime | Supply | Route |
|---|---|---|---|---|---|
Live | Input $0.012 / image | 21ms | — | Verified | |
Live | Input $0.497 / 1M tokens Output $3.007 Cache read — Cache write — | 124ms | — | Verified |
- Input
- $0.497
- Text / reasoning output
- $3.007
- Image output
- $48.077
Source: the selected provider route in OpenAny's public model catalog. A price update timestamp is not supplied.
API
- Base URL
https://api.openany.si/v1- POST
/v1/images- Authentication
Authorization: Bearer $OPENANY_API_KEY
Request parameters
| Parameter | Type / range | Default value | Required | Description |
|---|---|---|---|---|
model | string | — | Yes | The model to use |
contents | array | — | No | Conversation content sent to the model. |
generationConfig | object | — | No | Generation and output configuration options. |
logoAdd | integer · 0 | 1 | 1 | No | Switch for adding an AI-generated content label. 1 adds the label, 0 disables it only after console approval. Other values are treated as 1 by default. |
logoParam | object | — | No | Logo or label configuration. By default, generated images include an AI-generated image label in the bottom-right corner. Custom label assets require console approval. |
tools | array | — | No | Tool configuration array. Can be used to enable Google search capabilities. |
Request example
curl 'https://api.openany.si/v1/images' \
-H "Authorization: Bearer $OPENANY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"contents": [
{
"parts": [
{
"text": "A simple blue circle on white background"
}
],
"role": "user"
}
],
"generationConfig": {
"imageConfig": {
"aspectRatio": "1:1",
"imageSize": "1K"
},
"responseModalities": [
"IMAGE"
]
},
"model": "nano-banana-v2",
"logoAdd": 1
}'Response example
Configured response example · not a live result
{
"status": "succeeded",
"created": 1789393017,
"openany_cost": 0
}Error handling
400Check the model ID and request fields.429Retry with exponential backoff.5xxRetry only temporary provider failures.JSON Schema
{
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"required": [
"model"
],
"properties": {
"model": {
"type": "string",
"description": "The model to use"
},
"tools": {
"type": "array",
"items": {
"type": "object",
"properties": {
"googleSearch": {
"type": "object",
"properties": {
"searchTypes": {
"type": "object",
"properties": {
"imageSearch": {
"type": "object",
"description": "Image search configuration. Providing this object enables image search capability."
}
},
"description": "Search type configuration used to specify enabled search capabilities."
}
},
"description": "Google Search tool configuration. Providing this object enables web search capability."
}
}
},
"description": "Tool configuration array. Can be used to enable Google search capabilities."
},
"logoAdd": {
"enum": [
0,
1
],
"type": "integer",
"default": 1,
"description": "Switch for adding an AI-generated content label. 1 adds the label, 0 disables it only after console approval. Other values are treated as 1 by default."
},
"contents": {
"type": "array",
"items": {
"type": "object",
"properties": {
"role": {
"type": "string",
"description": "Message role, such as user."
},
"parts": {
"type": "array",
"items": {
"type": "object",
"properties": {
"text": {
"type": "string",
"description": "Text content. Must not be empty when provided. Chinese is recommended. Maximum length is 60,000 characters."
},
"inlineData": {
"type": "object",
"properties": {
"data": {
"type": "string",
"description": "Inline image data or accessible image URL. Supports 1 to 11 images in total. Supported formats are png, jpg, jpeg, and webp. Base64 size must not exceed 10 MB."
},
"mimeType": {
"type": "string",
"description": "IANA MIME type of the source data, such as image/png."
}
},
"description": "Inline media bytes or media reference data."
}
}
},
"description": "Ordered parts that make up a single message. Parts may have different MIME types."
}
}
},
"description": "Conversation content sent to the model."
},
"logoParam": {
"type": "object",
"description": "Logo or label configuration. By default, generated images include an AI-generated image label in the bottom-right corner. Custom label assets require console approval."
},
"generationConfig": {
"type": "object",
"properties": {
"imageConfig": {
"type": "object",
"properties": {
"imageSize": {
"enum": [
"1K",
"2K",
"4K"
],
"type": "string",
"default": "2K",
"description": "Image resolution. Supported values are 1K, 2K, and 4K."
},
"aspectRatio": {
"enum": [
"1:1",
"1:4",
"1:8",
"2:3",
"3:2",
"3:4",
"4:1",
"4:3",
"4:5",
"5:4",
"8:1",
"9:16",
"16:9",
"21:9"
],
"type": "string",
"description": "Image aspect ratio."
}
},
"description": "Image generation configuration. Unsupported models may return an error when this field is set."
},
"thinkingConfig": {
"type": "object",
"properties": {
"thinkingLevel": {
"enum": [
"Minimal",
"High"
],
"type": "string",
"default": "Minimal",
"description": "Controls the amount of model thinking to balance quality and latency."
}
},
"description": "Thinking mode configuration for the model."
}
},
"description": "Generation and output configuration options."
}
}
}Examples
Request example
POST /v1/imagescurl 'https://api.openany.si/v1/images' \
-H "Authorization: Bearer $OPENANY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"contents": [
{
"parts": [
{
"text": "A simple blue circle on white background"
}
],
"role": "user"
}
],
"generationConfig": {
"imageConfig": {
"aspectRatio": "1:1",
"imageSize": "1K"
},
"responseModalities": [
"IMAGE"
]
},
"model": "nano-banana-v2",
"logoAdd": 1
}'