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

# Gemini API: the model lineup, long context and multimodality

> The whole Gemini lineup — Pro, Flash, Flash-Lite and image-generation models. A very large context window, image input and image generation, which version to pick and how to connect.

Google's Gemini is the most multimodal lineup on RuAPI: the models read text **and images**, and some of them **generate images** too. Add a very large context window and several tiers — from the lightweight Flash-Lite to the heavyweight Pro. Below we walk through the whole lineup and how to pick a version for the task. Every model speaks the OpenAI-compatible protocol — connecting is covered in the [Quickstart](/en/quickstart).

## The whole Gemini lineup

| Tier           | Good for                                          | Speed / cost                |
| -------------- | ------------------------------------------------- | --------------------------- |
| **Pro**        | Complex code, reasoning, parsing large documents  | Slower, pricier             |
| **Flash**      | All-rounder: chatbots, assistants, medium volume  | Fast, mid-priced            |
| **Flash-Lite** | Bulk processing, classification, tagging at scale | Fastest and cheapest        |
| **Image**      | Image generation and editing                      | Dedicated generation models |

<Tip>
  Start with **Flash** as the sweet spot. Hitting speed or cost limits at high volume? Drop to **Flash-Lite**. Short on depth for a hard task? Move up to **Pro**.
</Tip>

## A very large context window

Gemini's traditional strong suit is its **huge context**: whole reports, long logs and large codebases fit in the window without chunking. That's handy for document parsing, RAG with large fragments, and analyzing long conversations. The exact limit depends on the version and matches Google's official one — check the current values on the **Pricing** page at [www.ruapi.ai](https://www.ruapi.ai).

## Multimodal: reads images and generates them

<Info>
  Gemini works with images both ways. **On input** (vision) the models take images alongside text — see the [image input guide](/en/vision) for how to send an image in the request. **On output** dedicated models generate and edit images: `gemini-2.5-flash-image`, `gemini-3.1-flash-image-preview`, `gemini-3-pro-image-preview`. The exact current names of these preview models are on the Pricing page.
</Info>

The text models in the lineup are `gemini-3.5-flash`, `gemini-3.1-pro-preview`, `gemini-2.5-pro`, `gemini-2.5-flash`, `gemini-2.5-flash-lite`. They can [call functions](/en/function-calling) and [stream the response](/en/streaming) token by token.

## Which version to pick (2.5 / 3 / 3.1 / 3.5 / 3.6)

* **2.5** (`gemini-2.5-pro`, `gemini-2.5-flash`, `gemini-2.5-flash-lite`) — the mature, stable generation and a good default choice.
* **3 / 3.1** — newer models, including preview versions (`gemini-3-flash-preview`, `gemini-3.1-pro-preview`, `gemini-3.1-flash-lite-preview`) and image generation; reach for them for the latest capabilities, keeping in mind preview names can change.
* **3.5** (`gemini-3.5-flash`, `gemini-3.5-flash-lite`) — the fresh Flash generation: `-flash-lite` is noticeably cheaper and faster, `-flash` is stronger.
* **3.6** (`gemini-3.6-flash`) — the newest Flash generation and the current pick for new code.

<Note>
  Preview models change names as newer versions ship. Don't hardcode IDs — the exact current names and per-token prices are always on the **Pricing** page at [www.ruapi.ai](https://www.ruapi.ai).
</Note>

## Connecting Gemini

You don't need Google's separate library: the endpoint is **OpenAI-compatible**, so take any OpenAI SDK and change the `base_url`.

* **base\_url:** `https://www.ruapi.ai/v1`
* **model:** e.g. `gemini-3.6-flash`

The same key works in Cursor, Cline, n8n and LangChain. Step-by-step Python and curl code is in the [Quickstart](/en/quickstart). You can top up your balance in the [top-up section](/en/topup).

## Next

<CardGroup cols={2}>
  <Card title="Connect and first request" icon="bolt" href="/en/quickstart">
    base\_url, key, Python and curl code.
  </Card>

  <Card title="Claude models" icon="brain" href="/en/claude-api">
    Same key — Claude's lineup and capabilities.
  </Card>

  <Card title="GPT models" icon="robot" href="/en/gpt-api">
    OpenAI's lineup on the same endpoint.
  </Card>
</CardGroup>
