Skip to content

Nano Banana 2

google/nano-banana-2 — a image model by Google. Call it through the gateway’s standard OpenAI-compatible door using the catalog slug; the full parameter schema is reproduced in full below.

Catalog sluggoogle/nano-banana-2
Kindimage
VendorGoogle

Through the Sociaro SDK / OpenAI-compatible door

Section titled “Through the Sociaro SDK / OpenAI-compatible door”
from sociaro_ai import Sociaro
client = Sociaro(api_key="gw_live_...")
img = client.images.generate(
model="google/nano-banana-2",
prompt="a red fox in the snow",
# size / n / negative_prompt / seed … — see the schema below
)

Raw door: POST https://api.sociaro.com/v1/images/generations with {"model": "google/nano-banana-2", "prompt": "…"}. See media doors.

The complete, one-to-one API schema for this model, transcribed from the official source. Nothing omitted. Examples in the schema may use a representative model of the family — for this model use the slug google/nano-banana-2 as shown in How to call above.

Google’s Nano Banana image models are called through the gateway’s standard OpenAI-compatible image door POST /v1/images/generations using the catalog slug — the same contract every image model uses. You send the OpenAI Images request shape; the gateway routes it and returns an OpenAI Images response. Vendor-specific (Google) generation parameters are forwarded as-is when supplied.

nametyperequireddefaultallowed / rangedescription
modelstringyescatalog slugThe model to call (e.g. google/nano-banana-2).
promptstringyesText description of the desired image.
nintegerno1≥ 1Number of images to generate.
sizestringnoprovider defaultWxH (e.g. 1024x1024)Output resolution. Values the model accepts depend on the model.
response_formatstringnourlurl | b64_jsonReturn a URL or base64-encoded image.
userstringnoStable end-user identifier (abuse monitoring).

Vendor-native fields (Google Nano Banana / Gemini image — e.g. aspect ratio, resolution tier, reference images for editing) are passed through in the request body when provided; consult Google’s Nano Banana documentation for the full vendor parameter set. The gateway does not strip unknown fields.

{
"created": 1700000000,
"data": [
{ "url": "https://.../image.png" }
]
}

With response_format: "b64_json", each data[] item carries b64_json instead of url.

Terminal window
curl https://api.sociaro.com/v1/images/generations \
-H "Authorization: Bearer $SOCIARO_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "model": "google/nano-banana-2", "prompt": "a red fox in the snow", "n": 1 }'