Gemini 3.5 Flash-Lite API
The cheapest Gemini text tier — built for high-volume agentic tasks, translation and simple data processing over an OpenAI-compatible endpoint.
- Context window
- 1M tokens
- Max output
- 65.5K tokens
- Input
- $0.3 / 1M tokens
- Output
- $2.5 / 1M tokens
- Cached input
- $0.03 / 1M tokens
- Modalities
- text → text
- Features
- tool callingjson modestreaming
Connect to Gemini 3.5 Flash-Lite
Gemini 3.5 Flash-Lite is served through an OpenAI-compatible chat completions API. Point any OpenAI SDK or OpenAI-compatible tool at the base URL below with a ModelRunner API key — no polling, the reply comes back in the response (or streams).
- base_url
- https://queue.modelrunner.run/google/gemini-3.5-flash-lite
- model
- google/gemini-3.5-flash-lite
- auth
- Authorization: Bearer <MODELRUNNER_API_KEY>get a key
import os
from openai import OpenAI
client = OpenAI(
base_url="https://queue.modelrunner.run/google/gemini-3.5-flash-lite",
api_key=os.environ["MODELRUNNER_API_KEY"],
)
completion = client.chat.completions.create(
model="google/gemini-3.5-flash-lite",
messages=[
{
"role": "user",
"content": "Explain what an API rate limit is in two sentences."
}
],
)
print(completion.choices[0].message.content)
# Streaming: add stream=True and iterate the chunks
# for chunk in client.chat.completions.create(..., stream=True):
# print(chunk.choices[0].delta.content or "", end="")import OpenAI from "openai";
const client = new OpenAI({
baseURL: "https://queue.modelrunner.run/google/gemini-3.5-flash-lite",
apiKey: process.env.MODELRUNNER_API_KEY,
});
const completion = await client.chat.completions.create({
model: "google/gemini-3.5-flash-lite",
messages: [
{
"role": "user",
"content": "Explain what an API rate limit is in two sentences."
}
],
});
const reply = completion.choices[0].message.content;
// Streaming: pass stream: true and iterate the chunks
// for await (const chunk of await client.chat.completions.create({ ..., stream: true })) {
// process.stdout.write(chunk.choices[0]?.delta?.content ?? "");
// }# One synchronous call — the reply is in the response body (no polling)
curl https://queue.modelrunner.run/google/gemini-3.5-flash-lite/chat/completions \
-H "Authorization: Bearer $MODELRUNNER_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"messages": [
{
"role": "user",
"content": "Explain what an API rate limit is in two sentences."
}
]
}'
# Streaming (Server-Sent Events, ends with "data: [DONE]")
curl -N https://queue.modelrunner.run/google/gemini-3.5-flash-lite/chat/completions \
-H "Authorization: Bearer $MODELRUNNER_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"messages": [
{
"role": "user",
"content": "Explain what an API rate limit is in two sentences."
}
],
"stream": true
}'Works withCline · Continue · Claude Code · LangChain · Vercel AI SDK · LiteLLM · Aider
Cline → Settings → API Configuration (or the CLI line below)
API Provider: OpenAI Compatible
Base URL: https://queue.modelrunner.run/google/gemini-3.5-flash-lite
API Key: <your ModelRunner API key>
Model ID: google/gemini-3.5-flash-lite
# Cline CLI equivalent
cline auth --provider openai --baseurl https://queue.modelrunner.run/google/gemini-3.5-flash-lite --modelid google/gemini-3.5-flash-lite --apikey <your ModelRunner API key>~/.continue/config.yaml (the IDE extension and the `cn` CLI read the same file)
models:
- name: Gemini 3.5 Flash-Lite (ModelRunner)
provider: openai
model: google/gemini-3.5-flash-lite
apiBase: https://queue.modelrunner.run/google/gemini-3.5-flash-lite
apiKey: <your ModelRunner API key>
roles: [chat, edit]shell environment (or the env block of ~/.claude/settings.json)
export ANTHROPIC_BASE_URL=https://queue.modelrunner.run/google/gemini-3.5-flash-lite
export ANTHROPIC_AUTH_TOKEN=<your ModelRunner API key>
export ANTHROPIC_MODEL=google/gemini-3.5-flash-lite
# optional: send Claude Code's background/sub-agent calls to the same model
export ANTHROPIC_DEFAULT_HAIKU_MODEL=google/gemini-3.5-flash-lite
export CLAUDE_CODE_SUBAGENT_MODEL=google/gemini-3.5-flash-lite
claudeimport os
from langchain_openai import ChatOpenAI
llm = ChatOpenAI(
base_url="https://queue.modelrunner.run/google/gemini-3.5-flash-lite",
api_key=os.environ["MODELRUNNER_API_KEY"],
model="google/gemini-3.5-flash-lite",
)
llm.invoke("Explain what an API rate limit is in two sentences.")import { createOpenAICompatible } from "@ai-sdk/openai-compatible";
import { generateText } from "ai";
const modelrunner = createOpenAICompatible({
name: "modelrunner",
baseURL: "https://queue.modelrunner.run/google/gemini-3.5-flash-lite",
apiKey: process.env.MODELRUNNER_API_KEY,
});
const { text } = await generateText({
model: modelrunner("google/gemini-3.5-flash-lite"),
prompt: "Explain what an API rate limit is in two sentences.",
});import os
import litellm
response = litellm.completion(
model="openai/google/gemini-3.5-flash-lite", # "openai/" = OpenAI-compatible route
api_base="https://queue.modelrunner.run/google/gemini-3.5-flash-lite",
api_key=os.environ["MODELRUNNER_API_KEY"],
messages=[{"role": "user", "content": "Explain what an API rate limit is in two sentences."}],
)
print(response.choices[0].message.content)terminal
export OPENAI_API_BASE=https://queue.modelrunner.run/google/gemini-3.5-flash-lite
export OPENAI_API_KEY=<your ModelRunner API key>
aider --model openai/google/gemini-3.5-flash-liteStreaming via SSE (stream: true; ends with data: [DONE]) · Non-streaming calls time out at ~290 s — stream long generations · 10 MB request body · Errors use the OpenAI error envelope · Optional metadata object for your own tags, never sent to the model · Many models, one provider entry: base_url https://queue.modelrunner.run/v1 (GET /v1/models lists ids; model field required)
From an MCP client (Claude Desktop, Cursor, Claude Code): connect the ModelRunner MCP server once and its run_model tool runs Gemini 3.5 Flash-Lite with a messages input — the reply comes back in the same call.
Machine-readable: OpenAPI schema · llms.txt
Example conversation
A real run of Gemini 3.5 Flash-Lite on ModelRunner · charged $0.0006 · 104 in / 159 out tokens
{ "order_id": "A-8842", "customer": "Dana Whitfield", "items": [ { "name": "cold brew concentrate", "qty": 3, "unit_price": 12.50 }, { "name": "ceramic pour-over", "qty": 1, "unit_price": 34.00 }, { "name": "filter pack", "qty": 2, "unit_price": 6.25 } ], "total": 105.00 }
Model Pricing
Pricing
This model is billed per token, at separate rates for what you send and what it produces.
If a run reports no token usage, it bills a flat $0.01.
Cost estimator
Estimate from the rates above — your bill is the model's reported usage × rate, exact to 6 decimals.
Compare tiers and related models
| Model | Input / 1M | Output / 1M | Context | Max output | Features |
|---|---|---|---|---|---|
| Gemini 3.5 Flash-Litegoogle/gemini-3.5-flash-lite | $0.3 | $2.5 | 1M | 65.5K | tool calling, json mode |
| Gemini 3.5 Flashgoogle/gemini-3.5-flash | $1.5 | $9 | 1M | 65.5K | reasoning, tool calling, json mode |
| Gemini 3.7 Flashgoogle/gemini-3.7-flash | $0.75 | $3.75 | 1M | 65.5K | reasoning, tool calling, json mode |
| DeepSeek V4 Prodeepseek/v4 | $2.4 | $4.8 | 1M | 393.2K | reasoning, tool calling, json mode |
| GLM-5.2z-ai/glm-5.2 | $1.4 | $4.4 | 1M | 131.1K | reasoning, tool calling, json mode |
| GLM-5.2 Fast Previewz-ai/glm-5.2-fast-preview | $2.8 | $8.8 | 1M | 131.1K | reasoning, tool calling, json mode |
| Qwen3.8-Maxalibaba/qwen3.8-max | $2 | $6 | 1M | 131.1K | reasoning, tool calling, json mode |
Request parameters
The body follows OpenAI’s chat completions shape. Fields below are the ones this model documents; anything else the platform does not interpret is forwarded to the model unchanged, and the model is the authority on what it accepts.
| Name | Type | Required | Description |
|---|---|---|---|
| messages | array | yes | OpenAI-style conversation history. Each item is an object with a role (system, user, assistant or tool) and content. |
| stream | boolean | no | Return the reply as a Server-Sent Events stream of deltas terminated by data: [DONE]. Default: false. |
| max_tokens | integer | no | Upper bound on generated tokens. |
| tools | array | no | OpenAI-format tool definitions the model may call. |
| tool_choice | — | no | auto, none, required, or a specific tool. |
| response_format | object | no | Set {"type":"json_object"} for JSON mode. |
| stop | — | no | Up to 4 stop sequences. |
| seed | integer | no | Best-effort determinism hint. |
Response
An OpenAI ChatCompletion object: id, object, created, model, choices[] and usage. The id is chatcmpl-<requestId>, and the same request appears in your dashboard.
About Gemini 3.5 Flash-Lite
Gemini 3.5 Flash-Lite is the most cost-efficient model in the Gemini text family, intended for work you do a lot of rather than work that is hard: classification, translation, extraction, tagging, routing and other high-volume data processing.
Best for
- High-volume classification, tagging and routing at the lowest cost per token
- Bulk translation and text normalisation pipelines
- Cheap extraction of structured JSON from messy text
- A low-cost default tier behind an OpenAI-compatible base URL
Notesshow the full description ›
It is built to sit behind pipelines that call an LLM on every row, every message or every support ticket, where the per-call cost compounds fast — roughly a fifth the cost of Gemini 3.5 Flash per token. Thinking is minimal by default, which is what makes it fast and cheap on classification and extraction.
## Choose another model when - A single call needs more reasoning depth than volume — step up to Gemini 3.5 Flash, or to Gemini 3.7 Flash for multi-step reasoning - Your input includes images, audio or video — this endpoint is text-only
## Tips - Custom `temperature` / `top_p` values are not supported on this generation and are ignored - For structured extraction, set `response_format: {"type": "json_object"}` and name the keys you want in the prompt
Behaviour & limits
- Context window
- 1M tokens (input + output)
- Max output
- 65.5K tokens per reply
- Structured calls
- OpenAI-format tools + tool_choice · response_format JSON mode
- Transport
- OpenAI-compatible chat completions · SSE streaming · ~290 s non-stream ceiling · 10 MB body
FAQ
How do I connect to Gemini 3.5 Flash-Lite through the API?
Gemini 3.5 Flash-Lite is served by an OpenAI-compatible chat completions endpoint. Point any OpenAI SDK or OpenAI-compatible tool at base_url https://queue.modelrunner.run/google/gemini-3.5-flash-lite with a ModelRunner API key (Authorization: Bearer <key>) and model google/gemini-3.5-flash-lite; the SDK appends /chat/completions itself. The call is synchronous — the reply comes back in the response body, or streams as Server-Sent Events with "stream": true. Do not submit it to the asynchronous queue path, which returns HTTP 400 for this model.
How much does Gemini 3.5 Flash-Lite cost?
Gemini 3.5 Flash-Lite is billed per token from the usage the model reports: $0.3 per 1M input tokens, $0.03 per 1M cached input tokens, $2.5 per 1M output tokens. There is no per-request minimum — a short call bills a fraction of a cent, exact to six decimals.
What is Gemini 3.5 Flash-Lite's context window?
Gemini 3.5 Flash-Lite supports a 1M-token context window and up to 65.5K output tokens per reply.
Can I use Gemini 3.5 Flash-Lite in GitHub Copilot or another tool that requires a /models endpoint?
Yes. Custom-provider flows that probe GET {base_url}/models before first use (GitHub Copilot's BYOK flow does) work with either base URL: https://queue.modelrunner.run/google/gemini-3.5-flash-lite self-describes at https://queue.modelrunner.run/google/gemini-3.5-flash-lite/models, and the platform base https://queue.modelrunner.run/v1 covers every public chat model with one provider entry — GET /v1/models lists the ids and the request's model field selects google/gemini-3.5-flash-lite.
Does Gemini 3.5 Flash-Lite support streaming?
Yes. Set "stream": true and the reply arrives as Server-Sent Events (data: frames ending with data: [DONE]); stream_options: {"include_usage": true} adds a final usage frame. Non-streaming calls are cut off at about 290 seconds, so stream long generations.
Does Gemini 3.5 Flash-Lite support tool calling or JSON mode?
Gemini 3.5 Flash-Lite supports function calling via an OpenAI-format tools array with tool_choice and JSON mode via response_format {"type": "json_object"}. Both are passed through to the model in the standard OpenAI chat completions shape, so existing client code works unchanged.
What happens if my ModelRunner balance runs out while calling Gemini 3.5 Flash-Lite?
The request is refused with HTTP 429 and an OpenAI-style error whose code is insufficient_quota — the convention OpenAI SDKs already understand — and nothing is charged. Top up in the dashboard and retry. (Disconnecting from a stream after output has started is not a refund — the platform finishes the upstream call and bills its exact usage.)
