← Back to research
Pricing18 min readPublished 2026-07-13

Gemini API Too Expensive? Cut Gemini 3.1 Pro, 3.5 Flash and 3 Flash Costs by 40% with LumeAPI

Cut Gemini 3.1 Pro, 3.5 Flash and 3 Flash API costs by 40% with LumeAPI — pricing tables, thinking tokens, Batch vs real-time, Python/cURL examples, migration testing and FAQ.

Last updated: July 13, 2026

Google's Gemini models are attractive to developers because they combine strong reasoning, multimodal input, long context, tool use and relatively competitive API pricing.

However, a low price per million tokens does not always produce a low production bill.

Gemini applications may also pay for thinking tokens, repeated conversation history, long prompts, context-cache storage, search grounding, agent loops and failed tool calls. A model that looks inexpensive on the pricing page can become costly when one user request triggers several model calls.

For developers using standard real-time Gemini text requests, LumeAPI currently lists three major Gemini models at prices 40% below Google's standard rates:

ModelGoogle standard inputGoogle standard outputLumeAPI inputLumeAPI output
Gemini 3.1 Pro Preview$2.00$12.00$1.20$7.20
Gemini 3.5 Flash$1.50$9.00$0.90$5.40
Gemini 3 Flash$0.50$3.00$0.30$1.80

Prices are per one million tokens. The Gemini 3.1 Pro rates shown above apply to prompts of no more than 200,000 tokens. Google charges higher rates when a Gemini 3.1 Pro prompt exceeds that threshold. Google also counts thinking tokens as output usage for these models.

LumeAPI exposes the three models through an OpenAI-compatible API using the IDs gemini-3.1-pro-preview, gemini-3.5-flash and gemini-3-flash.

LumeAPI is an independent third-party gateway. It is not Google, Google AI Studio or an official Google Cloud billing channel. Before moving production traffic, developers should compare output quality, feature compatibility, privacy, latency and reliability—not only token prices.

Quick Answer

LumeAPI may be a good fit when you:

  • Use Gemini 3.1 Pro, Gemini 3.5 Flash or Gemini 3 Flash.
  • Need real-time text generation rather than asynchronous Batch processing.
  • Have meaningful recurring input and output usage.
  • Already use the OpenAI SDK or an OpenAI-compatible framework.
  • Want to call Gemini, GPT and Claude through one API key.
  • Do not depend heavily on Google-native features such as Search Grounding, Maps Grounding, Live API or explicit Context Caching.

At Google's standard rates, an application processing 100 million input tokens and 20 million output tokens per month would cost approximately:

ModelGoogle standard costLumeAPI costMonthly saving
Gemini 3.1 Pro$440$264$176
Gemini 3.5 Flash$330$198$132
Gemini 3 Flash$110$66$44

These calculations assume prompts remain below the Gemini 3.1 Pro 200,000-token pricing threshold and that the same number of tokens is billed through both services.

Google's official API can still be less expensive for some workloads. Batch and Flex processing currently reduce the Gemini 3.1 Pro and Gemini 3.5 Flash input and output rates by 50%. Gemini 3.1 Flash-Lite is also available directly from Google at only $0.25 per million input tokens and $1.50 per million output tokens.

The correct question is therefore not:

Which provider has the lowest advertised token price?

It is:

Which model and access method produce the lowest cost per successfully completed task?

The Current Gemini Model Lineup

Gemini 3.1 Pro Preview

Gemini 3.1 Pro Preview is designed for complex multimodal understanding, agentic workflows, coding and difficult reasoning tasks. Google's standard pricing changes according to prompt length:

Prompts up to 200,000 tokens

  • Input: $2 per million tokens
  • Output, including thinking tokens: $12 per million tokens
  • Cached context: $0.20 per million tokens

Prompts above 200,000 tokens

  • Input: $4 per million tokens
  • Output, including thinking tokens: $18 per million tokens
  • Cached context: $0.40 per million tokens

Context-cache storage is billed separately at $4.50 per million tokens per hour.

LumeAPI lists Gemini 3.1 Pro at:

  • Input: $1.20 per million tokens
  • Output: $7.20 per million tokens

This is 40% below Google's standard short-context rates. LumeAPI's public catalog does not currently publish a separate price tier for prompts above 200,000 tokens, so developers with extremely long prompts should confirm supported context length and billing before migration.

