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

LLM API Pricing Comparison 2026: OpenAI vs Claude vs Gemini

Compare GPT, Claude and Gemini API pricing in 2026 — official vs LumeAPI rates, real monthly cost scenarios for chatbots, agents, content and RAG, plus caching and batch savings.

Last updated: July 2026

LLM API pricing is no longer a simple comparison of input and output token rates. The real cost of running an AI product depends on model quality, output length, reasoning usage, prompt caching, context size, tool calls, retries and the number of model requests required to complete each task.

For developers comparing OpenAI, Anthropic and Google APIs, the cheapest model on a pricing table is not necessarily the least expensive model in production. A more capable model may complete a task with fewer retries, shorter prompts or fewer agent loops. A low-priced model may become more expensive if it produces longer answers, fails more often or requires additional validation.

This guide compares current API pricing for leading GPT, Claude and Gemini models, explains how LLM costs are calculated and estimates monthly spending for chatbots, AI agents, content-generation platforms and RAG applications.

It also compares official provider pricing with the rates currently listed by LumeAPI, an OpenAI-compatible gateway offering access to multiple mainstream models through one API key.

Quick Answer

For cost-sensitive, high-volume workloads, lightweight models such as Gemini 3 Flash and GPT-5.4 mini offer the lowest token prices among the models covered in this comparison.

For products that need a balance of reasoning ability and cost, GPT-5.6 Terra, Claude Sonnet 4.6, Gemini 3.1 Pro and Gemini 3.5 Flash are more practical candidates.

For difficult coding, research and professional reasoning tasks, GPT-5.6 Sol and Claude Opus 4.8 sit in the higher-cost category. These models should be used when their additional capability produces measurable improvements in task completion, reliability or output quality.

The biggest savings usually come from combining several strategies:

  • Route each task to the least expensive model that can complete it reliably.
  • Reduce unnecessary output tokens.
  • Cache repeated instructions and context.
  • Use batch processing for non-urgent work.
  • Limit agent loops and retries.
  • Avoid sending full conversation histories on every request.
  • Use a lower-cost compatible API when its reliability, privacy and model support meet your requirements.

OpenAI currently positions GPT-5.6 Sol as its frontier model, GPT-5.6 Terra as the balance between intelligence and cost, and GPT-5.6 Luna as the cost-sensitive option for high-volume workloads. Anthropic similarly recommends choosing models according to capability, speed and cost rather than treating every Claude model as interchangeable.

LLM API Pricing Comparison

The prices below are listed in US dollars per one million input or output tokens.

The official prices represent standard provider rates for the model and context tier shown. Some providers charge different rates for long-context requests, priority processing, regional processing, batch jobs, cached inputs or tool usage.

The LumeAPI prices are the public rates displayed in the LumeAPI model catalog in July 2026.

ModelOfficial inputOfficial outputLumeAPI inputLumeAPI outputListed reduction
GPT-5.6 Sol$5.00$30.00$2.50$15.0050%
GPT-5.6 Terra$2.50$15.00$1.25$7.5050%
GPT-5.4 mini$0.75$4.50$0.375$2.2550%
Claude Opus 4.8$5.00$25.00$3.00$15.0040%
Claude Sonnet 4.6$3.00$15.00$1.80$9.0040%
Gemini 3.1 Pro$2.00$12.00$1.20$7.2040%
Gemini 3.5 Flash$1.50$9.00$0.90$5.4040%
Gemini 3 Flash$0.50$3.00$0.30$1.8040%

OpenAI's official standard rates list GPT-5.6 Sol at $5 per million input tokens and $30 per million output tokens, while GPT-5.6 Terra costs $2.50 for input and $15 for output. GPT-5.4 mini is listed at $0.75 and $4.50. OpenAI also publishes separate cached-input, cache-write and long-context rates.

Anthropic lists Claude Opus 4.8 at $5 per million base input tokens and $25 per million output tokens. Claude Sonnet 4.6 is listed at $3 per million input tokens and $15 per million output tokens. Anthropic also has separate prompt-cache write, cache-hit and batch rates.

Google lists Gemini 3.1 Pro at $2 per million input tokens and $12 per million output tokens for prompts of up to 200,000 tokens. Requests above that threshold use higher rates. Gemini 3 Flash is listed at $0.50 per million text, image or video input tokens and $3 per million output tokens, including thinking tokens. Google also publishes separate batch, caching, grounding and priority-processing rates.

