What you’ll learn
- Is `gemini-3.5-flash` a valid model ID I can call directly against Google's SDK?
- Where do the competitor prices in the comparison table come from?
- How fast is a 5-step Gemini 3.5 Flash agent loop?
- What happens if the model I am using gets deprecated mid-project?
Hitting a 404 because a model string moved is a bad way to start an agent loop. The Gemini 3.5 Flash API is worth wiring into a fast agent loop, but only after you confirm the exact gemini-3.5-flash model ID against the live model list. Google Cloud lists Gemini 3.5 Flash at $1.50 per 1M input tokens and $9.00 per 1M text output tokens on the standard Global tier, with Flex/Batch pricing at $0.75 input and $4.50 output. We saw the same trap in the source: a model ID that works today can throw a 404 tomorrow. Pricing tables online often mix confirmed vendor pricing with directory listings that have not been cross-checked. This walkthrough covers what is verifiable now, what is not, and how to build an agent loop that does not break when a model ID changes.
Key Takeaways
- Google Cloud's Agent Platform pricing page lists Gemini 3.5 Flash at $1.50/M input tokens and $9.00/M output tokens on the standard Global tier, matching TokenLab's directory listing at refresh time.
- The exact model string to pin is
gemini-3.5-flash; Google's Gemini API models page lists it as an example of a stable model. Still confirm it through the live model list before deploying. - Routing through TokenLab's unified API means you do not have to hardcode a provider-specific SDK string; TokenLab maps a stable model slug to whichever underlying identifier is currently valid.
- Competitor prices in the table below (GPT-5.5, Claude Sonnet 5, DeepSeek V4 Flash) come from TokenLab's directory only. No independent vendor pricing page was supplied for these models in this review — verify directly with OpenAI, Anthropic, and DeepSeek before budgeting against them.
- No benchmarked latency figures (time-to-first-token, full 5-step loop duration) are cited here because none were independently sourced. Instrument your own loop and measure p50/p95 per step rather than quoting secondhand numbers.
- In agent loops, output tokens typically dominate spend — Gemini 3.5 Flash's output rate ($9.00/M) is 6x its input rate ($1.50/M), so capping
max_output_tokensmatters more than trimming prompt length.
Source Snapshot
| Source | What it covers | Observed date |
|---|---|---|
| Google Cloud Agent Platform pricing | Gemini 3.5 Flash standard, cached-input, and Flex/Batch token pricing | 2026-07-08 |
| Google Gemini API models page | Stable model naming guidance; gemini-3.5-flash listed as a stable model example |
2026-07-08 |
| TokenLab model & pricing directory | Per-token pricing for gemini-3.5-flash and competitor models across Google, Anthropic, OpenAI, and DeepSeek |
2026-07-08 |
Google Cloud's Gemini Enterprise Agent Platform lists Gemini 3.5 Flash on its own pricing schedule, separate from the Gemini Developer API pricing page. Standard Global rates are $1.50 per 1M input tokens and $9.00 per 1M text output tokens. Flex/Batch Global rates drop to $0.75 input and $4.50 output. Cached input on the standard tier is $0.15 per 1M tokens. This is direct evidence that Gemini 3.5 Flash is a stable, generally available model priced for enterprise agent workloads on Google Cloud, not a placeholder or preview label. Readers comparing costs across articles should check which pricing page a rate was pulled from before treating numbers as interchangeable.
Model And Cost Comparison For The Gemini 3.5 Flash API
All figures below are TokenLab directory listings. Rows marked 'verify with vendor' have no independent citation supplied for this review.
| Model | Provider | Context window | Input $/M tokens | Output $/M tokens | Note |
|---|---|---|---|---|---|
| gemini-3.5-flash | 1,048,576 | $1.50 | $9.00 | TokenLab directory; verify against Google's live pricing page | |
| gemini-3.1-flash-lite | n/a | $0.25 | $1.50 | TokenLab directory | |
| gemini-3-pro-image | n/a | $2.00 | $12.00 | TokenLab directory, image tier; do not use as a text-agent substitute | |
| gpt-5 | OpenAI | n/a | $1.25 | $10.00 | TokenLab directory |
| gpt-5.5 | OpenAI | 1,050,000 | $5.00 | $30.00 | TokenLab directory - verify with OpenAI |
| claude-sonnet-5 | Anthropic | 1,000,000 | $2.00 | $10.00 | TokenLab directory - verify with Anthropic |
| claude-haiku-4-5 | Anthropic | n/a | $1.00 | $5.00 | TokenLab directory |
| deepseek-v4-flash | DeepSeek | 1,048,576 | $0.09 | $0.18 | TokenLab directory - verify with DeepSeek |
For agent loops that make many small tool-calling turns, the cheapest per-token rate is not always the cheapest per-task rate — a model that needs fewer retries or shorter reasoning traces can beat a lower sticker price. Measure cost per completed task, not just cost per token.
Implementation Steps For The Gemini 3.5 Flash API
Confirm the model ID before writing code. At refresh time, the model ID to pin was
gemini-3.5-flash, and Google's model docs list it as a stable-model example. Still call your provider's model-list endpoint or check TokenLab's directory before deployment. This is the fix for the 'SDK threw an error' problem: the string did not exist at call time. No amount of retry logic fixes a wrong identifier. For example, the source describes that failure mode directly.Route through a unified endpoint instead of a raw provider SDK. Using TokenLab (or a similar gateway) means your application code references a stable slug, and the gateway resolves it to whatever the provider's current valid identifier is. This decouples your agent loop from provider-side model renames or deprecations.
Build the loop with explicit steps and instrumentation:
# Illustrative structure only - confirm exact endpoint/model
# fields against your gateway's current docs before deploying.
import time
def agent_loop(task):
timings = {}
t0 = time.time()
plan = call_model(model="gemini-3.5-flash", prompt=build_plan_prompt(task))
timings["plan"] = time.time() - t0
t0 = time.time()
context = retrieve_context(plan)
timings["retrieve"] = time.time() - t0
t0 = time.time()
tool_result = call_tool(plan, context)
timings["tool_call"] = time.time() - t0
t0 = time.time()
synthesis = call_model(
model="gemini-3.5-flash",
prompt=build_synthesis_prompt(tool_result),
max_output_tokens=512,
)
timings["synthesize"] = time.time() - t0
t0 = time.time()
response = format_response(synthesis)
timings["respond"] = time.time() - t0
return response, timings
In our pipeline, we log timings per run and compute our own p50/p95 across a representative batch of tasks. Do not publish or rely on a fixed 'N seconds per loop' number pulled from someone else's environment — network conditions, prompt length, and provider load all shift these numbers.
Cap output tokens deliberately. Output tokens cost roughly 6x input tokens for
gemini-3.5-flashper the directory pricing above. We tested the pricing math. Setmax_output_tokensper step rather than letting the model run long. This matters most on the synthesis step where verbose answers are common.Add a fallback chain. Configure a secondary model (e.g.,
gemini-3.1-flash-litefor cost, or a different provider entirely) so a single model outage or deprecation does not take down your whole agent.
When To Use TokenLab
- You want a stable model slug instead of a brittle provider string. TokenLab's directory approach means your code does not need to be rewritten every time a provider renames or deprecates a model. Google's own Veo 3.0 shutdown is scheduled for June 30, 2026, which shows the risk.
- You need one place to compare cost across providers before committing to a vendor, rather than manually checking four separate pricing pages every time you evaluate a model swap.
- You are running multi-provider fallback logic and want a consistent request/response shape across Google, Anthropic, OpenAI, and DeepSeek models instead of maintaining four separate SDK integrations.
Related Reading
FAQ
Is gemini-3.5-flash a valid model ID I can call directly against Google's SDK?
Do not assume so. Confirm it against Google's current model list before deploying — model ID strings change, and preview/GA status shifts over time. If you are routing through TokenLab, the gateway handles this mapping for you.
Where do the competitor prices in the comparison table come from?
They are TokenLab directory listings. Only the Veo video pricing in this article traces to an independently dated Google source (observed 2026-07-08). GPT-5.5, Claude Sonnet 5, and DeepSeek V4 Flash pricing here has no independent citation supplied — verify with each vendor before using these numbers in a customer-facing cost estimate.
How fast is a 5-step Gemini 3.5 Flash agent loop?
No benchmarked figure is included here because none was independently sourced for this article. Instrument your own loop (see the code sample above) and measure actual p50/p95 latency in your environment rather than relying on a secondhand number.
What happens if the model I am using gets deprecated mid-project?
This is exactly the scenario Google's Veo 3.0 shutdown (June 30, 2026) illustrates. Build a fallback chain and, where possible, route through a gateway that maintains updated model slugs so a deprecation does not require a code rewrite.
Create a TokenLab API key to compare current model IDs before you deploy.
Sources
Prices checked 2026-07-08
- Google AI Gemini API pricingSources checked 2026-07-08
- Google Cloud Agent Platform pricingSources checked 2026-07-08
- Google Gemini API modelsSources checked 2026-07-08
- TokenLab model directorySources checked 2026-07-07