Gemini 3.1 Pro is most relevant when a cheaper Flash model cannot reliably complete the task. Possible use cases include:

  • Complex software-engineering tasks
  • Large document analysis
  • High-value research
  • Multimodal reasoning
  • Difficult agent planning
  • Final validation of important outputs

Using Pro for simple classification or basic rewriting usually creates unnecessary cost.

Gemini 3.5 Flash

Google describes Gemini 3.5 Flash as its most intelligent model built for speed, combining stronger intelligence with search and grounding capabilities.

Its standard API prices are:

  • Input: $1.50 per million tokens
  • Output, including thinking tokens: $9 per million tokens
  • Cached context: $0.15 per million tokens
  • Cache storage: $1 per million tokens per hour

Google also offers Batch and Flex rates of $0.75 for input and $4.50 for output. Priority processing is more expensive at $2.70 for input and $16.20 for output.

LumeAPI lists Gemini 3.5 Flash at:

  • Input: $0.90 per million tokens
  • Output: $5.40 per million tokens

Gemini 3.5 Flash may be suitable for:

  • General AI assistants
  • Coding features
  • Multi-step agents
  • Document processing
  • Research workflows
  • Tool-using applications
  • High-volume production tasks that still require strong reasoning

Despite the Flash name, it should not automatically be treated as a lightweight model. Its $9 standard output price is three times the output price of Gemini 3 Flash and six times the output price of Gemini 3.1 Flash-Lite.

Gemini 3 Flash

Google's official pricing page currently identifies this model as Gemini 3 Flash Preview, while LumeAPI's catalog labels the corresponding access option as Gemini 3 Flash.

Google's standard rates are:

  • Input: $0.50 per million text, image or video tokens
  • Audio input: $1 per million tokens
  • Output, including thinking tokens: $3 per million tokens
  • Cached text, image or video context: $0.05 per million tokens
  • Cache storage: $1 per million tokens per hour

Google's Batch and Flex rates are $0.25 for input and $1.50 for output.

LumeAPI lists:

  • Input: $0.30 per million tokens
  • Output: $1.80 per million tokens

Gemini 3 Flash is a practical option for:

  • Chatbots
  • Classification
  • Information extraction
  • Query routing
  • Summarization
  • Content moderation support
  • High-volume automation
  • Lightweight agent subtasks

It provides a lower-cost middle ground between Gemini 3.5 Flash and Gemini 3.1 Flash-Lite.

Gemini 3.1 Flash-Lite

Gemini 3.1 Flash-Lite is Google's most cost-efficient current text-out model for high-frequency agentic tasks, translation and simple data processing. It supports text, image, video, audio and PDF inputs.

Its standard prices are:

  • Text, image or video input: $0.25 per million tokens
  • Audio input: $0.50 per million tokens
  • Output, including thinking tokens: $1.50 per million tokens

Its Batch and Flex prices are:

  • Text, image or video input: $0.125 per million tokens
  • Output: $0.75 per million tokens

LumeAPI does not currently list Gemini 3.1 Flash-Lite in its public text-model catalog.

This creates an important decision point:

If Gemini 3.1 Flash-Lite is capable enough for your workload, Google's official API may be cheaper than accessing Gemini 3 Flash through LumeAPI.

LumeAPI's value is stronger for users who specifically need Gemini 3 Flash, Gemini 3.5 Flash or Gemini 3.1 Pro at lower standard real-time rates.

Why Gemini API Bills Can Grow Faster Than Expected

Thinking Tokens Are Billable

Google's output prices for the current Gemini 3 text models include thinking tokens.

The final answer displayed to a user may contain only 500 tokens, but the total billed output can include additional tokens used internally during reasoning. This is especially relevant for difficult coding, planning and agent tasks.

Developers should therefore record:

  • Prompt token count
  • Visible response token count
  • Thinking token count
  • Total billed output usage
  • Number of calls per completed task

Do not estimate costs from the visible answer length alone.

A model with a lower output price may still cost more if it uses substantially more thinking tokens or requires additional retries.

Long Context Can Change the Unit Price

Gemini 3.1 Pro is not billed at one fixed rate for every request.

When a prompt exceeds 200,000 tokens:

  • The input rate rises from $2 to $4.
  • The output rate rises from $12 to $18.
  • The cached-context rate rises from $0.20 to $0.40.

A 300,000-token request is therefore not simply twice as expensive as a 150,000-token request. It contains more tokens and is billed at a higher rate per token.

