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

# Google AI

> Google AI provides the Gemini model family (Gemini 4 Argon, Gemini 3.1 Pro, Gemini 3.8 Flash, Gemini 3.1 Flash-Lite, and prior models) through both an OpenAI-compatible endpoint and native Google AI Studio API.

Google AI offers 60 models through Lava's AI Gateway, supporting Chat Completions, Chat Completions (Gemini Native), Chat Completions (Gemini Streaming). Authentication uses `Authorization: Bearer` or `x-goog-api-key`. See the [Google AI API docs](https://ai.google.dev/gemini-api/docs) for provider-specific parameters.

> [!NOTE]
>
> Supports both **managed** (Lava's API keys) and **unmanaged** (bring your own credentials) mode.

## Quick Start

```typescript theme={null}
const response = await fetch('https://api.lava.so/v1/forward?u=https%3A%2F%2Fgenerativelanguage.googleapis.com%2Fv1beta%2Fopenai%2Fchat%2Fcompletions', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    Authorization: `Bearer ${forwardToken}`,
  },
  body: JSON.stringify({
    model: 'gemini-4-argon',
    messages: [{ role: "user", content: "Hello!" }],
  }),
});
```

## Chat Completions

**Target URL:** `https://generativelanguage.googleapis.com/v1beta/openai/chat/completions`

| | |
| - | - |
| **Auth Header** | `Authorization: Bearer` |
| **Content Type** | `application/json` |
| **Streaming** | Yes (set `stream: true` in request body) |

| Model | Input / 1M tokens | Output / 1M tokens |
| - | - | - |
| gemini-4-argon | \$2.00 | \$10.00 |
| models/gemini-4-argon | \$2.00 | \$10.00 |
| gemini-3.1-pro-preview | \$2.00 | \$12.00 |
| models/gemini-3.1-pro-preview | \$2.00 | \$12.00 |
| gemini-2.5-pro | \$1.25 | \$10.00 |
| models/gemini-2.5-pro | \$1.25 | \$10.00 |
| gemini-3.8-flash | \$0.75 | \$3.75 |
| models/gemini-3.8-flash | \$0.75 | \$3.75 |
| gemini-3.6-flash | \$0.75 | \$3.75 |
| models/gemini-3.6-flash | \$0.75 | \$3.75 |
| gemini-3-flash-preview | \$0.50 | \$3.00 |
| models/gemini-3-flash-preview | \$0.50 | \$3.00 |
| gemini-3.5-flash-lite | \$0.30 | \$2.50 |
| models/gemini-3.5-flash-lite | \$0.30 | \$2.50 |
| gemini-2.5-flash | \$0.30 | \$2.50 |
| models/gemini-2.5-flash | \$0.30 | \$2.50 |
| gemini-3.1-flash-lite | \$0.25 | \$1.50 |
| models/gemini-3.1-flash-lite | \$0.25 | \$1.50 |
| gemini-2.5-flash-lite | \$0.10 | \$0.40 |
| models/gemini-2.5-flash-lite | \$0.10 | \$0.40 |

## Chat Completions (Gemini Native)

**Target URL:** `https://generativelanguage.googleapis.com/v1beta/models/{model}:generateContent`

| | |
| - | - |
| **Auth Header** | `x-goog-api-key` |
| **Content Type** | `application/json` |
| **Streaming** | No |

| Model | Input / 1M tokens | Output / 1M tokens |
| - | - | - |
| gemini-4-argon | \$2.00 | \$10.00 |
| models/gemini-4-argon | \$2.00 | \$10.00 |
| gemini-3.1-pro-preview | \$2.00 | \$12.00 |
| models/gemini-3.1-pro-preview | \$2.00 | \$12.00 |
| gemini-2.5-pro | \$1.25 | \$10.00 |
| models/gemini-2.5-pro | \$1.25 | \$10.00 |
| gemini-3.8-flash | \$0.75 | \$3.75 |
| models/gemini-3.8-flash | \$0.75 | \$3.75 |
| gemini-3.6-flash | \$0.75 | \$3.75 |
| models/gemini-3.6-flash | \$0.75 | \$3.75 |
| gemini-3-flash-preview | \$0.50 | \$3.00 |
| models/gemini-3-flash-preview | \$0.50 | \$3.00 |
| gemini-3.5-flash-lite | \$0.30 | \$2.50 |
| models/gemini-3.5-flash-lite | \$0.30 | \$2.50 |
| gemini-2.5-flash | \$0.30 | \$2.50 |
| models/gemini-2.5-flash | \$0.30 | \$2.50 |
| gemini-3.1-flash-lite | \$0.25 | \$1.50 |
| models/gemini-3.1-flash-lite | \$0.25 | \$1.50 |
| gemini-2.5-flash-lite | \$0.10 | \$0.40 |
| models/gemini-2.5-flash-lite | \$0.10 | \$0.40 |

## Chat Completions (Gemini Streaming)

**Target URL:** `https://generativelanguage.googleapis.com/v1beta/models/{model}:streamGenerateContent`

| | |
| - | - |
| **Auth Header** | `x-goog-api-key` |
| **Content Type** | `application/json` |
| **Streaming** | Always |

| Model | Input / 1M tokens | Output / 1M tokens |
| - | - | - |
| gemini-4-argon | \$2.00 | \$10.00 |
| models/gemini-4-argon | \$2.00 | \$10.00 |
| gemini-3.1-pro-preview | \$2.00 | \$12.00 |
| models/gemini-3.1-pro-preview | \$2.00 | \$12.00 |
| gemini-2.5-pro | \$1.25 | \$10.00 |
| models/gemini-2.5-pro | \$1.25 | \$10.00 |
| gemini-3.8-flash | \$0.75 | \$3.75 |
| models/gemini-3.8-flash | \$0.75 | \$3.75 |
| gemini-3.6-flash | \$0.75 | \$3.75 |
| models/gemini-3.6-flash | \$0.75 | \$3.75 |
| gemini-3-flash-preview | \$0.50 | \$3.00 |
| models/gemini-3-flash-preview | \$0.50 | \$3.00 |
| gemini-3.5-flash-lite | \$0.30 | \$2.50 |
| models/gemini-3.5-flash-lite | \$0.30 | \$2.50 |
| gemini-2.5-flash | \$0.30 | \$2.50 |
| models/gemini-2.5-flash | \$0.30 | \$2.50 |
| gemini-3.1-flash-lite | \$0.25 | \$1.50 |
| models/gemini-3.1-flash-lite | \$0.25 | \$1.50 |
| gemini-2.5-flash-lite | \$0.10 | \$0.40 |
| models/gemini-2.5-flash-lite | \$0.10 | \$0.40 |

## Next Steps

> [card] [All Providers](https://lava.so/docs/gateway/supported-providers.md)
>
> Browse all supported AI providers

> [card] [Forward Proxy](https://lava.so/docs/gateway/forward-proxy.md)
>
> Learn how to construct proxy URLs and authenticate requests


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