Preview model names, prices and limits can change. Always verify the current model page before committing a production budget.

Standard Cost Comparison

A useful way to compare models is to apply the same workload to every pricing plan.

Consider a workload containing:

  • 1 million input tokens
  • 200,000 output tokens
  • No cached inputs
  • No tools, search calls or other usage-based fees

The calculation is:

Total cost = input usage × input rate + output usage × output rate

Because 200,000 tokens equal 0.2 million tokens, a model charging $5 for input and $30 for output would cost:

$5 + (0.2 × $30) = $11

Cost for 1 Million Input and 200,000 Output Tokens

ModelOfficial costLumeAPI costDifference
GPT-5.6 Sol$11.00$5.50$5.50
GPT-5.6 Terra$5.50$2.75$2.75
GPT-5.4 mini$1.65$0.825$0.825
Claude Opus 4.8$10.00$6.00$4.00
Claude Sonnet 4.6$6.00$3.60$2.40
Gemini 3.1 Pro$4.40$2.64$1.76
Gemini 3.5 Flash$3.30$1.98$1.32
Gemini 3 Flash$1.10$0.66$0.44

This table does not prove that Gemini 3 Flash is the best model for every task. It only shows that it has the lowest token cost for this particular workload.

A valid model decision must also consider:

  • Task completion rate
  • Instruction following
  • Coding or reasoning quality
  • Response latency
  • Average output length
  • Tool-calling reliability
  • Context-window requirements
  • Number of retries
  • Safety and moderation requirements
  • Model availability and rate limits

A model that costs half as much per request but requires twice as many attempts does not create meaningful savings.

Why Output Tokens Matter More Than Many Teams Expect

Output tokens are usually more expensive than input tokens. With GPT-5.6 Sol, for example, the official output rate is six times the input rate. For Claude Opus 4.8, output is five times the input rate. The same broad pattern applies to many Gemini models.

This means a product can reduce spending substantially by controlling response length.

Suppose an application sends one million input tokens and generates one million output tokens.

The official cost would be:

ModelCost at 1M input + 1M output
GPT-5.6 Sol$35.00
GPT-5.6 Terra$17.50
Claude Opus 4.8$30.00
Claude Sonnet 4.6$18.00
Gemini 3.1 Pro$14.00
Gemini 3.5 Flash$10.50
Gemini 3 Flash$3.50

For an output-heavy product, changing the maximum output, response format or prompting strategy may save more money than shortening the user's input.

Useful controls include:

  • Set an appropriate maximum output limit.
  • Ask for concise structured responses.
  • Return JSON instead of long explanatory prose where possible.
  • Generate summaries only when the user requests them.
  • Stop agent output after the required result is produced.
  • Avoid asking one model to repeat information already available in the interface.
  • Separate internal reasoning tasks from user-visible responses where the API supports that distinction.

Do not set output limits so aggressively that responses become incomplete. Track completion quality and cost together.

OpenAI API Pricing

OpenAI's current GPT-5.6 family is divided into capability and cost tiers.

GPT-5.6 Sol

GPT-5.6 Sol is positioned for complex professional work, advanced coding and demanding reasoning tasks. Its official standard rate is:

  • $5 per million input tokens
  • $0.50 per million cached input tokens
  • $30 per million output tokens

It is the most expensive OpenAI model in this comparison, so it should normally be reserved for tasks where its additional capability produces a measurable business benefit.

Appropriate use cases may include:

  • Difficult software-engineering tasks
  • Complex data analysis
  • High-value research workflows
  • Multi-step professional reasoning
  • Final review of important generated work
  • Tasks where failure is more expensive than inference

GPT-5.6 Terra

GPT-5.6 Terra is designed to balance intelligence and cost. Its official standard rate is:

  • $2.50 per million input tokens
  • $0.25 per million cached input tokens
  • $15 per million output tokens

For many SaaS products, Terra may be a more practical default than Sol because it costs half as much at the published standard rates while remaining positioned for strong production performance.

Potential use cases include:

  • AI assistants
  • Coding features
  • Document processing
  • Business automation
  • Customer-support escalation
  • General-purpose agent workflows

GPT-5.4 mini

GPT-5.4 mini is substantially cheaper:

  • $0.75 per million input tokens
  • $0.075 per million cached input tokens
  • $4.50 per million output tokens

It is better suited to high-volume tasks where a smaller model can meet the required quality level.

