Skip to content
Sign in

Gemini 3.1 Flash Lite Preview

gemini-3.1-flash-lite-preview

Gemini 3.1 Flash Lite Preview is Google's efficient model optimized for high-volume use cases. It outperforms Gemini 2.5 Flash Lite in overall quality and approaches Gemini 2.5 Flash performance on key capabilities. Improvements cover audio input/ASR, RAG snippet ranking, translation, data extraction, and code completion. It supports the full range of thinking levels (minimal, low, medium, high) to enable fine-grained cost/performance trade-offs. Its price is only half that of Gemini 3 Flash.

Context window1.0M
ProviderGemini
Released2026/04/30

Playground

Pricing

The same model is available through multiple service channels — choose based on latency, reliability and cost.

Prices in $ / 1M tokens
To pick a channel, add a provider field to the request body, for example "provider": { "channel": "direct" }. Valid values are direct / stable / economical; omit it to use the default channel.

Direct

Direct upstream connection — best when you need native behavior and the full context window.

InputOutputCache readCache write
0.25/M1.50/M0.03/M0.08/M

Overview

Input
Text Image
Output
Text

Gemini 3.1 Flash Lite Preview API: An Efficient Model for High-Volume Scenarios

Gemini 3.1 Flash Lite Preview is Google's efficient model optimized for high-volume use cases. It outperforms Gemini 2.5 Flash Lite in overall quality and approaches the level of Gemini 2.5 Flash in key capabilities—improvements cover audio input and ASR, RAG passage ranking, translation, data extraction, and code completion.

Its positioning is clear: when your call volume is high enough that flagship models become economically infeasible, Flash Lite is the "still works, and is affordable" choice. Combined with a 1 million token context window, it delivers exceptional cost-effectiveness in scenarios like long-document preprocessing.

SeaWhale AI provides Gemini 3.1 Flash Lite Preview through an OpenAI-compatible interface, supporting tool calling, streaming output, and multimodal input.

Get API Key · Model ID: gemini-3.1-flash-lite-preview


Why Choose Gemini 3.1 Flash Lite Preview

  • Economic choice for high-volume scenarios — core cost control for high-frequency calls
  • Overall quality better than 2.5 Flash Lite — key capabilities close to 2.5 Flash
  • 1 million token context — the lightweight tier also supports ultra-long inputs
  • Full thinking effort support — thinking depth can be increased when needed
  • Multimodal input — unified processing of text and images

Core Capabilities

01 Audio Input and Speech Recognition

Flash Lite delivers notable improvements in audio input and ASR (automatic speech recognition) over the previous generation, making it well suited for large-scale speech transcription and audio content processing pipelines.

  • Speech-to-text and transcription
  • Audio content understanding
  • Batch processing of meeting and customer service recordings

02 RAG Passage Ranking

In retrieval-augmented generation pipelines, Flash Lite is well suited to reranking recalled results—picking out the most relevant passages and passing them to a stronger model, significantly reducing overall costs.

  • Retrieval result relevance ranking
  • Passage filtering and trimming
  • Cost optimization layer for RAG pipelines

03 Translation and Data Extraction

Translation quality and structured data extraction are key improvement areas in this generation, making it ideal for large-scale multilingual content processing and unstructured data conversion.

  • Multilingual translation
  • Form and document field extraction
  • Structured JSON output

04 Code Completion

Improvements in code completion allow it to handle high-frequency, low-latency scenarios such as IDE inline completion.

  • IDE inline code completion
  • Code snippet generation
  • Syntax and format correction

Best Use Cases

Scenario Description
Large-scale transcription Large-scale audio/speech to text
RAG reranking Relevance scoring and filtering of retrieval results
Multilingual translation Large-scale content localization
Data extraction Unstructured text to structured fields
Code completion Low-latency scenarios like IDE inline completion
Long-document preprocessing Low-cost summarization within a 1 million token window

Differences Between Gemini 3.1 Flash Lite, Gemini 3.5 Flash, and 3 Flash

Capability Gemini 3.1 Flash Lite Gemini 3 Flash Preview Gemini 3.5 Flash
Model ID gemini-3.1-flash-lite-preview gemini-3-flash-preview gemini-3.5-flash
Positioning High-volume economic tier Fast general-purpose tier Efficient multimodal mainstay
Context window ~1.05 million tokens ~1.05 million tokens 105,000 tokens
Max output 65.5K tokens 65.5K tokens 64K tokens
Focus ASR, ranking, translation, extraction General fast response Coding and parallel agents
Relative cost Lowest Low Medium

Please refer to the real-time price card at the top of the page for specific billing.


How to Use the Gemini 3.1 Flash Lite Preview API

1. Create a SeaWhale AI API key Generate a key and add credits in the console.

2. Use it as the first layer of your pipeline A typical approach is to let Flash Lite handle front-end tasks like filtering, ranking, and extraction, then pass the refined content to a stronger model for final reasoning.

