> Markdown mirror of https://router.one/blog/gemini-3-8-flash-api-guide for AI assistants and crawlers. Router One is a unified, OpenAI-compatible LLM API gateway.
> Published: 2026-11-05 · Author: Router One Team

# Gemini 3.8 Flash API Guide: Model ID, Pricing, Thinking

_Gemini 3.8 Flash on Router One: the google/gemini-3.8-flash model ID, Google's thinking levels and price dates, plan quota or wallet billing, first request._

As of the 2026-11-05 catalog, Router One lists Gemini 3.8 Flash as `google/gemini-3.8-flash`. Send `"model": "google/gemini-3.8-flash"` to `https://api.router.one/v1/chat/completions` with a Router One key — or point any OpenAI-compatible SDK or client at `https://api.router.one/v1` — and the request is routed, metered and logged like every other model. As of the 2026-11-05 plan response, Gemini 3.8 Flash is in the Standard models tier of the Pro, Max and Ultra plans: on a plan its calls draw that tier's allowance, and calls beyond it are billed to the wallet; without a plan, every call bills per token to the wallet at the rates on the [Gemini 3.8 Flash model page](https://router.one/models/gemini-3-8-flash).

This guide covers what the catalog lists for the id, what Google documents about the model (token limits, thinking levels, price dates and status), how billing and plans apply, how it differs from Gemini 3.7 Flash, the first request with curl and the OpenAI SDKs, which clients can call it, and access from mainland China. Catalog and plan observations and Google's statements are dated; the live catalog is the source of truth for a new request.

## Gemini 3.8 Flash at a glance