Potential use cases include:

  • Classification
  • Information extraction
  • Query routing
  • Short summaries
  • Simple rewriting
  • Sub-agent tasks
  • First-pass content processing

Claude API Pricing

Anthropic separates Claude models into tiers designed for different levels of capability and cost.

Claude Opus 4.8

Claude Opus 4.8 is listed at:

  • $5 per million base input tokens
  • $25 per million output tokens
  • $0.50 per million cache-hit tokens
  • Higher rates for new cache writes, depending on cache duration

Anthropic also offers batch processing at $2.50 per million input tokens and $12.50 per million output tokens for eligible asynchronous workloads.

Claude Opus 4.8 is intended for demanding work where deeper reasoning and careful instruction following justify the higher cost.

Potential use cases include:

  • Large codebase analysis
  • Complex planning
  • Long-context document review
  • High-value writing and editing
  • Difficult research synthesis
  • Tasks requiring careful multi-step execution

Anthropic notes that Opus 4.8 defaults to high effort across its API surfaces. Effort settings can affect the amount of internal work performed and should be tested against latency, quality and cost requirements.

Claude Sonnet 4.6

Claude Sonnet 4.6 costs:

  • $3 per million base input tokens
  • $15 per million output tokens
  • $0.30 per million cache-hit tokens
  • $1.50 per million batch input tokens
  • $7.50 per million batch output tokens

This places Sonnet in the balanced middle of the comparison.

It may be appropriate for:

  • AI SaaS applications
  • Coding assistance
  • Writing and editing
  • Conversational products
  • General agent workflows
  • Structured data extraction
  • Customer-support automation

The right choice between Opus and Sonnet depends on whether the increased task quality from Opus offsets its higher per-token cost.

Gemini API Pricing

Google's Gemini pricing requires careful reading because rates may change according to context length, processing mode and modality.

Gemini 3.1 Pro

For standard prompts of up to 200,000 tokens, Gemini 3.1 Pro is listed at:

  • $2 per million input tokens
  • $12 per million output tokens, including thinking tokens
  • $0.20 per million cached-context tokens
  • Additional cached-context storage charges

For prompts above 200,000 tokens, Google lists higher input and output rates. This matters for large-document analysis and long-context agent workflows.

Gemini 3.1 Pro may fit:

  • Long-context analysis
  • Multimodal understanding
  • Coding
  • Agentic workflows
  • Research
  • Complex document processing

Gemini 3.5 Flash

Gemini 3.5 Flash is designed for faster, lower-cost agentic and high-volume workloads. Google describes it as a model optimized for multi-step workflows, sub-agents and iterative tasks at scale.

The LumeAPI catalog lists the corresponding standard reference price as:

  • $1.50 per million input tokens
  • $9 per million output tokens

LumeAPI lists its own rate at:

  • $0.90 per million input tokens
  • $5.40 per million output tokens

Gemini 3 Flash

Gemini 3 Flash is currently one of the lowest-cost mainstream models in this comparison:

  • $0.50 per million text, image or video input tokens
  • $3 per million output tokens, including thinking tokens
  • $0.05 per million cached-context tokens, plus storage

Google also lists lower batch rates for eligible requests.

It may be suitable for:

  • Classification
  • Extraction
  • High-volume chat
  • Search-result processing
  • Lightweight agents
  • Content moderation support
  • Routing and preprocessing
  • Short-form generation

Real Cost Scenario 1: AI Chatbot

Consider a growing AI chatbot that processes the following monthly volume:

  • 10 million input tokens
  • 2 million output tokens

This could represent user messages, system instructions and conversation history across thousands of conversations.

Estimated Monthly Chatbot Cost

ModelOfficial monthly costLumeAPI monthly cost
GPT-5.6 Sol$110.00$55.00
GPT-5.6 Terra$55.00$27.50
Claude Opus 4.8$100.00$60.00
Claude Sonnet 4.6$60.00$36.00
Gemini 3.1 Pro$44.00$26.40
Gemini 3.5 Flash$33.00$19.80
Gemini 3 Flash$11.00$6.60

The largest hidden cost in a chatbot is often repeated conversation history.

A ten-message conversation is not always billed as ten independent short messages. If the full history is sent with each request, earlier messages may be processed repeatedly:

  • Request one contains message one.
  • Request two contains messages one and two.
  • Request three contains messages one, two and three.
  • Later requests may contain the entire conversation.