3. Call the API

curl -X POST https://api.atalk-ai.com/v1/chat/completions \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
    "model": "gemini-3.1-flash-lite-preview",
    "messages": [
      {"role": "user", "content": "From the 20 retrieval results below, pick the 3 most relevant to the question and output only the numbers."}
    ]
  }'

FAQ

How much better is it than 2.5 Flash Lite? It has better overall quality than 2.5 Flash Lite and approaches the level of 2.5 Flash in key capabilities. The improvements focus on audio input/ASR, RAG passage ranking, translation, data extraction, and code completion.

How large is the context window? Approximately 1.05 million tokens, making it one of the most generous context options in the lightweight tier—very cost-effective for long-document preprocessing.

Does it support thinking/reasoning? Yes. It supports the full range of thinking effort settings, which can be adjusted up or down based on task difficulty.

Which layer of a RAG pipeline is it best for? It is best suited for the reranking and filtering layer. Using it to refine recalled results before passing them to a stronger model can significantly reduce overall costs.

Does it support audio input? The upstream model supports audio input and ASR; specific availability is subject to the platform's API documentation.

What does Preview mean? It means this is a preview version, and capabilities and interfaces may be adjusted with upstream updates. It is recommended to have a plan for version changes before production use.


Why Use the Gemini 3.1 Flash Lite API with SeaWhale AI

  • Direct connectivity in China — no Google Cloud account or overseas network required
  • OpenAI-compatible interface — connect existing code by changing just two lines
  • Tiered pipeline friendly — shares keys with Gemini 3.5 Flash and Pro tiers, routing by stage
  • Unified usage dashboard — centralized view of spending for large-scale calls

API

API integration

Model IDUse this value as the model in inference requests
gemini-3.1-flash-lite-preview
API KeyBearer token used to authenticate inference requests
Base URLOpenAI compatible · /chat/completions
OpenAIhttps://api.atalk-ai.com/v2/
provider OptionalSelects a service channel; omit it and the system picks the default
"provider": { "channel": "direct" }

gemini-3.1-flash-lite-preview usage examples

SeaWhale AI is compatible with the OpenAI API protocol, so you can call it with the OpenAI SDK or plain HTTP requests. Streaming is enabled by default.

About the provider parameter (optional, a SeaWhale AI extension): most models are served over several channels that differ slightly in price and reliability. Add a provider field to the request body to pick one; omit it and the system selects the default channel — normal calls are unaffected.

provider is not part of the official OpenAI protocol — it is a SeaWhale AI extension that only takes effect on this platform. The OpenAI SDK allows custom fields like this to pass through; see the examples below.

ValueChannelBest for
directDirectThe official upstream link, for native behavior and the full context window
stablePreferredBalanced availability and speed — a good default for production traffic
economicalEconomyCost first, well suited to batch processing and price-sensitive workloads

Available channels and their prices are listed under "Pricing" above (channels vary by model). Additional notes:

  • Syntax: "provider": { "channel": "direct" }.
  • If the requested channel is not enabled for that model, the request automatically falls back to the default channel and returns normally — it does not error.
  • With the official SDKs: in Python pass it via extra_body; in Node.js put it directly on the request object and it passes through. In TypeScript projects, add a // @ts-expect-error line to skip the type check.
js
curl https://api.atalk-ai.com/v2/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer <API_KEY>" \
  -d '{
    "model": "gemini-3.1-flash-lite-preview",
    "messages": [
      {"role": "system", "content": "You are a helpful assistant."},
      {"role": "user", "content": "Hello!"}
    ],
    "provider": { "channel": "direct" },
    "stream": true
  }'
# provider is optional — remove this line to use the default channel
js
from openai import OpenAI

client = OpenAI(
    base_url="https://api.atalk-ai.com/v2",
    api_key="<API_KEY>",
)

stream = client.chat.completions.create(
    model="gemini-3.1-flash-lite-preview",
    messages=[
        {"role": "system", "content": "You are a helpful assistant."},
        {"role": "user", "content": "Hello!"},
    ],
    stream=True,
    # Optional: pick a service channel; omit to use the default
    extra_body={"provider": {"channel": "direct"}},
)

for chunk in stream:
    if chunk.choices[0].delta.content:
        print(chunk.choices[0].delta.content, end="", flush=True)
js
import OpenAI from 'openai'

const client = new OpenAI({
  baseURL: 'https://api.atalk-ai.com/v2',
  apiKey: '<API_KEY>',
})

const stream = await client.chat.completions.create({
  model: 'gemini-3.1-flash-lite-preview',
  messages: [
    { role: 'system', content: 'You are a helpful assistant.' },
    { role: 'user', content: 'Hello!' },
  ],
  stream: true,
  // Optional: pick a service channel; omit to use the default
  // @ts-expect-error provider is a SeaWhale AI extension, not in the OpenAI SDK types
  provider: { channel: 'direct' },
})

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