Compare OpenAI & Top LLM API Pricing Instantly

Calculate and compare API costs across OpenAI, Google Gemini, Anthropic, Mistral, Cohere, and DeepSeek. Enter your token usage to find the most cost-effective LLM for your AI project — all in real-time.

tokens

Ministral 3B 24.10

Mistral

Text
Mistral
Input Cost (per 1M) $0.0400
Output Cost (per 1M) $0.0400
Context Window 131k tokens
Input Cost (for 1.000 tokens) $0.0000
Output Cost (for 1.000 tokens) $0.0000
Total Cost $0.0000
View API Documentation →

Ministral 8B 24.10

Mistral

Text
Mistral
Input Cost (per 1M) $0.1000
Output Cost (per 1M) $0.1000
Context Window 131k tokens
Input Cost (for 1.000 tokens) $0.0001
Output Cost (for 1.000 tokens) $0.0001
Total Cost $0.0002
View API Documentation →

Command R7B

Cohere

Text
Cohere
Input Cost (per 1M) $0.0375
Output Cost (per 1M) $0.1500
Context Window 128k tokens
Input Cost (for 1.000 tokens) $0.0000
Output Cost (for 1.000 tokens) $0.0002
Total Cost $0.0002
View API Documentation →

Gemini 1.5 Flash-8B

Google

Multimodal
Google
Input Cost (per 1M) $0.0375
Output Cost (per 1M) $0.1500
Context Window 1m tokens
Input Cost (for 1.000 tokens) $0.0000
Output Cost (for 1.000 tokens) $0.0002
Total Cost $0.0002*
View API Documentation →
* Prices for this model double for context windows > 128k

Mistral Small 3

Mistral

Text
Mistral
Input Cost (per 1M) $0.1000
Output Cost (per 1M) $0.3000
Context Window 32k tokens
Input Cost (for 1.000 tokens) $0.0001
Output Cost (for 1.000 tokens) $0.0003
Total Cost $0.0004
View API Documentation →

Gemini 2.0 Flash-Lite

Google

Multimodal
Google
Input Cost (per 1M) $0.0750
Output Cost (per 1M) $0.3000
Context Window 1m tokens
Input Cost (for 1.000 tokens) $0.0001
Output Cost (for 1.000 tokens) $0.0003
Total Cost $0.0004
View API Documentation →

Gemini 1.5 Flash

Google

Multimodal
Google
Input Cost (per 1M) $0.0750
Output Cost (per 1M) $0.3000
Context Window 1m tokens
Input Cost (for 1.000 tokens) $0.0001
Output Cost (for 1.000 tokens) $0.0003
Total Cost $0.0004*
View API Documentation →
* Prices for this model double for context windows > 128k

Gemini 2.0 Flash

Google

Multimodal
Google
Input Cost (per 1M) $0.1000
Output Cost (per 1M) $0.4000
Context Window 1m tokens
Input Cost (for 1.000 tokens) $0.0001
Output Cost (for 1.000 tokens) $0.0004
Total Cost $0.0005
View API Documentation →

GPT-4.1 nano

OpenAI

Text
OpenAI
Input Cost (per 1M) $0.1000
Output Cost (per 1M) $0.4000
Context Window 1m tokens
Input Cost (for 1.000 tokens) $0.0001
Output Cost (for 1.000 tokens) $0.0004
Total Cost $0.0005
View API Documentation →

GPT-4o mini

OpenAI

Text
OpenAI
Input Cost (per 1M) $0.1500
Output Cost (per 1M) $0.6000
Context Window 128k tokens
Input Cost (for 1.000 tokens) $0.0002
Output Cost (for 1.000 tokens) $0.0006
Total Cost $0.0008
View API Documentation →

GPT-4o mini Audio

OpenAI

Audio
OpenAI
Input Cost (per 1M) $0.1500
Output Cost (per 1M) $0.6000
Context Window 128k tokens
Input Cost (for 1.000 tokens) $0.0002
Output Cost (for 1.000 tokens) $0.0006
Total Cost $0.0008
View API Documentation →

Mistral Saba

Mistral

Text
Mistral
Input Cost (per 1M) $0.2000
Output Cost (per 1M) $0.6000
Context Window 32k tokens
Input Cost (for 1.000 tokens) $0.0002
Output Cost (for 1.000 tokens) $0.0006
Total Cost $0.0008
View API Documentation →

Command R

Cohere

Text
Cohere
Input Cost (per 1M) $0.1500
Output Cost (per 1M) $0.6000
Context Window 128k tokens
Input Cost (for 1.000 tokens) $0.0002
Output Cost (for 1.000 tokens) $0.0006
Total Cost $0.0008
View API Documentation →

Codestral

Mistral

Coding
Mistral
Input Cost (per 1M) $0.3000
Output Cost (per 1M) $0.9000
Context Window 256k tokens
Input Cost (for 1.000 tokens) $0.0003
Output Cost (for 1.000 tokens) $0.0009
Total Cost $0.0012
View API Documentation →

DeepSeek-V3