As conversations become longer, cumulative input usage can grow much faster than the visible amount of new user text.

A production chatbot should consider:

  • Summarizing older messages
  • Storing structured memory outside the prompt
  • Retrieving only relevant conversation history
  • Caching stable system instructions
  • Using a less expensive model for ordinary turns
  • Escalating difficult requests to a more capable model

A tiered system can be more economical than sending every request to the most expensive model.

Real Cost Scenario 2: AI Agent

AI agents often make multiple model calls for one user request.

A single agent task may include:

  1. Understanding the goal
  2. Creating a plan
  3. Selecting a tool
  4. Reading tool output
  5. Revising the plan
  6. Calling another tool
  7. Checking the result
  8. Writing the final answer

If the agent retries failed steps or repeatedly sends its full working context, token usage can increase quickly.

Assume an agent platform processes:

  • 100 million input tokens per month
  • 20 million output tokens per month

Estimated Monthly Agent Cost

ModelOfficial monthly costLumeAPI monthly cost
GPT-5.6 Sol$1,100$550
GPT-5.6 Terra$550$275
Claude Opus 4.8$1,000$600
Claude Sonnet 4.6$600$360
Gemini 3.1 Pro$440$264
Gemini 3.5 Flash$330$198
Gemini 3 Flash$110$66

These estimates exclude separately priced search, grounding, computer-use or other tools.

Agent cost should be measured per completed task, not per API request.

A useful metric is:

Cost per successful task = total model and tool spending ÷ number of tasks completed correctly

Suppose a cheaper model completes only 70% of tasks without intervention, while a more expensive model completes 95%. The lower token rate may not produce the lowest cost per successful result.

To control agent spending:

  • Set a maximum number of steps.
  • Set a maximum cost per task.
  • Stop repeated calls that produce no progress.
  • Route simple subtasks to cheaper models.
  • Use the strongest model only for planning or final validation.
  • Cache stable tool descriptions.
  • Remove irrelevant observations from the active context.
  • Record token usage by task, model and workflow stage.
  • Require explicit approval before unusually expensive operations.

Real Cost Scenario 3: Content Generation

Content-generation applications are usually output-heavy.

Assume a platform processes:

  • 20 million input tokens per month
  • 20 million output tokens per month

Estimated Monthly Content-Generation Cost

ModelOfficial monthly costLumeAPI monthly cost
GPT-5.6 Sol$700$350
GPT-5.6 Terra$350$175
Claude Opus 4.8$600$360
Claude Sonnet 4.6$360$216
Gemini 3.1 Pro$280$168
Gemini 3.5 Flash$210$126
Gemini 3 Flash$70$42

Because output is expensive, small changes in average article length can have a significant effect.

For example, reducing average output from 2,000 tokens to 1,500 tokens lowers output usage by 25%. This can be achieved without reducing useful content when prompts request tighter structure and avoid repeated conclusions, generic introductions and duplicated explanations.

Content platforms can also use staged generation:

  1. A low-cost model creates an outline.
  2. A balanced model writes the draft.
  3. A high-capability model reviews only high-value content.
  4. A deterministic process checks formatting, links and metadata.

Non-urgent bulk content may also be eligible for lower-cost batch processing. OpenAI, Anthropic and Google publish discounted processing options for supported asynchronous workloads, although model eligibility and turnaround conditions differ.

Real Cost Scenario 4: RAG and Document Question Answering

RAG applications retrieve external information and add it to the model prompt.

Assume a document assistant processes:

  • 100 million input tokens per month
  • 10 million output tokens per month

Estimated Monthly RAG Cost Without Caching

ModelOfficial monthly costLumeAPI monthly cost
GPT-5.6 Sol$800$400
GPT-5.6 Terra$400$200
Claude Opus 4.8$750$450
Claude Sonnet 4.6$450$270
Gemini 3.1 Pro$320$192
Gemini 3.5 Flash$240$144
Gemini 3 Flash$80$48

RAG costs can become unnecessarily high when applications retrieve too many chunks or repeatedly send the same large reference material.

Cost controls include:

  • Retrieve fewer, more relevant chunks.
  • Use reranking before generation.
  • Remove duplicated passages.
  • Compress long documents.
  • Cache frequently reused context.
  • Use metadata filters before vector search.
  • Route simple factual queries to a cheaper model.
  • Use long-context models only when retrieval is insufficient.
  • Track the average retrieved-token count per query.

