Nano Banana v2

nano-banana-v2

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.

Published price
From $0.497 / 1M tokens
Billing unit
/ 1M tokens
Context / Max output
— / —
Listed routes
2
Base URL
https://api.openany.si/v1
POST
/v1/images
Authentication
Authorization: Bearer $OPENANY_API_KEY

Provider

Published price $0.497 / 1M tokens

Request parameters

ParameterType / rangeDefault valueRequiredDescription
modelstring—YesThe model to use
contentsarray—NoConversation content sent to the model.
generationConfigobject—NoGeneration and output configuration options.
logoAddinteger · 0 | 11NoSwitch 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.
logoParamobject—NoLogo or label configuration. By default, generated images include an AI-generated image label in the bottom-right corner. Custom label assets require console approval.
toolsarray—NoTool 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

JSON
{
  "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."
    }
  }
}

Model API questions

How do I call Nano Banana v2 through OpenAny?

Use model ID nano-banana-v2 with an OpenAny key and the operation published in this model's API tab. The model API base is https://api.openany.si/v1. Confirm the protocol and request schema; model availability does not imply every OpenAI API operation is supported.

How is Nano Banana v2 billed?

Compare the published rate and billing unit of the selected provider route. Input, output and cache token rates may differ. Image, audio and video models can use other units. Recorded usage determines the charge under that route's billing contract.

Are Community and Verified routes the same as an official publisher API?

No. Inspect the provider name and supply classification for the specific route. A marketplace listing or a supply label is not a claim of publisher endorsement, identical service or measured uptime. Different route prices may reflect different supply and conditions.

Where do these prices come from, and when were they updated?

Rates come from the provider routes in OpenAny's public model catalog, not an independent quote from the model publisher. The catalog does not supply a price update timestamp. A page or catalog snapshot date is not a price revision date. Compare supply, billing units, tiers and conditions; a lower listed rate alone does not establish equivalent service or explain the price difference.

Use Nano Banana v2 with your agent

Inspect endpoint contracts and confirm availability and pricing before a paid call.