Long-context products can reduce spending by:

  • Retrieving only relevant document sections
  • Removing duplicated passages
  • Summarizing old conversation turns
  • Storing structured state outside the prompt
  • Dividing large tasks into stages
  • Using a cheaper model for document filtering
  • Avoiding repeated transmission of the same files

A one-million-token context window is a capability, not a recommendation to send one million tokens with every request.

Context Caching Includes Storage Costs

Google offers discounted cached-token rates, but caching is not free.

For Gemini 3.5 Flash, cached context costs $0.15 per million tokens and storage costs $1 per million tokens per hour.

For Gemini 3.1 Pro, cached context costs $0.20 per million tokens for prompts up to 200,000 tokens, while storage costs $4.50 per million tokens per hour.

Caching is most useful when a stable prompt prefix is reused frequently.

Good candidates include:

  • Long system instructions
  • Tool definitions
  • Product documentation
  • Coding standards
  • Frequently referenced documents
  • Repeated conversation prefixes

Caching may not be worthwhile when:

  • The content is used only once.
  • Most of the prompt changes on every request.
  • The cache remains stored for a long time but is rarely accessed.
  • The content is too small to create meaningful savings.

Calculate the cache write, read and storage costs together.

Search Grounding Can Add Separate Charges

Google currently includes 5,000 monthly grounding prompts across Gemini 3 models. After that allowance, Search and Maps grounding for models such as Gemini 3.5 Flash and Gemini 3.1 Pro costs $14 per 1,000 search queries.

One model request can trigger more than one search query, and Google bills each individual query performed.

This means 10,000 user requests do not necessarily equal 10,000 billable searches.

For grounded applications, track:

  • User requests
  • Grounded model requests
  • Search queries generated
  • Average queries per request
  • Grounding cost per successful answer

LumeAPI's public model documentation does not currently advertise Google Search or Maps grounding. Applications that depend on native grounding should continue using Google or implement an external search tool.

Agent Loops Multiply Usage

A normal chatbot might make one model request per user message.

An agent might make several:

  1. Understand the task.
  2. Generate a plan.
  3. Select a tool.
  4. Read the tool result.
  5. Correct an error.
  6. Use another tool.
  7. Validate the answer.
  8. Produce the final response.

If every step includes the original instructions, tool schemas and previous observations, input usage grows rapidly.

Useful controls include:

  • Maximum steps per task
  • Maximum cost per task
  • Retry limits
  • Tool-result compression
  • Shorter tool schemas
  • Early stopping when the answer is complete
  • A cheaper model for simple subtasks
  • Escalation to Pro only when needed

The best metric is:

Total model and tool cost divided by successfully completed agent tasks.

Real Cost Scenario 1: High-Volume Chatbot

Assume a chatbot processes each month:

  • 100 million input tokens
  • 20 million output tokens

Using Gemini 3 Flash at Google's standard rates:

text
Input:
100 × $0.50 = $50

Output:
20 × $3.00 = $60

Total:
$110 per month

Using LumeAPI:

text
Input:
100 × $0.30 = $30

Output:
20 × $1.80 = $36

Total:
$66 per month

Estimated saving:

text
Monthly: $44
Annual: $528

The saving is useful, but conversation architecture may have a larger effect.

If the application repeatedly sends full chat histories, summarizing older turns could reduce input usage by more than the provider change alone.

Real Cost Scenario 2: AI Agent

Assume an agent platform processes:

  • 100 million input tokens
  • 20 million output tokens
  • Gemini 3.5 Flash

Google standard cost:

text
100 × $1.50 + 20 × $9
= $150 + $180
= $330 per month

LumeAPI cost:

text
100 × $0.90 + 20 × $5.40
= $90 + $108
= $198 per month

Estimated saving:

text
Monthly: $132
Annual: $1,584

This estimate excludes separately billed grounding and assumes identical thinking-token usage.

If the agent makes unnecessary loops, reducing the average number of calls per task from eight to six would cut model usage by roughly 25% before any change of provider.

Real Cost Scenario 3: Complex Coding or Document Product

Assume a product uses Gemini 3.1 Pro for:

  • Codebase analysis
  • Long documents
  • Difficult reasoning
  • Final output validation

Monthly usage:

  • 100 million input tokens
  • 20 million output tokens
  • All prompts remain below 200,000 tokens

Google standard cost:

text
100 × $2 + 20 × $12
= $200 + $240
= $440 per month

LumeAPI cost:

text
100 × $1.20 + 20 × $7.20
= $120 + $144
= $264 per month

Estimated saving:

text
Monthly: $176
Annual: $2,112

If many requests exceed 200,000 tokens, the Google standard cost will be higher than this estimate. The LumeAPI cost should not be assumed to remain unchanged until its long-context support and billing have been confirmed.

When Google's Official API Can Be Cheaper

Batch Processing

Google's paid Gemini API includes Batch processing with a 50% token discount.

For Gemini 3.1 Pro with prompts up to 200,000 tokens:

Access methodInputOutput
Google Standard$2.00$12.00
Google Batch$1.00$6.00
LumeAPI Standard$1.20$7.20

For Gemini 3.5 Flash:

Access methodInputOutput
Google Standard$1.50$9.00
Google Batch$0.75$4.50
LumeAPI Standard$0.90$5.40

Google Batch is cheaper than LumeAPI's current standard rates for these models.

Use Batch when your work does not need an immediate response, such as:

  • Offline classification
  • Dataset enrichment
  • Bulk content generation
  • Document extraction
  • Evaluation runs
  • Nightly processing

Use LumeAPI when you need lower-cost standard real-time responses.

Flex Processing

Google's Flex rates currently match its Batch rates for Gemini 3.1 Pro, Gemini 3.5 Flash, Gemini 3 Flash and Gemini 3.1 Flash-Lite. Flex can reduce costs for workloads that tolerate lower priority or variable latency.

Developers should compare the reliability and completion characteristics of Flex with their application requirements rather than treating it as a direct replacement for standard real-time inference.

Gemini 3.1 Flash-Lite

For simple tasks, Google's official Gemini 3.1 Flash-Lite may be the lowest-cost option.

At $0.25 per million input tokens and $1.50 per million output tokens, it is cheaper than LumeAPI's Gemini 3 Flash price of $0.30 and $1.80.

Consider Flash-Lite for:

  • Translation
  • Simple extraction
  • Classification
  • Content tagging
  • High-volume routing
  • Lightweight multimodal processing

Do not pay for a stronger model unless testing shows that the task requires it.

Google-Native Features

Google's official API is also the more appropriate choice when you need:

  • Google Search Grounding
  • Google Maps Grounding
  • Live audio APIs
  • Native Context Caching
  • Batch or Flex processing
  • Gemini-specific multimodal controls
  • Priority processing
  • Direct Google Cloud enterprise support
  • Immediate access to newly released Gemini models

An OpenAI-compatible text endpoint should not be treated as a complete replacement for the entire Gemini platform.

How to Call Gemini Through LumeAPI

LumeAPI's base URL is:

text
https://api.lumeapi.site/v1

A developer can use the OpenAI Python SDK with a LumeAPI key and exact model ID.

python
import os
from openai import OpenAI

client = OpenAI(
    api_key=os.environ["LUMEAPI_KEY"],
    base_url="https://api.lumeapi.site/v1",
)

response = client.chat.completions.create(
    model="gemini-3.5-flash",
    messages=[
        {
            "role": "system",
            "content": "You are a concise product-analysis assistant.",
        },
        {
            "role": "user",
            "content": "Summarize the three most important themes in this feedback.",
        },
    ],
    max_tokens=800,
)

print(response.choices[0].message.content)

LumeAPI documents a shared /v1/chat/completions endpoint and lists exact model IDs in its developer documentation.

A basic cURL test looks like this:

bash
curl https://api.lumeapi.site/v1/chat/completions \
  -H "Authorization: Bearer $LUMEAPI_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gemini-3-flash",
    "messages": [
      {
        "role": "user",
        "content": "Reply with exactly: connection successful"
      }
    ]
  }'

For a standard OpenAI-compatible application, the initial migration normally requires changing:

text
API key
Base URL
Model ID

The prompts and main SDK integration can often remain unchanged.

What You Must Test Before Switching

Basic text generation working correctly does not prove full Gemini compatibility.

Test any feature your application depends on:

  • Streaming
  • Function calling
  • Parallel tools
  • Structured JSON output
  • Image input
  • Audio or video input
  • PDF processing
  • Long context
  • Thinking controls
  • Usage reporting
  • Request cancellation
  • Retry behavior
  • Safety settings
  • Search grounding
  • Context caching

LumeAPI's public documentation currently focuses on OpenAI-style Chat Completions and exact model access. Google-native features that are not documented by LumeAPI should not be assumed to work.