DeepSeek

Text
DeepSeek
Input Cost (per 1M) $0.2700
Output Cost (per 1M) $1.1000
Context Window 64k tokens
Input Cost (for 1.000 tokens) $0.0003
Output Cost (for 1.000 tokens) $0.0011
Total Cost $0.0014*
View API Documentation →
* DeepSeek offers lower prices for certain times of the day

GPT-4.1 mini

OpenAI

Text
OpenAI
Input Cost (per 1M) $0.4000
Output Cost (per 1M) $1.6000
Context Window 1m tokens
Input Cost (for 1.000 tokens) $0.0004
Output Cost (for 1.000 tokens) $0.0016
Total Cost $0.0020
View API Documentation →

DeepSeek-R1

DeepSeek

Reasoning
DeepSeek
Input Cost (per 1M) $0.5500
Output Cost (per 1M) $2.1900
Context Window 64k tokens
Input Cost (for 1.000 tokens) $0.0006
Output Cost (for 1.000 tokens) $0.0022
Total Cost $0.0028
View API Documentation →

GPT-4o mini Realtime

OpenAI

Realtime
OpenAI
Input Cost (per 1M) $0.6000
Output Cost (per 1M) $2.4000
Context Window 128k tokens
Input Cost (for 1.000 tokens) $0.0006
Output Cost (for 1.000 tokens) $0.0024
Total Cost $0.0030
View API Documentation →

Claude 3.5 Haiku

Anthropic

Text
Anthropic
Input Cost (per 1M) $0.8000
Output Cost (per 1M) $4.0000
Context Window 200k tokens
Input Cost (for 1.000 tokens) $0.0008
Output Cost (for 1.000 tokens) $0.0040
Total Cost $0.0048
View API Documentation →

o3-mini

OpenAI

Reasoning
OpenAI
Input Cost (per 1M) $1.1000
Output Cost (per 1M) $4.4000
Context Window 200k tokens
Input Cost (for 1.000 tokens) $0.0011
Output Cost (for 1.000 tokens) $0.0044
Total Cost $0.0055
View API Documentation →

o1-mini

OpenAI

Reasoning
OpenAI
Input Cost (per 1M) $1.1000
Output Cost (per 1M) $4.4000
Context Window 128k tokens
Input Cost (for 1.000 tokens) $0.0011
Output Cost (for 1.000 tokens) $0.0044
Total Cost $0.0055
View API Documentation →

o4-mini

OpenAI

Reasoning
OpenAI
Input Cost (per 1M) $1.1000
Output Cost (per 1M) $4.4000
Context Window 128k tokens
Input Cost (for 1.000 tokens) $0.0011
Output Cost (for 1.000 tokens) $0.0044
Total Cost $0.0055
View API Documentation →

Gemini 1.5 Pro

Google

Multimodal
Google
Input Cost (per 1M) $1.2500
Output Cost (per 1M) $5.0000
Context Window 2m tokens
Input Cost (for 1.000 tokens) $0.0013
Output Cost (for 1.000 tokens) $0.0050
Total Cost $0.0063*
View API Documentation →
* Prices for this model double for context windows > 128k

Mistral Large 24.11

Mistral

Reasoning
Mistral
Input Cost (per 1M) $2.0000
Output Cost (per 1M) $6.0000
Context Window 131k tokens
Input Cost (for 1.000 tokens) $0.0020
Output Cost (for 1.000 tokens) $0.0060
Total Cost $0.0080
View API Documentation →

Pixtral Large

Mistral

Multimodal
Mistral
Input Cost (per 1M) $2.0000
Output Cost (per 1M) $6.0000
Context Window 131k tokens
Input Cost (for 1.000 tokens) $0.0020
Output Cost (for 1.000 tokens) $0.0060
Total Cost $0.0080
View API Documentation →

GPT-4.1

OpenAI

Text
OpenAI
Input Cost (per 1M) $2.0000
Output Cost (per 1M) $8.0000
Context Window 1m tokens
Input Cost (for 1.000 tokens) $0.0020
Output Cost (for 1.000 tokens) $0.0080
Total Cost $0.0100
View API Documentation →

GPT-4o

OpenAI

Text
OpenAI
Input Cost (per 1M) $2.5000
Output Cost (per 1M) $10.0000
Context Window 128k tokens
Input Cost (for 1.000 tokens) $0.0025
Output Cost (for 1.000 tokens) $0.0100
Total Cost $0.0125
View API Documentation →

GPT-4o Audio

OpenAI

Audio
OpenAI
Input Cost (per 1M) $2.5000
Output Cost (per 1M) $10.0000
Context Window 128k tokens
Input Cost (for 1.000 tokens) $0.0025
Output Cost (for 1.000 tokens) $0.0100
Total Cost $0.0125
View API Documentation →

Command R+

Cohere

Text
Cohere
Input Cost (per 1M) $2.5000
Output Cost (per 1M) $10.0000
Context Window 128k tokens
Input Cost (for 1.000 tokens) $0.0025
Output Cost (for 1.000 tokens) $0.0100
Total Cost $0.0125
View API Documentation →

