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

# Gemini 3.5 Flash

> Call Google Gemini 3.5 Flash (`gemini-3.5-flash`) through SnapGen with per-million-token pricing and curl examples.

`gemini-3.5-flash` is Google's Gemini 3.5 Flash, a fast multimodal thinking model. Send it OpenAI-compatible chat requests through SnapGen with one API key.

## Price per 1M tokens

| Property     | Value                                                  |
| ------------ | ------------------------------------------------------ |
| Model ID     | `gemini-3.5-flash`                                     |
| Input price  | \$0.90 per 1M tokens                                   |
| Output price | \$5.40 per 1M tokens (reasoning tokens bill as output) |
| Cached input | \$0.09 per 1M tokens                                   |
| Streaming    | Supported with `stream: true`                          |

Confirm live rates on the [models page](https://snapgen.org/models/gemini-text) before production rollout.

<ParamField body="model" type="string" required>
  Set to `gemini-3.5-flash`.
</ParamField>

<ParamField body="messages" type="array" required>
  Ordered system, user, and assistant messages.
</ParamField>

<ParamField body="stream" type="boolean" default="false">
  Set to `true` to receive server-sent events. The final event carries token usage.
</ParamField>

<ParamField body="max_tokens" type="integer">
  Caps generated tokens.
</ParamField>

## Request (curl)

```bash theme={null}
curl https://api.snapgen.org/v1/chat/completions \
  -H "Authorization: Bearer $SNAPGEN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gemini-3.5-flash",
    "messages": [{"role": "user", "content": "Summarize this design decision in three bullets."}],
    "max_tokens": 512
  }'
```

Streaming example:

```bash theme={null}
curl -N https://api.snapgen.org/v1/chat/completions \
  -H "Authorization: Bearer $SNAPGEN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gemini-3.5-flash",
    "stream": true,
    "messages": [{"role": "user", "content": "Outline a 5-step API migration plan."}],
    "max_tokens": 512
  }'
```

Gemini native example:

```bash theme={null}
curl "https://api.snapgen.org/v1beta/models/gemini-3.5-flash:generateContent" \
  -H "x-goog-api-key: $SNAPGEN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "contents": [{"role": "user", "parts": [{"text": "Explain vector clocks in two sentences."}]}]
  }'
```

Read generated text from `choices[0].message.content`. See [Chat Completions protocol](/api-reference/chat-completions) for streaming and response fields.

## Supported protocols

| Format                  | Path                                                         |
| ----------------------- | ------------------------------------------------------------ |
| Chat Completions        | `POST /v1/chat/completions`                                  |
| Gemini native           | `POST /v1beta/models/gemini-3.5-flash:generateContent`       |
| Gemini native streaming | `POST /v1beta/models/gemini-3.5-flash:streamGenerateContent` |

<Note>
  SnapGen forwards each protocol only to routes that serve it natively; it does not
  translate between protocols. Billing uses the input, output, and cached token
  counts the provider reports.
</Note>
