Nano Banana Pro
nano-banana-proUse the Nano Banana Pro API for image generation and editing. Use a text prompt to create a new image or provide a reference for an edit. Create illustrations, design concepts, and visual assets. Compare the available provider routes, request examples, and usage prices on OpenAny.
Auto route pricing
Route source: Tencent
- Input / Output
- Input: $2.000Output: $12.014
- Cache read / write
- Cache read: Price not suppliedCache write: Price not supplied
- Context / Max output
- — / —
- Live routes
- 2
Rates / 1M tokens
Image output: $96.143
These are separate usage rates, not a total request price.
On this page
Overview
Use the Nano Banana Pro API for image generation and editing. Use a text prompt to create a new image or provide a reference for an edit. Create illustrations, design concepts, and visual assets. Compare the available provider routes, request examples, and usage prices on OpenAny.
Playground
Result preview
Tencent · 129ms
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.020 / image | 1011ms | — | Verified | |
Live | Input $2.000 / 1M tokens Output $12.014 Cache read — Cache write — | 129ms | — | Verified |
- Input
- $2.000
- Text / reasoning output
- $12.014
- Image output
- $96.143
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 | The current conversation content sent to the model. |
generationConfig | object | — | No | Model generation and output configuration. |
logoAdd | integer · 0 | 1 | 1 | No | Switch for adding a label to generated images. 1 means add label; 0 means do not add label. Value 0 requires approval in Tencent Cloud TokenHub configuration to take effect. Other values are treated as 1 by default. |
logoParam | object | — | No | Label content settings. By default, generated images include a label such as 'Image generated by AI' in the bottom-right corner. Custom label images require approval in Tencent Cloud TokenHub configuration. |
route | object | — | No | OpenModel route configuration, including provider and other routing parameters. Example: {"provider":"openai"}. |
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-pro",
"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"
},
"route": {
"type": "object",
"description": "OpenModel route configuration, including provider and other routing parameters. Example: {\"provider\":\"openai\"}."
},
"logoAdd": {
"enum": [
0,
1
],
"type": "integer",
"default": 1,
"description": "Switch for adding a label to generated images. 1 means add label; 0 means do not add label. Value 0 requires approval in Tencent Cloud TokenHub configuration to take effect. Other values are treated as 1 by default."
},
"contents": {
"type": "array",
"items": {
"type": "object",
"properties": {
"role": {
"type": "string",
"description": "Message role, for example: user."
},
"parts": {
"type": "array",
"items": {
"type": "object",
"properties": {
"text": {
"type": "string",
"description": "Text prompt content. Must not be empty. Chinese is recommended. Maximum length: 60000 characters."
},
"inlineData": {
"type": "object",
"properties": {
"data": {
"type": "string",
"description": "Image URL or base64 image data. Supports 1 to 11 images. Recommended: up to 6 high-fidelity object images and up to 5 portrait images for character consistency. Supported formats: png, jpg, jpeg, webp. Base64 size must not exceed 10 MB."
},
"mimeType": {
"type": "string",
"description": "IANA standard MIME type of the source data, for example: image/png."
}
},
"description": "Inline media bytes."
}
}
},
"description": "Ordered parts that make up a single message. Parts may use different MIME types."
}
}
},
"description": "The current conversation content sent to the model."
},
"logoParam": {
"type": "object",
"description": "Label content settings. By default, generated images include a label such as 'Image generated by AI' in the bottom-right corner. Custom label images require approval in Tencent Cloud TokenHub configuration."
},
"generationConfig": {
"type": "object",
"properties": {
"imageConfig": {
"type": "object",
"properties": {
"imageSize": {
"enum": [
"1K",
"2K",
"4K"
],
"type": "string",
"default": "2K",
"description": "Image resolution. Default value is 2K."
},
"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. If this field is set for a model that does not support these options, the system will return an error."
},
"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": "Configuration for the model thinking mode."
}
},
"description": "Model generation and output configuration."
}
}
}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-pro",
"logoAdd": 1
}'