• Google
  • Text
  • 1.05M context
  • Reasoning

Gemini 3.8 Flash API: pricing, capabilities and setup

Gemini 3.8 Flash API: Google's newest Flash model for agents, long coding tasks and function-calling workflows, with a 1M-token context window.

pay as you go · no subscription · key right after sign-up

Model ID
Input
$0.225 / 1M
Output
$1.125 / 1M
Get a key No subscription · pay as you go

How much Gemini 3.8 Flash costs

  • Input
    $0.225
    per 1M tokens
  • Output
    $1.125
    per 1M tokens
  • Cache read
    $0.225
    per 1M tokens
  • Cache write
    $0.225
    per 1M tokens · same as input

Cost calculator

30 M tokens

75%

The rest is output

With llmbox
$14

What a typical task costs

TaskTokens (input / output)With llmbox
Short chat2 000 / 500$0.00101
Code review20 000 / 2 000$0.00675
Document summary40 000 / 2 000$0.01125
Agent session600 000 / 30 000$0.16875

Specs

  • Context
    1.05M
    tokens
  • Max output
    66K
    tokens
  • Input
    text, images

Capabilities

  • Tool calling
  • JSON schema output
  • Reasoning
  • Streaming
  • Prompt caching
  • Image input

Endpoints

  • /v1/chat/completions
  • /v1/responses
  • /v1/messages

Setup in three steps

  1. 01
    Get a key

    Sign up and create an API key in the dashboard.

    Get a key →
  2. 02
    Set the base URL

    In any OpenAI-compatible client, point the API address to:

  3. 03
    Pass the model id

    Put this identifier in the model field:

import os
from openai import OpenAI

client = OpenAI(
    base_url="https://llmbox.cc/v1",
    api_key=os.environ["LLMBOX_API_KEY"],
)
resp = client.chat.completions.create(
    model="google/gemini-3.8-flash",
    messages=[{"role": "user", "content": "Hi! Tell me about yourself in two sentences."}],
)
print(resp.choices[0].message.content)

What Gemini 3.8 Flash is good for

Gemini 3.8 Flash is Google's newest Flash-tier model. Google calls it the most intelligent model in the Flash line and aims it at long development tasks, autonomous agents and complex workflows — at the speed and cost that set Flash apart from the larger models. According to Google's documentation, it has a 1,048,576-token context window and a single response returns up to 65,536 tokens. Through llmbox the model accepts text and images and responds with text; the model ID is google/gemini-3.8-flash.

What it's good for

3.8 Flash is a workhorse for agents and product workloads where requests are numerous and the tasks are harder than simple labeling. Think of a coding assistant that reads files and makes edits over several steps; a support agent that calls your functions on its own — order lookup, status check — and returns JSON that conforms to a schema; or parsing invoices, screenshots and diagrams together with the task text.

Reasoning is on by default at the medium level; per Google's documentation, low and high are also available, while the model does not support minimal. In an agent this lets you use different levels for different steps: low for choosing a function and short replies, high for planning and debugging.

Among the Flash models in the catalog this is the newest version. Google has deprecated the previous Gemini 3.7 Flash and recommends moving to 3.8 Flash, so projects on 3.7 Flash are worth testing on this model. The next step Google recommends is Gemini 4 Hydrogen, a fast Gemini 4 generation model for the same tasks.

When it's not the right fit

  • You want a next-generation model with the deeper xhigh reasoning level — try Gemini 4 Hydrogen.
  • The hardest reasoning, complex math and large code changes where quality matters more than price — compare with Gemini 4 Argon.
  • Simple classification and field extraction at high volume — Gemini 3.1 Flash Lite will cost less.
  • You need images as output — use Gemini 3.1 Flash Image.

How to connect

3.8 Flash makes a good everyday model in Codex CLI, Cursor or OpenCode: it is available in both the Responses API and Chat Completions, and for a hard task in the same tool you simply pick Gemini 4 Argon — the key and base URL stay the same. You don't need an AI Studio key or a Google Cloud project; the endpoints are in the Quickstart and tool settings are in Integrations.

Gemini 3.8 Flash API pricing

The rates per 1M input, output and cache-read tokens are on this page; a repeated prompt prefix — the system prompt, tool descriptions — can be served from the cache. Reasoning tokens count as output, so the reasoning level you choose shows up directly in an agent's bill. You pay from a prepaid balance as you go, with no subscription. Spend by day and by model is in the Usage section of your dashboard, and every request with its cost is in the request log.

Typical tasks

  • Coding assistants in Codex CLI and Cursor
  • Support and sales agents that call your functions
  • Parsing documents and screenshots with JSON output
  • High-volume product workloads

Gemini 3.8 Flash or Gemini 4 Hydrogen?

ModelInput · 1MOutput · 1M
Gemini 3.8 Flash$0.225$1.125
Gemini 4 Hydrogen$0.344$1.72

Gemini 3.8 Flash vs neighbours

ModelInput · 1MOutput · 1M
Gemini 3.8 Flash$0.225$1.125
Gemini 3.1 Flash Lite $0.10$0.40
Gemini 3.7 Flash $0.225$1.125
Gemini 3.6 Flash $0.25$1.215
Gemini 3.1 Pro Preview $0.30$1.70
Qwen3.8 Max Qwen$0.225$0.7875
All Google models

Gemini 3.8 Flash is also compared with

Other Google models

Articles about the model

FAQ

How is Gemini 3.8 Flash different from Gemini 4 Hydrogen?

Hydrogen is the next-generation Gemini 4 model that Google recommends as the upgrade from 3.8 Flash for agents and code; it adds a fourth reasoning level, xhigh. 3.8 Flash remains a stable model. Both have a 1M-token context window; the rates are on each model's page.

How is Gemini 3.8 Flash different from Gemini 4 Argon?

3.8 Flash is a Flash-tier model, built for speed and cost at high request volumes. Argon is Google's flagship for the hardest tasks. Both have a 1M-token context window and the same connection formats; the rates are on each model's page.

How is Gemini 3.8 Flash different from Gemini 3.6 Flash?

3.8 Flash is the newer version: Google calls it the most intelligent Flash model and aims it at long development tasks and autonomous agents. Google classifies 3.6 Flash as the previous Flash generation.

Can I use Gemini 3.8 Flash in Codex CLI, Cursor or OpenCode?

Yes. The model is available in the Responses API for Codex CLI and in Chat Completions for Cursor and OpenCode. Setup steps are in the Integrations section of the docs.

Which reasoning levels are supported?

Per Google's documentation, low, medium (the default) and high. This model does not support the minimal level.

How is Gemini 3.8 Flash billed?

Per input, output and cache-read token at the per-1M-token rates on this page, from a prepaid balance as you go — there is no subscription. At high volumes, look at the cost of a typical series of calls in your workflow rather than a single answer: it is visible in the request log in your dashboard.