A larger context window does not mean every request should contain the maximum possible amount of text.

How Prompt Caching Changes LLM Costs

Prompt caching reduces the cost of repeatedly processing identical or stable prompt content.

Common cacheable content includes:

  • System instructions
  • Tool definitions
  • Coding standards
  • Product documentation
  • Large reference documents
  • Repeated conversation prefixes
  • Standard output schemas

The exact implementation differs by provider.

OpenAI publishes separate cached-input rates for supported models. GPT-5.6 Sol and Terra cached inputs are listed at one-tenth of their standard input rates, although OpenAI also lists cache-write prices and different long-context tiers.

Anthropic distinguishes between base input tokens, cache writes and cache hits. A cache hit for Claude Opus 4.8 costs $0.50 per million tokens compared with $5 for normal input, while writing a new cache entry costs more than ordinary input. This means caching is most useful when content will be reused enough times to recover the initial write cost.

Google publishes context-caching token rates and separate storage fees. For Gemini 3.1 Pro, cached context for prompts of up to 200,000 tokens is listed at $0.20 per million tokens, but storage charges must also be included in the calculation.

Before relying on caching, answer five questions:

  1. How much of the prompt remains identical?
  2. How often will that content be reused?
  3. How long must the cache remain active?
  4. Does the provider charge for cache creation or storage?
  5. Does the selected gateway expose the provider's caching behavior?

Do not assume that a third-party gateway passes through every provider-specific caching feature. Confirm endpoint support and billing behavior in the relevant documentation.

When Batch Processing Saves Money

Batch APIs process requests asynchronously instead of returning an immediate response.

They are useful for:

  • Bulk classification
  • Data extraction
  • Content generation
  • Embedding or enrichment pipelines
  • Evaluation jobs
  • Document summarization
  • Offline dataset processing
  • Nightly automation

They are generally unsuitable for:

  • Live chat
  • Interactive agents
  • Real-time search
  • Customer-facing autocomplete
  • Time-sensitive support requests

Anthropic's published batch prices for Claude Opus 4.8 and Sonnet 4.6 are half their standard base input and output rates. Google also publishes lower batch rates for supported Gemini models. OpenAI maintains separate batch pricing for eligible models and workloads.

Batch processing can be one of the simplest ways to lower costs when the application does not need an immediate response.

However, teams should also plan for:

  • Delayed completion
  • Partial failures
  • Retry behavior
  • Result reconciliation
  • Idempotency
  • File-size or job-size limits
  • Model-specific eligibility
  • Expiration windows

Long-Context Pricing

Long-context requests can create two different cost problems.

First, more input tokens are processed. Even when the per-token rate remains unchanged, a 500,000-token prompt costs far more than a 20,000-token prompt.

Second, some providers apply higher token rates after a context threshold.

Google's published Gemini 3.1 Pro standard rate increases for prompts above 200,000 tokens. OpenAI also publishes separate short-context and long-context pricing for several models. Anthropic states that several current Claude models include the full one-million-token context window at their standard per-token rates, although total cost still rises with the number of tokens used.

Long context is valuable when the task genuinely requires it. It should not replace good retrieval, summarization and memory architecture.

Before sending a very large prompt, consider:

  • Does the model need every document?
  • Can repeated sections be removed?
  • Can retrieval identify the relevant pages?
  • Can old conversation turns be summarized?
  • Can structured state replace raw transcript history?
  • Can the task be divided into smaller stages?
  • Will caching reduce repeated processing?

Official APIs vs API Aggregators vs Self-Hosting

Model selection is only one part of the cost decision. Developers must also choose how they access those models.

Official Provider APIs

Official APIs provide the most direct relationship with the model company.

Potential advantages include:

  • First-party documentation
  • Direct access to new features
  • Clear model ownership
  • Enterprise agreements
  • Provider-specific tools and controls
  • Direct support channels
  • Native caching, batch and platform features

Potential disadvantages include:

  • Separate accounts for each provider
  • Separate billing systems
  • Different API formats
  • Higher listed rates for some models
  • Additional engineering work for multi-provider support

Official access is often the safest default for organizations with strict compliance, procurement or enterprise-support requirements.

Aggregated and OpenAI-Compatible APIs

An API aggregator provides access to multiple models through one account or interface.

Potential advantages include:

  • One API key
  • Unified billing
  • Easier model switching
  • Lower integration cost
  • Access to models from several companies
  • Potentially lower token prices