A safe production test should measure:

MetricWhy it matters
Successful-task rateLower token prices are irrelevant if more requests fail
Input and output usageConfirms the true billing difference
Thinking-token behaviorCan materially change Gemini costs
P50 and P95 latencyShows typical and slow-request performance
Streaming reliabilityImportant for chat interfaces
Tool-call accuracyEssential for agents
Structured-output validityEssential for automation
Error rateReveals operational risk
Cost per successful taskCombines price and quality

Start with synthetic or non-sensitive traffic. Then move a small percentage of production requests and increase gradually.

A reasonable rollout is:

text
1% → 5% → 10% → 25% → 50% → 100%

Keep the Google integration available until LumeAPI has demonstrated stable performance for your workload.

Frequently Asked Questions

Is Gemini 3.5 Flash cheaper than Gemini 3.1 Pro?

Yes, at standard rates.

Google lists Gemini 3.5 Flash at $1.50 per million input tokens and $9 per million output tokens. Gemini 3.1 Pro costs $2 and $12 for prompts up to 200,000 tokens.

However, the better choice depends on task quality and completion rate.

Is Gemini 3 Flash the cheapest Gemini model?

No.

Gemini 3.1 Flash-Lite is cheaper through Google's official API at $0.25 input and $1.50 output. Gemini 3 Flash costs $0.50 and $3 through Google's standard tier.

Does LumeAPI offer Gemini 3.1 Flash-Lite?

Not in its public text-model catalog as of July 13, 2026. It currently lists Gemini 3.1 Pro Preview, Gemini 3.5 Flash and Gemini 3 Flash.

Are the three LumeAPI Gemini models really 40% cheaper?

Based on the currently published standard rates, yes:

  • Gemini 3.1 Pro: $2/$12 through Google versus $1.20/$7.20 through LumeAPI
  • Gemini 3.5 Flash: $1.50/$9 versus $0.90/$5.40
  • Gemini 3 Flash: $0.50/$3 versus $0.30/$1.80

This comparison does not apply to Google Batch, Flex, cached-token or Flash-Lite pricing.

Are thinking tokens included in Gemini pricing?

Google states that thinking tokens are included in the billed output category for the current Gemini 3 text models.

Is LumeAPI always cheaper than Google?

No.

Google can be cheaper when using:

  • Gemini 3.1 Flash-Lite
  • Batch processing
  • Flex processing
  • Effective context caching
  • Enterprise volume discounts

LumeAPI's strongest price advantage is for standard real-time requests to its supported Gemini models.

Can I use the OpenAI SDK with Gemini through LumeAPI?

Yes, for LumeAPI's documented OpenAI-compatible Chat Completions interface. Configure the LumeAPI key, base URL and exact Gemini model ID.

Should I move every Gemini request to LumeAPI?

Not necessarily.

A hybrid architecture may be more effective:

  • Use LumeAPI for standard real-time text generation.
  • Use Google Batch for asynchronous processing.
  • Use Google directly for Flash-Lite.
  • Use Google for native Search Grounding, Live API and caching.
  • Keep Google as a production fallback.

Final Recommendation

Gemini API pricing is more complex than a single input-and-output table suggests.

Your real spending may include:

  • Standard input tokens
  • Thinking and visible output tokens
  • Long-context price tiers
  • Cached-token charges
  • Cache storage
  • Search grounding
  • Multiple agent calls
  • Failed requests and retries

For standard real-time requests, LumeAPI currently lists:

  • Gemini 3.1 Pro at 40% below Google's standard short-context rate
  • Gemini 3.5 Flash at 40% below Google's standard rate
  • Gemini 3 Flash at 40% below Google's standard rate

That can produce meaningful savings for AI assistants, coding products, document applications and agent platforms with sustained usage.

However, LumeAPI is not the cheapest choice for every Gemini workload.

Use Google directly when Gemini 3.1 Flash-Lite is sufficient, when you can use Batch or Flex, or when you depend on Google-native grounding, caching, multimodal or enterprise capabilities.

Consider LumeAPI when you need real-time access to supported Gemini models through an OpenAI-compatible API and want to reduce their standard input and output costs.

Test both routes with your real workload. Measure task success, thinking-token usage, total latency, retries and final cost.

The best Gemini API is not simply the one with the lowest price per million tokens.

It is the one that completes your actual production tasks reliably at the lowest sustainable total cost.