| Field | What the catalog lists (2026-11-05) |
| --- | --- |
| Catalog id | `google/gemini-3.8-flash` |
| Input / output | text and image in, text out |
| Capability flags | chat, streaming, tool calling, vision |
| Endpoint | `POST /v1/chat/completions` (OpenAI-compatible) |
| Not served on | `POST /v1/messages` (Claude-family and DeepSeek ids only) |
| Plans | the Standard models tier of Pro, Max and Ultra (2026-11-05 plan response); the wallet beyond the allowance and without a plan |
| Plan quota bands | within a plan allowance, a request above 128,000 input tokens counts as 2 requests, above 256,000 as 4 and above 512,000 as 8 |
| Channel id | [`vertex/gemini-3.8-flash`](https://router.one/models/vertex-gemini-3-8-flash), listed as of the 2026-10-15 catalog: a separately priced Vertex-channel product in no plan tier (2026-11-05 plan response) |
| Rates | per token, posted on the [model page](https://router.one/models/gemini-3-8-flash); this guide prints no figures |

Google's own model code for it is `gemini-3.8-flash`, the name Google's Gemini API uses; requests to Router One use the catalog id above.

## What Google documents for Gemini 3.8 Flash

Google's [Gemini 3.8 Flash model page](https://aistudio.google.com/docs/models/gemini-3.8-flash) (checked 2026-11-05) describes it as Google's most intelligent Flash model, built for long-horizon software engineering and complex enterprise workflows, and lists the following for Google's own Gemini API:

- **Status.** `gemini-3.8-flash` is listed as a stable version. Google's [deprecations page](https://aistudio.google.com/docs/deprecations) (checked 2026-11-05) gives September 2, 2026 as its release date and no announced shutdown date.
- **Token limits.** An input token limit of 1,048,576 and an output token limit of 65,536: the 1M token context window that Google's [What's new in Gemini 3.8 Flash](https://aistudio.google.com/docs/whats-new-gemini-3.8) page describes (checked 2026-11-05).
- **Inputs and output.** Text, image, video, audio and PDF in, text out. The Router One catalog entry lists text and image input, so the samples below send only those.
- **Features.** Function calling, structured outputs, caching, code execution, search grounding and URL context are listed as supported; image generation, audio generation and the Live API are not.
- **Thinking.** The levels `low`, `medium` and `high`; on Google's own Gemini API, `minimal` is not supported and returns an error. The next section has the details.

Those are Google's statements about its own Gemini API; Router One is responsible for the catalog entry and for how the gateway routes and bills it. The catalog lists the tool-calling flag for this id, so function tools go in the standard Chat Completions `tools` array. Google's built-in tools are Gemini API features: on Router One's Chat Completions endpoint the hosted search tool is handled for `google/gemini-3-flash` only, and for every other id the tools array is forwarded as sent ([API compatibility facts](https://router.one/facts/api-compatibility.md)). Test the tool definitions your code sends on your own prompts before you move a workload.

## Thinking levels and reasoning effort

Per Google's What's new page and its [thinking guide](https://aistudio.google.com/docs/thinking) (both checked 2026-11-05):

- **Levels.** Gemini 3.8 Flash thinks at `low`, `medium` or `high`, and `medium` is the default. On Google's own Gemini API, `minimal` is not supported and returns an error.
- **Token use.** By design the model can use more tokens on long-running, complex tasks; for everyday tasks Google suggests lowering the reasoning effort to cut token use.
- **Output cap.** Google's output cap counts thinking tokens too, and a response that reaches it while the model is still thinking comes back truncated or empty.
- **No off switch.** Google's [OpenAI compatibility guide](https://aistudio.google.com/docs/openai) (checked 2026-11-05) sets the thinking level of Gemini models through `reasoning_effort` on Chat Completions, uses the model's default level when the field is absent, and says reasoning cannot be turned off for Gemini 3 models.

Those rules describe Google's own API. On `/v1/chat/completions`, Router One sends a `reasoning_effort` of `none` or `minimal` as `low` for `google/gemini-3.8-flash` and `vertex/gemini-3.8-flash` (since 2026-10-30, observed 2026-11-05); the response does not say so. The samples below do not set `reasoning_effort`; if your code sets one, run it on your own prompts before you move a workload. Thinking output is billed at the model's posted output rate, with no separate reasoning line ([pricing facts](https://router.one/facts/pricing.md)), so on wallet-billed calls the thinking level is a cost lever as well as a quality one. A plan allowance counts requests, and its input-length bands look at input only, so thinking output never moves a call into a higher band.

## How billing works

Gemini 3.8 Flash bills per token at the input and output rates posted on its [model page](https://router.one/models/gemini-3-8-flash). Router One posts its own rates for each model, with pricing up to 90% off official prices on select models, and this guide prints no per-token figures because they go stale. Without a plan, every call bills the wallet. On a Pro, Max or Ultra plan, calls draw the Standard models allowance (as of the 2026-11-05 plan response), and calls beyond it bill the wallet at the posted rates. Within a plan allowance, a request above 128,000 input tokens counts as 2 requests, above 256,000 as 4 and above 512,000 as 8 (the bands of the 2026-11-05 catalog); the model page and the [pricing page](https://router.one/pricing) show the live bands.

Google prices its own Gemini API separately. Per Google's [pricing page](https://aistudio.google.com/docs/pricing) and its What's new page (both checked 2026-11-05), Gemini 3.8 Flash is at an introductory price on the Gemini API through December 31, 2026, Google's standard pricing takes effect on January 1, 2027, and Google's output price includes thinking tokens. Those dates belong to Google's price list; the rate Router One charges for the id is the one on its model page.

Dashboard → Logs shows each call's model, tokens, wallet charge or plan quota used, latency and status ([per-request observability](https://router.one/llm-observability)), so you can add up a task's wallet charges and plan requests from the calls it made rather than estimate them from rates.

## Do subscription plans cover Gemini 3.8 Flash?

Yes, as of the 2026-11-05 plan response: Gemini 3.8 Flash is in the Standard models tier of Router One's Pro, Max and Ultra plans, together with Gemini 3.7 Flash, Gemini 3.6 Flash and the other models that tier lists. On a plan its calls draw that tier's allowance, which every model in the tier shares, and calls beyond it are billed to the wallet at the posted rates. The Vertex channel id `vertex/gemini-3.8-flash` is a separately priced product that no tier of the 2026-11-05 plan response lists, so its calls bill the wallet, plan or no plan. Plan model lists change; the [pricing page](https://router.one/pricing) lists each plan's allowance and the live model lists.

## Gemini 3.8 Flash vs Gemini 3.7 Flash

Per Google's [Gemini API release notes](https://aistudio.google.com/docs/changelog) (October 8, 2026 entry; checked 2026-11-05), Google has deprecated `gemini-3.7-flash` on the Gemini API, names `gemini-3.8-flash` as its replacement and routes requests for `gemini-3.7-flash` to `gemini-3.8-flash`; Google's deprecations page (checked 2026-11-05) adds that the `gemini-3.7-flash` endpoint is not shutting down. Google's model pages list the same input types, token limits and thinking levels for the two models, and Google calls Gemini 3.7 Flash a previous-generation model.

On Router One, both ids are listed as of the 2026-11-05 catalog and both are served on `/v1/chat/completions`; as of the 2026-11-05 plan response, both are in the Standard models tier of Pro, Max and Ultra, so on a plan a switch stays on the same allowance. The key, base URL and endpoint stay the same: on the wire, the switch is the model string, from `google/gemini-3.7-flash` to `google/gemini-3.8-flash`. Compare the posted rates on the [Gemini 3.7 Flash](https://router.one/models/gemini-3-7-flash) and [Gemini 3.8 Flash](https://router.one/models/gemini-3-8-flash) model pages and run your own prompts on both before you move a workload; for new work, start with Gemini 3.8 Flash.

Comparison pages render spec sheets and live rates side by side: [Gemini 3.8 Flash vs Gemini 3.7 Flash](https://router.one/models/compare/gemini-3-8-flash-vs-gemini-3-7-flash), [DeepSeek V4.1 Flash vs Gemini 3.8 Flash](https://router.one/models/compare/deepseek-v4-1-flash-vs-gemini-3-8-flash), [Gemini 3.8 Flash vs Claude Sonnet 5](https://router.one/models/compare/gemini-3-8-flash-vs-claude-sonnet-5), [Gemini 3.8 Flash vs GPT-5.6 Terra](https://router.one/models/compare/gemini-3-8-flash-vs-gpt-5-6-terra) and [Grok 4.7 vs Gemini 3.8 Flash](https://router.one/models/compare/grok-4-7-vs-gemini-3-8-flash).

## Send the first request

1. **Create a key.** Dashboard → API Keys → Create Key. Keys look like `sk-...`. For a trial, give the key a `maxSpend` cap. A key's spend cap (maxSpend) limits what that key can charge to your wallet: once its cumulative wallet charges reach the cap, its wallet-billed requests return HTTP 402. Requests covered by your plan's quota draw from the account's shared plan quota and do not count toward any key's cap. Your other keys keep working ([per-key cost tracking](https://router.one/llm-cost-tracking)).
2. **Keep a plan or a wallet balance.** On Pro, Max or Ultra, Gemini 3.8 Flash calls draw the Standard models allowance first (2026-11-05 plan response); without a plan, and beyond the allowance, they bill the wallet — top up in Dashboard → Deposit.
3. **Set the base URL** to `https://api.router.one/v1` in any OpenAI-compatible SDK or client.
4. **Call the model.** The examples use the catalog id `google/gemini-3.8-flash` and set `max_tokens` explicitly.

Chat Completions with curl, streaming:

```bash
curl https://api.router.one/v1/chat/completions \
  -H "Authorization: Bearer sk-your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "google/gemini-3.8-flash",
    "max_tokens": 32768,
    "stream": true,
    "messages": [
      {"role": "system", "content": "You triage support tickets. Reply with a category and one next step."},
      {"role": "user", "content": "A customer was charged twice for order 8812 and asks for a refund of the duplicate charge."}
    ]
  }'
```

The same request without streaming, from the OpenAI Python SDK (`pip install -U openai`) — only `base_url` and the key change:

```python
from openai import OpenAI

client = OpenAI(
    base_url="https://api.router.one/v1",
    api_key="sk-your-api-key",
)

response = client.chat.completions.create(
    model="google/gemini-3.8-flash",
    max_tokens=32768,
    messages=[
        {"role": "system", "content": "You triage support tickets. Reply with a category and one next step."},
        {"role": "user", "content": "A customer was charged twice for order 8812 and asks for a refund of the duplicate charge."},
    ],
)
print(response.choices[0].message.content)
print(response.choices[0].finish_reason, response.usage)
```

The reply has the Chat Completions shape: the text is in `choices[0].message.content`, `finish_reason` says why generation stopped, and `usage` carries the input and output token counts.

Streaming from Node with the OpenAI SDK (`npm install openai`):

```ts
import OpenAI from "openai";

const client = new OpenAI({
  baseURL: "https://api.router.one/v1",
  apiKey: "sk-your-api-key",
});

const stream = await client.chat.completions.create({
  model: "google/gemini-3.8-flash",
  max_tokens: 32768,
  stream: true,
  messages: [
    {
      role: "user",
      content:
        "A customer was charged twice for order 8812 and asks for a refund of the duplicate charge. Draft a two-sentence reply.",
    },
  ],
});

for await (const chunk of stream) {
  process.stdout.write(chunk.choices[0]?.delta?.content ?? "");
}
```

An image, sent inline as a base64 data URL (Python, same client as above):

```python
import base64

with open("receipt.png", "rb") as f:
    image_b64 = base64.b64encode(f.read()).decode()

response = client.chat.completions.create(
    model="google/gemini-3.8-flash",
    max_tokens=32768,
    messages=[{
        "role": "user",
        "content": [
            {"type": "text", "text": "List the line items on this receipt as JSON."},
            {"type": "image_url", "image_url": {"url": f"data:image/png;base64,{image_b64}"}},
        ],
    }],
)
print(response.choices[0].message.content)
```

Rules that hold for every request:

- **Set `max_tokens` on every request.** Leave room above the longest answer you expect; the samples above set 32768. On Router One's Chat Completions, `max_completion_tokens` is accepted as the same cap (if both are sent, `max_completion_tokens` wins). Per Google's thinking guide (checked 2026-11-05), thinking tokens count toward the output cap, so leave headroom.
- **Leave out sampling parameters.** Per the migration checklist on Google's What's new page (checked 2026-11-05), remove `temperature`, `top_p` and `top_k`, and do not end a conversation with a prefilled model turn (a final assistant message); put tone and format rules in the system message instead.
- **Stream long answers.** `stream: true` returns output as it is generated ([streaming guide](https://router.one/llm-streaming)).
- **Keep a healthy wallet balance for wallet-billed calls.** Before a request runs, the gateway reserves an estimate against your balance; when the balance cannot cover it, the gateway lowers `max_tokens` to fit, which can cut a long answer short. If it cannot cover even the request's initial reservation, the gateway returns HTTP 402 before the model runs.
- **Send images inline.** Pass images as base64 data URLs in `image_url` content parts, as in the example above; Router One serves no Files API.
- **Test what your code depends on.** Before you move a workload, run the parameters and request shapes your code sends (tool definitions, image inputs, output caps, any thinking setting) on your own prompts first.

5. **Read the trace.** Dashboard → Logs shows each call's model, tokens, wallet charge or plan quota used, latency and status ([per-request observability](https://router.one/llm-observability)). Retryable upstream failures are absorbed by [automatic fallback](https://router.one/llm-fallback) across the candidate routes for the same model; a Gemini 3.8 Flash request is never answered by a different model.

A request the gateway refuses before any model is called has no row in Dashboard → Logs; its status code and error message say why. A 401 means the key was not accepted, a 402 that the wallet balance or the key's `maxSpend` cannot cover the request's initial reservation, and a 404 that the path or the model id does not exist, so copy the id exactly as the catalog lists it. The [error codes page](https://router.one/llm-api-error-codes) covers the rest.

## Which clients can call it

Any client that speaks Chat Completions and takes a custom base URL can call Gemini 3.8 Flash: the official OpenAI SDKs ([OpenAI SDK setup](https://router.one/integrations/openai-sdk)) and the chat apps and frameworks in the [integrations directory](https://router.one/integrations) that send `/v1/chat/completions` requests. Give the client the base URL `https://api.router.one/v1` and a Router One key, and enter `google/gemini-3.8-flash` as the model; the [OpenAI-compatible API page](https://router.one/openai-compatible-api) explains the endpoint in general.

Claude Code cannot call Gemini 3.8 Flash. Claude Code sends Anthropic Messages requests to `/v1/messages`, which Router One serves for Claude-family and DeepSeek ids only. For any other chat id the catalog lists, the gateway returns HTTP 400 before any model is called; for this one the message reads `model 'google/gemini-3.8-flash' must be called via /v1/chat/completions`. Call Gemini 3.8 Flash from a Chat Completions client. The [API compatibility facts](https://router.one/facts/api-compatibility.md) state the endpoint rule for each model family.

## Channel ids

As of the 2026-10-15 catalog, the Vertex channel also lists [`vertex/gemini-3.8-flash`](https://router.one/models/vertex-gemini-3-8-flash): the same base model as `google/gemini-3.8-flash`, sold as a separately priced product with its own rates on its model page and served on `POST /v1/chat/completions` only. No tier of the 2026-11-05 plan response lists it, so its calls bill the wallet, plan or no plan. As of the 2026-11-05 catalog, the AI Studio channel also lists a Gemini 3.8 Flash id of its own, under the same channel rules. A channel id's routing stays inside its channel, and channel-prefixed ids carry no region, data-residency or compliance commitment; the [channel model ids guide](https://router.one/blog/azure-aws-vertex-channel-model-ids) states the rules. The examples in this guide use the default-channel id.

## From mainland China

Requests reach `api.router.one` from mainland China without a VPN, on the same key and base URL. Top up with a card or Alipay through one hosted checkout, or with USDT/USDC on six chains (Tron, BSC, Ethereum, Polygon, Base, Arbitrum). No US credit card required. For the other Gemini models Router One lists, see the [Gemini API in China page](https://router.one/gemini-api-china) and the [Gemini API in China guide](https://router.one/blog/gemini-api-china-guide).

## FAQ

**What is the model ID for Gemini 3.8 Flash on Router One?**
The catalog id is google/gemini-3.8-flash, as of the 2026-11-05 catalog; use it in code and client settings. Google's own model code, gemini-3.8-flash, is the name on Google's Gemini API. On a Pro, Max or Ultra plan, calls draw the Standard models allowance (as of the 2026-11-05 plan response); without a plan, they bill per token to the wallet.

**How much does the Gemini 3.8 Flash API cost?**
On Router One, per token at the input and output rates posted on the Gemini 3.8 Flash model page, with pricing up to 90% off official prices on select models; this guide prints no figures because they go stale. On a plan, calls draw the Standard models allowance first (as of the 2026-11-05 plan response). On Google's own Gemini API, the model is at an introductory price through December 31, 2026, and Google's standard pricing takes effect on January 1, 2027 (Google's pricing and What's new pages, checked 2026-11-05).

**Is there a free tier for Gemini 3.8 Flash?**
Google's Gemini API has one: per Google's pricing and billing pages (checked 2026-11-05), its free tier lists Gemini 3.8 Flash input and output as free of charge, Google uses free-tier content to improve its products, and the free tier runs on a Google API key. On Router One, Gemini 3.8 Flash calls draw a plan's Standard models allowance (as of the 2026-11-05 plan response) or bill the wallet at the posted rates.

**Do I need a Google API key to call Gemini 3.8 Flash?**
Not through Router One: one Router One key (sk-...) on `https://api.router.one/v1` calls Gemini 3.8 Flash and the other catalog models, with no Google API key and no Google Cloud billing account. A Google API key is what Google's own Gemini API and its free tier use.

**What is the context window of Gemini 3.8 Flash?**
Per Google's model page (checked 2026-11-05), the input token limit is 1,048,576 and the output token limit is 65,536 — the 1M token context window Google describes — and Google's thinking guide counts thinking tokens toward the output cap. The Router One model page shows the live catalog entry for the id.

**Which thinking levels does Gemini 3.8 Flash support?**
On Google's own Gemini API, per Google (checked 2026-11-05): low, medium and high, with medium as the default; minimal is not supported there and returns an error, and reasoning cannot be turned off for Gemini 3 models. Google's OpenAI compatibility guide sets the level through reasoning_effort. On /v1/chat/completions, Router One sends a reasoning_effort of none or minimal as low for google/gemini-3.8-flash and vertex/gemini-3.8-flash (since 2026-10-30, observed 2026-11-05); the response does not say so. The samples in this guide do not set reasoning_effort; test any setting your code sends on your own prompts first.

**What changed from Gemini 3.7 Flash to Gemini 3.8 Flash?**
Per Google's Gemini API release notes (October 8, 2026 entry; checked 2026-11-05), Google has deprecated gemini-3.7-flash, names gemini-3.8-flash as its replacement and routes requests for it to gemini-3.8-flash; Google's model pages list the same token limits and thinking levels for both. On Router One both ids are listed as of the 2026-11-05 catalog, and as of the 2026-11-05 plan response both are in the Standard models tier of Pro, Max and Ultra, so switching is a model-string change; start new work on google/gemini-3.8-flash.

**Is Gemini 3.8 Flash included in Router One subscription plans?**
Yes, as of the 2026-11-05 plan response: it is in the Standard models tier of the Pro, Max and Ultra plans, so on a plan its calls draw that tier's allowance, and calls beyond it are billed to the wallet at the posted rates. The Vertex channel id vertex/gemini-3.8-flash is in no tier of the 2026-11-05 plan response. The pricing page lists each plan's allowance.

**Can I use Gemini 3.8 Flash in Claude Code?**
No. Claude Code sends Anthropic Messages requests to /v1/messages, which Router One serves for Claude-family and DeepSeek ids only, so a Gemini 3.8 Flash request there returns HTTP 400 before any model is called, with the message "`model 'google/gemini-3.8-flash' must be called via /v1/chat/completions`". Call Gemini 3.8 Flash from a Chat Completions client.

**Can I call Gemini 3.8 Flash from mainland China?**
Yes: api.router.one is reachable from mainland China without a VPN, on the same key and base URL. Top up with a card or Alipay through one hosted checkout, or with USDT/USDC on six chains (Tron, BSC, Ethereum, Polygon, Base, Arbitrum). No US credit card required.

## Next steps

- Open the [Gemini 3.8 Flash model page](https://router.one/models/gemini-3-8-flash) for the live rates, the endpoint and the plan quota bands.
- Check each plan's allowance and the models each tier lists on the [pricing page](https://router.one/pricing).
- Calling other Gemini models from mainland China? See the [Gemini API in China page](https://router.one/gemini-api-china) and the [Gemini API in China guide](https://router.one/blog/gemini-api-china-guide).
- New to OpenAI-compatible endpoints? The [OpenAI-compatible API page](https://router.one/openai-compatible-api) covers base URLs, keys and SDKs.
- For Gemini 4 Argon, read the [Gemini 4 Argon API guide](https://router.one/blog/gemini-4-argon-api-guide).

## See also

- Canonical page: https://router.one/blog/gemini-3-8-flash-api-guide
- Gemini API in China: https://router.one/gemini-api-china
- LLM API Gateway and Routing: https://router.one/llm-api-gateway
- All blog posts: https://router.one/blog
- Models and per-model token rates: https://router.one/models (markdown: https://router.one/models.md)
- Pricing: https://router.one/pricing
- API docs (markdown): https://router.one/docs.md
- Company facts: https://router.one/facts/company.md
