Skip to content

Instantly share code, notes, and snippets.

@harrywang
Created March 12, 2024 00:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save harrywang/e0605be777bd1466dfcfa7c5b99fae93 to your computer and use it in GitHub Desktop.
Save harrywang/e0605be777bd1466dfcfa7c5b99fae93 to your computer and use it in GitHub Desktop.
api-comparison
make a comparison table to compare the api pricing between claude, mistral, openai, and gemini based on the following data:
Claude 3
MTok = million tokens. All Claude 3 models support vision and 200,000 token context windows.
Light & fast
Haiku
Input: $0.25 / MTok
Output: $1.25 / MTok
Hard-working
Sonnet
Input: $3 / MTok
Output: $15 / MTok
Powerful
Opus
Input: $15 / MTok
Output: $75 / MTok
mistral:
Pay-as-you-go
The prices listed below are exclusive of VAT.
Chat Completions API
Model Endpoint Input (USD) Output (USD) Input (EUR) Output (EUR)
Mistral 7B open-mistral-7b 0.25$ / 1M tokens 0.25$ / 1M tokens 0.2€ / 1M tokens 0.2€ / 1M tokens
Mixtral 8x7B open-mixtral-8x7b 0.7$ / 1M tokens 0.7$ / 1M tokens 0.65€ / 1M tokens 0.65€ / 1M tokens
Mistral Small mistral-small-latest 2$ / 1M tokens 6$ / 1M tokens 1.85€ / 1M tokens 5.55€ / 1M tokens
Mistral Medium mistral-medium-latest 2.7$ / 1M tokens 8.1$ / 1M tokens 2.5€ / 1M tokens 7.5€ / 1M tokens
Mistral Large mistral-large-latest 8$ / 1M tokens 24$ / 1M tokens 7.3€ / 1M tokens 22€ / 1M tokens
Openai
Model Input Output
gpt-4 $30.00 / 1M tokens $60.00 / 1M tokens
gpt-4-32k $60.00 / 1M tokens $120.00 / 1M tokens
Model Input Output
gpt-3.5-turbo-0125 $0.50 / 1M tokens $1.50 / 1M tokens
gpt-3.5-turbo-instruct $1.50 / 1M tokens $2.00 / 1M tokens
google gemini
Price (input)
$0.000125 / 1K characters
Price (output)
$0.000375 / 1K characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment