Hatrio AI

3 min read Original article ↗

Hatrio Logo

LLM API Pricing Calculator Compare Costs Across 25+ AI Models

Calculate and compare costs for OpenAI, Anthropic Claude, Google Gemini, Mistral AI, and more. Make informed decisions for your AI integrations.

Real-time Pricing

25+ Models

Instant Comparison

Number of tokens in your input

Number of tokens in the response

How many times you'll call the API

Summary

Input Tokens: 1,000

Output Tokens: 1,000

Total per Call: 2,000

API Calls: 1

Total Tokens: 2,000

Cheapest Option

$0.000100

Meta Llama 3.1 8B

Most Expensive

$0.0900

Anthropic Claude 3 Opus

Llama 3.1 8B

Lowest Cost

Meta

Fast open model

Context: 128,000 tokens Input: $0.05/1M Output: $0.05/1M

Ultra efficient

Context: 128,000 tokens Input: $0.1/1M Output: $0.1/1M

Vision model

Context: 128,000 tokens Input: $0.15/1M Output: $0.15/1M

Fast multimodal

Context: 1,000,000 tokens Input: $0.075/1M Output: $0.3/1M

Fast and affordable

Context: 128,000 tokens Input: $0.15/1M Output: $0.6/1M

Efficient retrieval

Context: 128,000 tokens Input: $0.15/1M Output: $0.6/1M

Popular open model

Context: 128,000 tokens Input: $0.35/1M Output: $0.4/1M

Mistral Small 24.09

Mistral

Efficient model

Context: 128,000 tokens Input: $0.2/1M Output: $0.6/1M

Code generation

Context: 32,000 tokens Input: $0.2/1M Output: $0.6/1M

Claude 3.5 Haiku

Anthropic

Fast and efficient

Context: 200,000 tokens Input: $0.25/1M Output: $1.25/1M

Fast responses

Context: 200,000 tokens Input: $0.25/1M Output: $1.25/1M

Legacy efficient model

Context: 16,385 tokens Input: $0.5/1M Output: $1.5/1M

Previous generation

Context: 32,000 tokens Input: $0.5/1M Output: $1.5/1M

Largest open model

Context: 128,000 tokens Input: $2.7/1M Output: $2.7/1M

Largest context window

Context: 2,000,000 tokens Input: $1.25/1M Output: $5/1M

Flagship model

Context: 128,000 tokens Input: $2/1M Output: $6/1M

Latest flagship model

Context: 128,000 tokens Input: $2.5/1M Output: $10/1M

Enterprise model

Context: 128,000 tokens Input: $2.5/1M Output: $10/1M

Efficient reasoning

Context: 128,000 tokens Input: $3/1M Output: $12/1M

Claude 3.5 Sonnet

Anthropic

Latest Claude model

Context: 200,000 tokens Input: $3/1M Output: $15/1M

Claude 3 Sonnet

Anthropic

Balanced performance

Context: 200,000 tokens Input: $3/1M Output: $15/1M

Previous flagship

Context: 128,000 tokens Input: $10/1M Output: $30/1M

Advanced reasoning

Context: 128,000 tokens Input: $15/1M Output: $60/1M

Most capable

Context: 200,000 tokens Input: $15/1M Output: $75/1M

Understanding LLM Pricing

Key factors that affect your AI API costs

Token-Based Pricing

Most LLM APIs charge based on the number of tokens processed. A token is roughly 4 characters or 0.75 words in English.

Input vs Output

Output tokens typically cost more than input tokens. This is because generating text requires more computational resources.

Model Selection

Flagship models offer better quality but cost more. Efficient models provide good value for simpler tasks at lower prices.

Context Windows

Larger context windows allow more input but may cost more. Choose based on your application's needs for conversation history.

Cost Optimization

Optimize costs by using efficient models for simple tasks, caching responses, and minimizing unnecessary output tokens.

Volume Discounts

Many providers offer volume discounts for high-usage customers. Contact providers directly for enterprise pricing.

Ready to Integrate AI Into Your App? Start Building with Hatrio AI

Use our platform to manage multiple LLM providers, optimize costs automatically, and scale your AI applications with confidence.