Claude 3.7 Sonnet

Anthropic

Reasoning
Anthropic
Input Cost (per 1M) $3.0000
Output Cost (per 1M) $15.0000
Context Window 200k tokens
Input Cost (for 1.000 tokens) $0.0030
Output Cost (for 1.000 tokens) $0.0150
Total Cost $0.0180
View API Documentation →

GPT-4o Realtime

OpenAI

Realtime
OpenAI
Input Cost (per 1M) $5.0000
Output Cost (per 1M) $20.0000
Context Window 128k tokens
Input Cost (for 1.000 tokens) $0.0050
Output Cost (for 1.000 tokens) $0.0200
Total Cost $0.0250
View API Documentation →

o3

OpenAI

Reasoning
OpenAI
Input Cost (per 1M) $10.0000
Output Cost (per 1M) $40.0000
Context Window 200k tokens
Input Cost (for 1.000 tokens) $0.0100
Output Cost (for 1.000 tokens) $0.0400
Total Cost $0.0500
View API Documentation →

o1

OpenAI

Reasoning
OpenAI
Input Cost (per 1M) $15.0000
Output Cost (per 1M) $60.0000
Context Window 200k tokens
Input Cost (for 1.000 tokens) $0.0150
Output Cost (for 1.000 tokens) $0.0600
Total Cost $0.0750
View API Documentation →

Claude 3 Opus

Anthropic

Multimodal
Anthropic
Input Cost (per 1M) $15.0000
Output Cost (per 1M) $75.0000
Context Window 200k tokens
Input Cost (for 1.000 tokens) $0.0150
Output Cost (for 1.000 tokens) $0.0750
Total Cost $0.0900
View API Documentation →

GPT-4.5 Preview

OpenAI

Text
OpenAI
Input Cost (per 1M) $75.0000
Output Cost (per 1M) $150.0000
Context Window 128k tokens
Input Cost (for 1.000 tokens) $0.0750
Output Cost (for 1.000 tokens) $0.1500
Total Cost $0.2250
View API Documentation →

o1-pro

OpenAI

Reasoning
OpenAI
Input Cost (per 1M) $150.0000
Output Cost (per 1M) $600.0000
Context Window 200k tokens
Input Cost (for 1.000 tokens) $0.1500
Output Cost (for 1.000 tokens) $0.6000
Total Cost $0.7500
View API Documentation →

Frequently Asked Questions

Text generation API costs are calculated based on token usage - the fundamental unit of text processing. Providers charge for:

  • Input tokens: Text sent to the model (prompts, instructions, context)
  • Output tokens: Text generated by the model (completions, responses)

Each provider (OpenAI, Anthropic, Google Gemini, etc.) sets unique pricing tiers per 1,000,000 tokens, with premium models typically costing more than base models.

Input tokens represent the text you send to the LLM API (your prompt or context), while output tokens are what the model generates in response. For example:

  • Input: "Write a summary about Paris." (6 tokens)
  • Output: "Paris is the capital of France and a global center for art, fashion, and culture." (18 tokens)

Most providers charge different rates for input versus output tokens, with output tokens typically costing 2-5x more than input tokens.

Our Text generation API pricing database is monitored and updated regularly. We track official pricing pages, API documentation, and company announcements to try to ensure accuracy across all models from OpenAI, Anthropic, Google, Mistral, Cohere, and DeepSeek. If you notice any discrepancies, please feel free to send us a message to test@test.de.

The most cost-effective LLM depends on your specific requirements. OpenAI's GPT-4o-mini offers competitive pricing for general applications, while Anthropic's models excel at processing lengthy documents. Mistral and DeepSeek provide affordable alternatives for certain tasks. Our comparison tool helps you calculate exact costs based on your expected token usage and performance needs.

Yes, several strategies can optimize API costs:

  • Prompt engineering: Craft concise, effective prompts to reduce input tokens
  • Response parameters: Set maximum token limits for outputs
  • Caching: Store common responses to avoid redundant API calls
  • Model selection: Choose the most affordable model that meets your quality requirements
  • Batch processing: Combine multiple requests where possible

Each LLM has a maximum context window (the total tokens it can process at once). Context window sizes vary dramatically across providers, from Google Gemini's expansive 2M token capacity to more modest windows in other models. While OpenAI's GPT-4o and GPT-4o-mini share the same context window size, the mini version offers a more economical option. Similarly, Claude models offer large windows at different price points. Our calculator helps you determine if using a larger context model is more economical than breaking your task into multiple calls with a smaller-context, less expensive model.

While we strive to maintain accurate pricing information across all LLM providers, the rapid evolution of AI services means occasional discrepancies may occur. If you spot any errors in our pricing data or calculations, please feel free to contact us at test@test.de. We appreciate user feedback as it helps us maintain the most reliable comparison tool possible. However, we recommend that all users conduct their own due diligence and verify current pricing with the official provider documentation before making final decisions for production systems or budget-critical applications.