LumeAPI uses an OpenAI-compatible base endpoint and model IDs listed in its catalog. Developers can send OpenAI-style chat-completion requests to supported GPT, Claude, Gemini and other models. Its public documentation lists the shared base endpoint, request parameters, streaming behavior and common error responses.

Before using any third-party API in production, verify:

  • The exact model being served
  • Feature compatibility
  • Logging and data-retention rules
  • Privacy terms
  • Rate limits
  • Availability history
  • Error handling
  • Support response times
  • Refund and balance policies
  • Whether provider-specific tools are exposed
  • Whether cached-input or batch discounts are supported
  • Whether the service meets your compliance requirements

Run a controlled test before moving production traffic.

Self-Hosted Models

Self-hosting can make sense when an organization needs:

  • Full infrastructure control
  • Custom model weights
  • Private deployment
  • Predictable dedicated capacity
  • Very high sustained usage

But self-hosting introduces costs that are not visible in token pricing:

  • GPUs
  • Idle capacity
  • Autoscaling
  • Inference optimization
  • Monitoring
  • Security
  • Model upgrades
  • Engineering staff
  • Reliability and failover
  • Regional deployment

A self-hosted model with no per-token bill is not necessarily cheaper than an API.

How to Choose the Right LLM API

Do not start by asking, "Which model is cheapest?"

Start with:

What is the least expensive model that can complete this workload reliably at the required quality and latency?

A practical evaluation process looks like this:

1. Define the Task

Separate workloads such as:

  • Classification
  • Extraction
  • Chat
  • Coding
  • Research
  • Planning
  • Long-document analysis
  • Tool use
  • Final answer generation

One model does not need to handle every task.

2. Build a Representative Test Set

Use real examples from your application, including:

  • Easy cases
  • Typical cases
  • Difficult cases
  • Long inputs
  • Ambiguous instructions
  • Tool failures
  • Adversarial or malformed inputs

3. Measure Quality

Track:

  • Accuracy
  • Completion rate
  • Human preference
  • Format compliance
  • Tool-call correctness
  • Hallucination rate
  • Retry rate
  • Escalation rate

4. Measure Cost

Track:

  • Input tokens
  • Cached tokens
  • Output tokens
  • Reasoning or thinking tokens
  • Tool fees
  • Retries
  • Total cost per request
  • Total cost per successful task

5. Measure Performance

Track:

  • Time to first token
  • Total latency
  • Throughput
  • Rate-limit errors
  • Timeout rate
  • Availability

6. Route Tasks Dynamically

A common production architecture uses:

  • A lightweight model for routing
  • A balanced model for normal tasks
  • A frontier model for difficult tasks
  • A fallback model for outages
  • A separate model for validation

This avoids paying frontier-model prices for every request.

How to Reduce LLM API Costs

Use the Smallest Reliable Model

Do not use a flagship model for deterministic extraction or simple classification unless testing shows that smaller models fail.

Reduce Output Length

Output tokens frequently carry the highest rate. Ask for only the information the application needs.

Cache Stable Prompts

Repeated system prompts, tool definitions and reference documents are strong caching candidates.

Compress Conversation History

Replace old raw messages with structured summaries and retrieve only relevant memories.

Limit Agent Steps

Set maximum loops, retry limits, time limits and task budgets.

Use Batch Processing

Move offline and non-urgent tasks to discounted processing modes.

Route Requests by Difficulty

Use a low-cost model first and escalate only when confidence is low or validation fails.

Monitor Costs by Feature

A total monthly invoice is not enough. Record cost by:

  • Customer
  • Product feature
  • Workflow
  • Model
  • Endpoint
  • Agent
  • Task type

Compare Providers Using Real Workloads

Tokenizers, output lengths and reasoning behavior differ. A fixed price table cannot replace an application-specific test.

Evaluate Compatible API Providers

A compatible gateway may reduce model prices and simplify multi-provider access. The savings should be weighed against reliability, privacy, feature coverage and support.

Official Pricing vs LumeAPI Pricing

LumeAPI's catalog currently lists:

  • 50% lower rates for supported OpenAI text models in this comparison
  • 40% lower rates for supported Claude models
  • 40% lower rates for supported Gemini models

The gateway uses the following base endpoint:

https://api.lumeapi.site/v1

A basic request follows the OpenAI-style chat-completions format:

