> ## Documentation Index
> Fetch the complete documentation index at: https://docs.routerbase.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Nano Banana — Text-to-Image

> Generate images from text prompts with Google Nano Banana (Gemini 2.5 Flash Image).

|              |                                     |
| ------------ | ----------------------------------- |
| **Model ID** | `google/gemini-2-5-flash-image-t2i` |
| **Family**   | `gemini-2-5-flash-image`            |
| **Task**     | `text-to-image`                     |
| **Provider** | Google                              |
| **Modality** | Image                               |

## Parameters

<ParamField body="prompt" type="string" required>
  Text description of the image to generate.
</ParamField>

<ParamField body="aspect_ratio" type="string">
  Output aspect ratio. One of `1:1`, `2:3`, `3:2`, `3:4`, `4:3`, `4:5`, `5:4`, `9:16`, `16:9`, `21:9`. Default: `1:1`.
</ParamField>

<ParamField body="size" type="string">
  Output resolution. One of `1K`, `2K`, `4K`. Default: `1K`.
</ParamField>

<ParamField body="output_format" type="string">
  Encoding of the returned image. One of `image/png`, `image/jpeg`, `image/webp`. Default: `image/png`.
</ParamField>

<ParamField body="callback_url" type="string">
  Webhook URL for completion notification.
</ParamField>

## Example

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST https://routerbase.com/v1/images/generations \
    -H "Authorization: Bearer sk-rb-xxxxxxxxxxxx" \
    -H "Content-Type: application/json" \
    -d '{
      "model": "google/gemini-2-5-flash-image-t2i",
      "prompt": "A photorealistic portrait of a red fox in a snowy forest",
      "aspect_ratio": "16:9",
      "size": "2K"
    }'
  ```

  ```python Python theme={null}
  from openai import OpenAI

  client = OpenAI(
      api_key="sk-rb-xxxxxxxxxxxx",
      base_url="https://routerbase.com/v1",
  )

  img = client.images.generate(
      model="google/gemini-2-5-flash-image-t2i",
      prompt="A photorealistic portrait of a red fox in a snowy forest",
      extra_body={"aspect_ratio": "16:9", "size": "2K"},
  )
  print(img.data[0].url)
  ```
</CodeGroup>
