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

# Overview

> Gemini image overview: Generations, native format, Chat image generation (text/image-to-image), Banana 2.1 PDF/video references, and Thinking levels.

# Gemini image overview

Common ways to call Gemini image models on Omniall AI:

| Menu | Path | Notes |
| - | - | - |
| Generations | `POST /v1/images/generations` | OpenAI Images entry |
| Gemini native format | `POST /v1beta/models/{model}:generateContent` | Native `responseModalities` + `imageConfig`; image / PDF / short-video `inlineData` |
| Chat image generation | `POST /v1/chat/completions` | One Chat endpoint: text-to-image / image-to-image / multi-ref; Banana 2.1 also `file` (PDF) and `video_url` |

Aspect ratio / resolution via `extra_body.google.image_config` (Chat) or `generationConfig.imageConfig` (native), e.g. `aspect_ratio` / `aspectRatio`, `image_size` / `imageSize` (`1K` / `2K` / `4K`).

Pick `model` from the [Model Square](https://omniall.ai/pricing).

## Banana 2.1 (`gemini-nano-banana-2.1`)

Supports text-to-image, image-to-image, plus **PDF** and **short video** reference generation.

| Style | Reference input | Notes |
| - | - | - |
| Native `generateContent` | `parts[].inlineData` | `mimeType`: `image/*`, `application/pdf`, `video/mp4`; raw Base64 (no `data:` prefix) |
| Chat Completions | `image_url` / `file` / `video_url` | Gateway downloads URLs or decodes data URLs → upstream `inlineData`; **PDF URL and video URL supported** |

### Chat: PDF URL

```json theme={null}
{
  "model": "gemini-nano-banana-2.1",
  "stream": false,
  "extra_body": {
    "google": {
      "image_config": { "aspect_ratio": "3:2", "image_size": "1K" }
    }
  },
  "messages": [{
    "role": "user",
    "content": [
      { "type": "text", "text": "Read the PDF, list page info, then generate a white-background reference image." },
      {
        "type": "file",
        "file": {
          "filename": "reference.pdf",
          "file_data": "https://example.com/reference.pdf"
        }
      }
    ]
  }]
}
```

### Chat: video URL

```json theme={null}
{
  "model": "gemini-nano-banana-2.1",
  "stream": false,
  "extra_body": {
    "google": {
      "image_config": { "aspect_ratio": "3:2", "image_size": "1K" }
    }
  },
  "messages": [{
    "role": "user",
    "content": [
      { "type": "text", "text": "Watch the video and generate a reference image in scene order." },
      { "type": "video_url", "video_url": "https://example.com/clip.mp4" }
    ]
  }]
}
```

Notes:

* Pass `video_url` as a **string**, not `{ "url": "..." }`
* `file` requires both `filename` and `file_data`
* URLs must be publicly downloadable; default download limit \~64MB; prefer short MP4 / small PDF
* Full curl / native examples: [Gemini native format](/api-reference/endpoints/gemini-native-image) and [Chat image generation](/api-reference/endpoints/gemini-chat-image)

### Optional: Thinking levels

`gemini-nano-banana-2.1` supports official Thinking. For typical integrations you can **omit** this config and use the default level.

| Level | Notes |
| - | - |
| `minimal` | Lower latency, less thinking |
| `medium` | Default |
| `high` | More thinking effort; gains depend on the task |

| Field | Role |
| - | - |
| `thinkingLevel` / `thinking_level` | Thinking level (table above) |
| `includeThoughts` / `include_thoughts` | Whether to return thought text in the response; does **not** disable internal thinking |

Usage may include `reasoning_tokens` / `thoughtsTokenCount` for thinking cost, regardless of whether thought text is returned.

**Native** — under `generationConfig.thinkingConfig`:

```json theme={null}
{
  "generationConfig": {
    "responseModalities": ["TEXT", "IMAGE"],
    "imageConfig": { "imageSize": "1K", "aspectRatio": "3:2" },
    "thinkingConfig": {
      "thinkingLevel": "high",
      "includeThoughts": false
    }
  }
}
```

**Chat** — under `extra_body.google.thinking_config` (snake\_case required):

```json theme={null}
{
  "model": "gemini-nano-banana-2.1",
  "messages": [{
    "role": "user",
    "content": [
      { "type": "text", "text": "Watch the video and generate a character-consistent reference image." },
      { "type": "video_url", "video_url": "https://example.com/clip.mp4" }
    ]
  }],
  "extra_body": {
    "google": {
      "image_config": { "aspect_ratio": "16:9", "image_size": "1K" },
      "thinking_config": {
        "thinking_level": "high",
        "include_thoughts": false
      }
    }
  }
}
```

Notes: In Chat use `thinking_config` / `thinking_level` — camelCase `thinkingConfig` is rejected. When parsing the response, walk all `parts` and skip items with `thought: true` before reading the image.

Other model examples: `gemini-3.1-flash-image-preview`, `gemini-3-pro-image-preview` (per Model Square).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.