Skip to content

Commit

Permalink
Update Pricing
Browse files Browse the repository at this point in the history
  • Loading branch information
DaizeDong committed Mar 4, 2025
1 parent 3924e50 commit 89c1758
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions pricing.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@
# "gpt-4o-mini": {"prompt": 7.5, "completion": 30},
# "gpt-ask-internet": {"prompt": 50, "completion": 50},

# https://openai.com/api/pricing
# https://platform.openai.com/docs/pricing
# The official ChatGPT API.
# [LAST UPDATE: 2025.1.28]
# [LAST UPDATE: 2025.3.4]
"gpt-3.5-turbo": {"prompt": 7.5, "completion": 22.5},
"gpt-3.5-turbo-0125": {"prompt": 0.5, "completion": 1.5},
"gpt-3.5-turbo-instruct": {"prompt": 1.5, "completion": 2},
Expand All @@ -38,10 +38,11 @@
"gpt-4-0125-preview": {"prompt": 10, "completion": 30},
"gpt-4-1106-preview": {"prompt": 10, "completion": 30},
"gpt-4-vision-preview": {"prompt": 10, "completion": 30},
"gpt-4o-latest": {"prompt": 5, "completion": 15},
"gpt-4.5-preview": {"prompt": 75, "completion": 150, "cache": 37.5},
"gpt-4.5-preview-2025-02-27": {"prompt": 75, "completion": 150, "cache": 37.5},
"gpt-4o": {"prompt": 2.5, "completion": 10, "cache": 1.25},
"gpt-4o-2024-08-06": {"prompt": 2.5, "completion": 10, "cache": 1.25},
"gpt-4o-2024-11-20": {"prompt": 2.5, "completion": 10, "cache": 1.25},
"gpt-4o-2024-08-06": {"prompt": 2.5, "completion": 10, "cache": 1.25},
"gpt-4o-mini": {"prompt": 0.15, "completion": 0.6, "cache": 0.075},
"gpt-4o-mini-2024-07-18": {"prompt": 0.15, "completion": 0.6, "cache": 0.075},
"o1": {"prompt": 15, "completion": 60, "cache": 7.5},
Expand All @@ -50,16 +51,18 @@
"o1-preview-2024-09-12": {"prompt": 15, "completion": 60, "cache": 7.5},
"o1-mini": {"prompt": 3, "completion": 12, "cache": 1.5},
"o1-mini-2024-09-12": {"prompt": 3, "completion": 12, "cache": 1.5},
"o3-mini": {"prompt": 1.1, "completion": 4.4, "cache": 0.55},
"o3-mini-2025-01-31": {"prompt": 1.1, "completion": 4.4, "cache": 0.55},

# https://ai.google.dev/pricing
# The official Gemini API.
# Here are the prices for the "Pay-as-you-go" plan instead of the free plan.
# [LAST UPDATE: 2025.2.10]
"gemini-2.0-flash": {"prompt": 0.1, "completion": 0.4, "cache": 0.0025},
"gemini-2.0-flash-lite-preview-02-05": {"prompt": 0.075, "completion": 0.3, "cache": 0.01875},
"gemini-1.5-flash": {"prompt": 0.075, "completion": 0.3, "cache": 0.01875}, # Prompts up to 128k tokens here. Prices for prompts longer than 128k are doubled.
"gemini-1.5-flash-8b": {"prompt": 0.0375, "completion": 0.15, "cache": 0.01}, # Prompts up to 128k tokens here. Prices for prompts longer than 128k are doubled.
"gemini-1.5-pro": {"prompt": 1.25, "completion": 5, "cache": 0.3125 }, # Prompts up to 128k tokens here. Prices for prompts longer than 128k are doubled.
"gemini-1.5-flash": {"prompt": 0.075, "completion": 0.3, "cache": 0.01875}, # Prompts up to 128k tokens here. Prices for prompts longer than 128k are doubled.
"gemini-1.5-flash-8b": {"prompt": 0.0375, "completion": 0.15, "cache": 0.01}, # Prompts up to 128k tokens here. Prices for prompts longer than 128k are doubled.
"gemini-1.5-pro": {"prompt": 1.25, "completion": 5, "cache": 0.3125}, # Prompts up to 128k tokens here. Prices for prompts longer than 128k are doubled.

# https://api-docs.deepseek.com/quick_start/pricing
# The official DeepSeek API.
Expand Down

0 comments on commit 89c1758

Please sign in to comment.