bash
curl https://api.lumeapi.site/v1/chat/completions \
  -H "Authorization: Bearer $LUMEAPI_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-5.6-terra",
    "messages": [
      {
        "role": "user",
        "content": "Explain prompt caching in three concise points."
      }
    ]
  }'

The public LumeAPI documentation lists streaming support for text models and common responses including authentication errors, insufficient balance, invalid model IDs, rate limits and temporary gateway errors.

Before migrating a production application:

  1. Test output quality against the official endpoint.
  2. Verify streaming and tool-call compatibility.
  3. Test timeout and retry behavior.
  4. Review privacy and data-retention terms.
  5. Confirm rate limits.
  6. Run a small percentage of traffic through the new endpoint.
  7. Compare successful-task cost, not only token cost.
  8. Maintain a rollback path.

Frequently Asked Questions

Which LLM API is the cheapest in 2026?

Among the mainstream models compared here, Gemini 3 Flash has the lowest listed standard input and output rates. GPT-5.4 mini is the lowest-priced OpenAI model included in the table.

However, the cheapest model depends on the task. A higher-priced model can be more economical if it completes the work with fewer retries, fewer tokens or less human review.

Is Claude cheaper than OpenAI?

It depends on the models being compared.

Claude Opus 4.8 has the same official input price as GPT-5.6 Sol but a lower output price: $25 instead of $30 per million tokens.

Claude Sonnet 4.6 costs slightly more than GPT-5.6 Terra on both input and output at official standard rates. Actual value depends on workload quality and token usage.

Is Gemini cheaper than GPT and Claude?

Gemini's Flash models are generally priced lower than the flagship and balanced GPT and Claude models in this comparison.

Gemini 3.1 Pro also has a relatively low standard rate for prompts up to 200,000 tokens, but Google applies higher pricing beyond that context threshold. Tool, grounding and storage fees may also affect total cost.

How much does one million tokens cost?

There is no single answer.

One million input tokens can cost from $0.50 to $5 among the official mainstream models in this article. One million output tokens can cost from $3 to $30.

The input/output ratio has a major effect on the final bill.

How many words are in one million tokens?

Token-to-word ratios vary by language, formatting and tokenizer. English prose is often estimated at roughly 0.7 to 0.8 words per token, but application billing should always use actual token counts reported by the API rather than a general conversion estimate.

Are reasoning tokens billed?

Depending on the provider and model, reasoning or thinking tokens may be counted as output usage. Google explicitly states that output pricing for several current Gemini models includes thinking tokens. Review the selected model's current billing documentation before estimating reasoning-heavy workloads.

Does prompt caching always save money?

No.

Caching saves money when a sufficiently large prompt prefix is reused. Cache creation, storage, expiration and minimum-token requirements can reduce or eliminate the benefit for content used only once.

Are batch APIs always 50% cheaper?

Several current provider batch plans offer rates around half of standard processing, but discounts, eligibility and model support vary. Batch jobs also trade immediate responses for asynchronous completion.

Can I switch providers by changing the base URL?

An OpenAI-compatible gateway can often be tested by changing the base URL, API key and model name.

However, compatibility is not always complete. Test streaming, tool calling, structured output, error handling, token accounting and provider-specific features before migration.

Should I use one model for my entire product?

Usually not.

Products can reduce cost and improve reliability by routing simple tasks to smaller models, normal tasks to balanced models and difficult tasks to frontier models.

Final Recommendation

There is no universal winner in the OpenAI vs Claude vs Gemini pricing comparison.

Choose a frontier model such as GPT-5.6 Sol or Claude Opus 4.8 when difficult reasoning, coding or professional work justifies the additional cost.

Choose a balanced model such as GPT-5.6 Terra, Claude Sonnet 4.6, Gemini 3.1 Pro or Gemini 3.5 Flash for general production workloads where quality and cost must both remain competitive.

Choose a lower-cost model such as GPT-5.4 mini or Gemini 3 Flash for classification, extraction, routing, lightweight generation and high-volume automation.

Most importantly, compare models using your own workload.

Measure:

  • Cost per successful task
  • Quality
  • Latency
  • Retry rate
  • Output length
  • Tool reliability
  • Operational risk

Token pricing is the beginning of the decision, not the end.

For teams that want lower-cost access to multiple mainstream models through one OpenAI-compatible endpoint, LumeAPI's Model Catalog provides the current model list and public rates, while the Developer Docs provide model IDs and integration examples.