OpenAI & other LLM API Pricing Calculator
Calculate the cost of using OpenAI and other Large Language Models(LLMs) APIs
Provider | Model | Context | Input/1k Tokens | Output/1k Tokens | Per Call | Total | |
---|---|---|---|---|---|---|---|
Chat/Completion | |||||||
OpenAI | GPT-3.5 Turbo | 16k | $0.0005 | $0.0015 | $ | $ | |
OpenAI | GPT-4 Turbo | 128k | $0.01 | $0.03 | $ | $ | |
DataBricks | DBRX | 32k | $0.00225 | $0.00675 | $ | $ | |
OpenAI | GPT-4o (omni) | 128k | $0.005 | $0.015 | $ | $ | |
OpenAI | GPT-4o mini | 128k | $0.00015 | $0.0006 | $ | $ | |
OpenAI | GPT-4 | 8k | $0.03 | $0.06 | $ | $ | |
OpenAI | GPT-4 | 32k | $0.06 | $0.12 | $ | $ | |
OpenAI | GPT-3.5 Turbo | 4k | $0.0015 | $0.002 | $ | $ | |
OpenAI | Ada v2 | $0.0001 | $ | $ | |||
OpenAI | Davinci | $0.012 | $0.012 | $ | $ | ||
OpenAI | Babbage | $0.0016 | $0.0016 | $ | $ | ||
Amazon | Titan Text - Lite | 4k | $0.00015 | $0.0002 | $ | $ | |
Amazon | Titan Text - Express | 8k | $0.0002 | $0.0006 | $ | $ | |
Anthropic | Claude Instant | 100k | $0.0008 | $0.0024 | $ | $ | |
Anthropic | Claude 2.1 | 200k | $0.008 | $0.024 | $ | $ | |
Anthropic | Claude 3 Haiku | 200k | $0.00025 | $0.00125 | $ | $ | |
Anthropic | Claude 3 Sonnet | 200k | $0.003 | $0.015 | $ | $ | |
Anthropic | Claude 3 Opus | 200k | $0.015 | $0.075 | $ | $ | |
Meta | Llama 2 70b | 4k | $0.001 | $0.001 | $ | $ | |
Meta | Llama 3.1 405b | 128k | $0.003 | $0.005 | $ | $ | |
PaLM 2 | 8k | $0.002 | $0.002 | $ | $ | ||
PaLM 2 | $0.0004 | $ | $ | ||||
Gemini 1.5 Flash | 1M | $0.0007 | $0.0021 | $ | $ | ||
Gemini 1.0 Pro | 32k | $0.0005 | $0.0015 | $ | $ | ||
Gemini 1.5 Pro | 1M | $0.007 | $0.021 | $ | $ | ||
Cohere | Embed | $0.0004 | $ | $ | |||
Titan | Titan Embeddings | $0.0001 | $ | $ | |||
Mistral AI (via Anyscale) | Mixtral 8x7B | 32k | $0.0007 | $0.0007 | $ | $ | |
Mistral AI | Mistral Small | 32k | $0.002 | $0.006 | $ | $ | |
Mistral AI | Mistral Large | 32k | $0.008 | $0.024 | $ | $ | |
Mistral AI | embed | $0.0001 | $ | $ |
Frequently Asked Questions
What is LLM?
What is Embedding?
How can i calculate Embedding pricing?
What is token?
What is the LLM API Pricing Calculator?
Which Language Models does the calculator support?
How accurate is the pricing estimate provided by the calculator?
Can I compare the costs of different Language Models using this calculator?
How can I reduce my API usage costs?
How do I choose the right LLM for my needs?
Choosing the right Large Language Model (LLM) depends on various factors including the complexity of your tasks, required performance, and budget.
Here are some examples of proprietary LLMs and their strengths to help you make an informed decision:
- Claude 3.5 Sonnet: A faster, powerful and cost-effective model, Claude 3.5 Sonnet balances power and affordability, suitable for a wide range of use cases.
- GPT-4o: Known for its speed and power, GPT-4o is an excellent choice for applications requiring quick responses and robust performance.
- GPT-4: The most advanced openai LLM available, offers superior capabilities in understanding and generating human-like text, making it ideal for complex and high-stakes applications.
What is an Input Token and Output Token? How does this affect the overall pricing?
- Input Tokens: Units of text broken down from the input prompt or query. These are fed into the model for processing.
- Output Tokens: Units of text generated by the model in response to the input. The model predicts these tokens one at a time to form the complete output.
Both input and output tokens are used to calculate the cost of using a language model. The overall pricing depends on the total number of tokens processed. Higher token usage typically results in higher costs.
📈 Example: If you process 100,000 input tokens and generate 50,000 output tokens, you will be billed for 150,000 tokens.
What are AI credits and how are they different from API pricing?
Credits are consumed based on the cost of the model being used. Different models consume different amounts of credits. For example, GPT-3.5 takes 1x credit, GPT-4o takes 5x credits, GPT-4 Turbo takes 10x credits, while GPT-4 takes 20x credits. API pricing, on the other hand, is typically based on metrics like the number of tokens or characters processed. For a detailed cost estimation using AI credits, visit our Chatbot AI Credits Calculator.