@pydantic/genai-prices 0.0.28 → 0.0.30

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cli.js CHANGED
@@ -919,7 +919,16 @@ const ie = [
919
919
  match: {
920
920
  or: [
921
921
  {
922
- starts_with: "claude-sonnet-4"
922
+ starts_with: "claude-sonnet-4-2025"
923
+ },
924
+ {
925
+ starts_with: "claude-sonnet-4-0"
926
+ },
927
+ {
928
+ starts_with: "claude-sonnet-4@"
929
+ },
930
+ {
931
+ equals: "claude-sonnet-4"
923
932
  },
924
933
  {
925
934
  starts_with: "claude-4-sonnet"
@@ -933,6 +942,53 @@ const ie = [
933
942
  cache_read_mtok: 0.3,
934
943
  output_mtok: 15
935
944
  }
945
+ },
946
+ {
947
+ id: "claude-sonnet-4-5",
948
+ name: "Claude Sonnet 4.5",
949
+ description: "Most intelligent model for building agents and coding",
950
+ match: {
951
+ starts_with: "claude-sonnet-4-5"
952
+ },
953
+ context_window: 1e6,
954
+ prices: {
955
+ input_mtok: {
956
+ base: 3,
957
+ tiers: [
958
+ {
959
+ start: 2e5,
960
+ price: 6
961
+ }
962
+ ]
963
+ },
964
+ cache_write_mtok: {
965
+ base: 3.75,
966
+ tiers: [
967
+ {
968
+ start: 2e5,
969
+ price: 7.5
970
+ }
971
+ ]
972
+ },
973
+ cache_read_mtok: {
974
+ base: 0.3,
975
+ tiers: [
976
+ {
977
+ start: 2e5,
978
+ price: 0.6
979
+ }
980
+ ]
981
+ },
982
+ output_mtok: {
983
+ base: 15,
984
+ tiers: [
985
+ {
986
+ start: 2e5,
987
+ price: 22.5
988
+ }
989
+ ]
990
+ }
991
+ }
936
992
  }
937
993
  ]
938
994
  },
package/dist/index.cjs CHANGED
@@ -1,5 +1,5 @@
1
1
  "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const w=[{id:"anthropic",name:"Anthropic",pricing_urls:["https://www.anthropic.com/pricing#api"],api_pattern:"https://api\\.anthropic\\.com",model_match:{contains:"claude"},provider_match:{contains:"anthropic"},extractors:[{api_flavor:"default",root:"usage",model_path:"model",mappings:[{path:"input_tokens",dest:"input_tokens",required:!0},{path:"cache_creation_input_tokens",dest:"input_tokens",required:!1},{path:"cache_read_input_tokens",dest:"input_tokens",required:!1},{path:"cache_creation_input_tokens",dest:"cache_write_tokens",required:!1},{path:"cache_read_input_tokens",dest:"cache_read_tokens",required:!1},{path:"output_tokens",dest:"output_tokens",required:!0}]}],models:[{id:"claude-2",name:"Claude 2.0 / 2.1",description:`Claude 2 is Anthropic's previous generation model, offering reliable performance for various tasks. This includes Claude 2.0 and Claude 2.1.
2
- `,match:{or:[{starts_with:"claude-2"},{contains:"claude-v2"}]},context_window:2e5,prices:{input_mtok:8,output_mtok:24}},{id:"claude-3-5-haiku-latest",name:"Claude Haiku 3.5",description:"Fastest, most cost-effective model",match:{or:[{starts_with:"claude-3-5-haiku"},{starts_with:"claude-3.5-haiku"}]},context_window:2e5,prices:{input_mtok:.8,cache_write_mtok:1,cache_read_mtok:.08,output_mtok:4}},{id:"claude-3-5-sonnet",name:"Claude Sonnet 3.5",description:"Claude 3.5 Sonnet is an ideal balance of intelligence and speed for enterprise workloads. Maximum utility at a lower price, dependable, balanced for scaled deployments.",match:{or:[{starts_with:"claude-3-5-sonnet"},{starts_with:"claude-3.5-sonnet"}]},context_window:2e5,prices:{input_mtok:3,cache_write_mtok:3.75,cache_read_mtok:.3,output_mtok:15}},{id:"claude-3-7-sonnet-latest",name:"Claude Sonnet 3.7",description:"Claude 3.7 Sonnet is an advanced large language model with improved reasoning, coding, and problem-solving capabilities.",match:{or:[{starts_with:"claude-3-7-sonnet"},{starts_with:"claude-3.7-sonnet"},{starts_with:"claude-sonnet-3.7"},{starts_with:"claude-sonnet-3-7"}]},context_window:2e5,prices:{input_mtok:3,cache_write_mtok:3.75,cache_read_mtok:.3,output_mtok:15}},{id:"claude-3-haiku",name:"Claude Haiku 3",description:"Fastest, most cost-effective model",match:{starts_with:"claude-3-haiku"},context_window:2e5,prices:{input_mtok:.25,cache_write_mtok:.3,cache_read_mtok:.03,output_mtok:1.25}},{id:"claude-3-opus-latest",name:"Claude Opus 3",description:"Claude 3 Opus was Anthropic's most powerful model for highly complex tasks. It boasts top-level performance, intelligence, fluency, and understanding.",match:{starts_with:"claude-3-opus"},context_window:2e5,prices:{input_mtok:15,cache_write_mtok:18.75,cache_read_mtok:1.5,output_mtok:75}},{id:"claude-3-sonnet",name:"Claude 3 Sonnet",description:"Claude 3 Sonnet is an ideal balance of intelligence and speed for enterprise workloads. Maximum utility at a lower price, dependable, balanced for scaled deployments.",match:{starts_with:"claude-3-sonnet"},context_window:2e5,prices:{input_mtok:3,cache_write_mtok:3.75,cache_read_mtok:.3,output_mtok:15}},{id:"claude-opus-4-0",name:"Claude Opus 4",description:"Most intelligent model for complex tasks",match:{or:[{starts_with:"claude-opus-4-0"},{starts_with:"claude-4-opus"},{equals:"claude-opus-4-20250514"}]},context_window:2e5,prices:{input_mtok:15,cache_write_mtok:18.75,cache_read_mtok:1.5,output_mtok:75}},{id:"claude-opus-4-1",name:"Claude Opus 4.1",description:"Most intelligent model for complex tasks",match:{starts_with:"claude-opus-4-1"},context_window:2e5,prices:{input_mtok:15,cache_write_mtok:18.75,cache_read_mtok:1.5,output_mtok:75}},{id:"claude-sonnet-4-0",name:"Claude Sonnet 4",description:"Optimal balance of intelligence, cost, and speed",match:{or:[{starts_with:"claude-sonnet-4"},{starts_with:"claude-4-sonnet"}]},context_window:2e5,prices:{input_mtok:3,cache_write_mtok:3.75,cache_read_mtok:.3,output_mtok:15}}]},{id:"avian",name:"Avian",pricing_urls:["https://avian.io/pricing/"],api_pattern:"https://api\\.avian\\.io",models:[{id:"Meta-Llama-3.1-405B-Instruct",match:{equals:"Meta-Llama-3.1-405B-Instruct"},prices:{input_mtok:1.5,output_mtok:1.5}},{id:"Meta-Llama-3.1-70B-Instruct",match:{equals:"Meta-Llama-3.1-70B-Instruct"},prices:{input_mtok:.45,output_mtok:.45}},{id:"Meta-Llama-3.1-8B-Instruct",match:{equals:"Meta-Llama-3.1-8B-Instruct"},prices:{input_mtok:.1,output_mtok:.1}},{id:"Meta-Llama-3.3-70B-Instruct",match:{equals:"Meta-Llama-3.3-70B-Instruct"},prices:{input_mtok:.45,output_mtok:.45}}]},{id:"aws",name:"AWS Bedrock",pricing_urls:["https://aws.amazon.com/bedrock/pricing/"],api_pattern:"https://bedrock-runtime\\.[a-z0-9-]+\\.amazonaws\\.com/",provider_match:{contains:"bedrock"},models:[{id:"meta.llama3-8b-instruct-v1%3A0",match:{equals:"meta.llama3-8b-instruct-v1%3A0"},prices:{input_mtok:220,output_mtok:720}},{id:"nova-lite-v1",name:"Nova Lite 1.0",description:"Amazon Nova Lite 1.0 is a very low-cost multimodal model from Amazon that focused on fast processing of image, video, and text inputs to generate text output. Amazon Nova Lite can handle real-time customer interactions, document analysis, and visual question-answering tasks with high accuracy.",match:{equals:"nova-lite-v1"},prices:{input_mtok:.06,output_mtok:.24}},{id:"nova-micro-v1",name:"Nova Micro 1.0",description:"Amazon Nova Micro 1.0 is a text-only model that delivers the lowest latency responses in the Amazon Nova family of models at a very low cost. With a context length of 128K tokens and optimized for speed and cost, Amazon Nova Micro excels at tasks such as text summarization, translation, content classification, interactive chat, and brainstorming. It has simple mathematical reasoning and coding abilities.",match:{equals:"nova-micro-v1"},prices:{input_mtok:.035,output_mtok:.14}},{id:"nova-pro-v1",name:"Nova Pro 1.0",description:"Amazon Nova Pro 1.0 is a capable multimodal model from Amazon focused on providing a combination of accuracy, speed, and cost for a wide range of tasks. As of December 2024, it achieves state-of-the-art performance on key benchmarks including visual question answering (TextVQA) and video understanding (VATEX).",match:{equals:"nova-pro-v1"},prices:{input_mtok:.8,output_mtok:3.2}}]},{id:"azure",name:"Microsoft Azure",pricing_urls:["https://azure.microsoft.com/en-us/pricing/details/cognitive-services/openai-service/#pricing"],api_pattern:"(https?://)?([^.]*\\.)?(?:openai\\.azure\\.com|azure-api\\.net|cognitiveservices\\.azure\\.com)",price_comments:'These are prices for "*-Global" models, prices for "Regional" models are often slightly higher. Retired models are listed at https://learn.microsoft.com/th-th/azure/ai-foundry/openai/concepts/legacy-models',models:[{id:"ada",match:{or:[{equals:"ada"},{equals:"text-embedding-ada"},{equals:"text-embedding-ada-002"},{equals:"text-embedding-ada-002-v2"}]},prices:{input_mtok:.1}},{id:"babbage",match:{or:[{equals:"babbage"},{equals:"babbage-002"}]},prices:{input_mtok:.4}},{id:"curie",match:{or:[{equals:"curie"},{equals:"text-curie"},{equals:"text-curie-001"}]},prices:{input_mtok:2}},{id:"davinci",match:{or:[{equals:"davinci"},{equals:"davinci-002"},{equals:"text-davinci"},{equals:"text-davinci-002"}]},prices:{input_mtok:2}},{id:"gpt-3.5-turbo",match:{or:[{equals:"gpt-3.5-turbo"},{equals:"gpt-3.5-turbo-0301"},{equals:"gpt-3.5-turbo-0613"},{equals:"gpt-3.5-turbo-instruct"},{equals:"gpt-3.5-turbo-instruct-0914"}]},prices:{input_mtok:1.5,output_mtok:2}},{id:"gpt-3.5-turbo-0125",match:{equals:"gpt-3.5-turbo-0125"},prices:{input_mtok:.5,output_mtok:1.5}},{id:"gpt-3.5-turbo-1106",match:{equals:"gpt-3.5-turbo-1106"},prices:{input_mtok:1,output_mtok:2}},{id:"gpt-3.5-turbo-16k-0613",match:{equals:"gpt-3.5-turbo-16k-0613"},prices:{input_mtok:3,output_mtok:4}},{id:"gpt-35-16k",match:{equals:"gpt-35-16k"},prices:{input_mtok:3,output_mtok:4}},{id:"gpt-35-turbo",match:{or:[{equals:"gpt-35-turbo"},{equals:"gpt-35-turbo-0613"},{equals:"gpt-35-turbo-1106"}]},prices:{input_mtok:1.5,output_mtok:2}},{id:"gpt-35-turbo-16k",match:{or:[{equals:"gpt-35-turbo-16k"},{equals:"gpt-35-turbo-16k-0613"}]},prices:{input_mtok:3,output_mtok:4}},{id:"gpt-4",match:{or:[{equals:"gpt-4"},{equals:"gpt-4-0314"},{equals:"gpt-4-0613"}]},prices:{input_mtok:30,output_mtok:60}},{id:"gpt-4-0125-preview",match:{equals:"gpt-4-0125-preview"},prices:{input_mtok:10,output_mtok:30}},{id:"gpt-4-1106-preview",match:{equals:"gpt-4-1106-preview"},prices:{input_mtok:10,output_mtok:30}},{id:"gpt-4-1106-vision-preview",match:{equals:"gpt-4-1106-vision-preview"},prices:{input_mtok:10,output_mtok:30}},{id:"gpt-4-32k",match:{or:[{equals:"gpt-4-32k"},{equals:"gpt-4-32k-0314"},{equals:"gpt-4-32k-0613"}]},prices:{input_mtok:60,output_mtok:120}},{id:"gpt-4-preview-1106",match:{equals:"gpt-4-preview-1106"},prices:{input_mtok:10,output_mtok:30}},{id:"gpt-4-turbo",match:{or:[{equals:"gpt-4-turbo"},{equals:"gpt-4-turbo-0125-preview"},{equals:"gpt-4-turbo-2024-04-09"},{equals:"gpt-4-turbo-preview"}]},prices:{input_mtok:10,output_mtok:30}},{id:"gpt-4-vision",match:{or:[{equals:"gpt-4-vision"},{equals:"gpt-4-vision-preview"}]},prices:{input_mtok:10,output_mtok:30}},{id:"gpt-4.1",match:{or:[{equals:"gpt-4.1"},{equals:"gpt-4.1-2025-04-14"}]},prices:{input_mtok:2,cache_read_mtok:.5,output_mtok:8}},{id:"gpt-4.1-mini",match:{or:[{equals:"gpt-4.1-mini"},{equals:"gpt-4.1-mini-2025-04-14"}]},prices:{input_mtok:.4,cache_read_mtok:.1,output_mtok:1.6}},{id:"gpt-4.1-nano",match:{or:[{equals:"gpt-4.1-nano"},{equals:"gpt-4.1-nano-2025-04-14"}]},prices:{input_mtok:.1,cache_read_mtok:.03,output_mtok:.4}},{id:"gpt-4o-2024-0513",match:{or:[{equals:"gpt-4o-2024-05-13"},{equals:"gpt-4o-2024-0513"}]},prices:{input_mtok:5,output_mtok:15}},{id:"gpt-4o-2024-08-06",match:{equals:"gpt-4o-2024-08-06"},prices:{input_mtok:2.5,cache_read_mtok:1.25,output_mtok:10}},{id:"gpt-4o-2024-1120",match:{or:[{equals:"gpt-4o-2024-1120"},{equals:"gpt-4o-2024-11-20"}]},prices:{input_mtok:2.5,cache_read_mtok:1.25,output_mtok:10}},{id:"gpt-4o-mini",match:{or:[{equals:"gpt-4o-mini"},{equals:"gpt-4o-mini-0718"},{starts_with:"gpt-4o-mini-audio"}]},context_window:128e3,prices:{input_mtok:.15,cache_read_mtok:.075,output_mtok:.6,input_audio_mtok:10,output_audio_mtok:20}},{id:"gpt-4o-mini-realtime",match:{starts_with:"gpt-4o-mini-realtime"},prices:{input_mtok:.6,cache_read_mtok:.3,output_mtok:2.4,input_audio_mtok:10,cache_audio_read_mtok:.3,output_audio_mtok:20}},{id:"gpt-4o-realtime",match:{starts_with:"gpt-4o-realtime"},prices:{input_mtok:5,cache_read_mtok:2.5,output_mtok:20,input_audio_mtok:40,cache_audio_read_mtok:2.5,output_audio_mtok:80}},{id:"gpt-5",name:"GPT-5",description:"GPT-5 is OpenAI's flagship model for coding, reasoning, and agentic tasks across domains.",match:{or:[{equals:"gpt-5"},{equals:"gpt-5-2025-08-07"}]},context_window:4e5,prices:{input_mtok:1.25,cache_read_mtok:.125,output_mtok:10}},{id:"gpt-5-mini",name:"GPT-5 mini",description:"GPT-5 mini is a faster, more cost-efficient version of GPT-5. It's great for well-defined tasks and precise prompts.",match:{or:[{equals:"gpt-5-mini"},{equals:"gpt-5-mini-2025-08-07"}]},context_window:4e5,prices:{input_mtok:.25,cache_read_mtok:.025,output_mtok:2}},{id:"gpt-5-nano",name:"GPT-5 nano",description:"GPT-5 Nano is OpenAI's fastest, cheapest version of GPT-5. It's great for summarization and classification tasks.",match:{or:[{equals:"gpt-5-nano"},{equals:"gpt-5-nano-2025-04-14"}]},context_window:4e5,prices:{input_mtok:.05,cache_read_mtok:.005,output_mtok:.4}},{id:"gpt35",match:{equals:"gpt35"},prices:{input_mtok:1.5,output_mtok:2}},{id:"gpt4-turbo-preview",match:{equals:"gpt4-turbo-preview"},prices:{input_mtok:10,output_mtok:30}},{id:"mai-ds-r1:free",name:"MAI DS R1 (free)",description:"MAI-DS-R1 is a post-trained variant of DeepSeek-R1 developed by the Microsoft AI team to improve the model's responsiveness on previously blocked topics while enhancing its safety profile. Built on top of DeepSeek-R1's reasoning foundation, it integrates 110k examples from the Tulu-3 SFT dataset and 350k internally curated multilingual safety-alignment samples. The model retains strong reasoning, coding, and problem-solving capabilities, while unblocking a wide range of prompts previously restricted in R1.",match:{equals:"mai-ds-r1:free"},prices:{}},{id:"o1",match:{or:[{equals:"o1"},{equals:"o1-2024-12-17"},{equals:"o1-preview"},{equals:"o1-preview-2024-09-12"}]},prices:{input_mtok:15,cache_read_mtok:7.5,output_mtok:60}},{id:"o1-mini",match:{or:[{equals:"o1-mini"},{equals:"o1-mini-2024-09-12"}]},prices:{input_mtok:1.1,cache_read_mtok:.55,output_mtok:4.4}},{id:"o3-2025-04-16",match:{or:[{equals:"o3"},{equals:"o3-2025-04-16"}]},prices:{input_mtok:2,cache_read_mtok:.5,output_mtok:8}},{id:"o3-mini",match:{or:[{equals:"o3-mini"},{equals:"o3-mini-2025-01-31"}]},prices:{input_mtok:1.1,cache_read_mtok:.55,output_mtok:4.4}},{id:"o4-mini",match:{or:[{contains:"o4-mini"},{contains:"o4-mini-2025-04-16"}]},prices:{input_mtok:1.1,cache_read_mtok:.28,output_mtok:4.4}},{id:"phi-3-medium-128k-instruct",name:"Phi-3 Medium 128K Instruct",description:"Phi-3 128K Medium is a powerful 14-billion parameter model designed for advanced language understanding, reasoning, and instruction following. Optimized through supervised fine-tuning and preference adjustments, it excels in tasks involving common sense, mathematics, logical reasoning, and code processing.",match:{equals:"phi-3-medium-128k-instruct"},prices:{input_mtok:1,output_mtok:1}},{id:"phi-3-mini-128k-instruct",name:"Phi-3 Mini 128K Instruct",description:"Phi-3 Mini is a powerful 3.8B parameter model designed for advanced language understanding, reasoning, and instruction following. Optimized through supervised fine-tuning and preference adjustments, it excels in tasks involving common sense, mathematics, logical reasoning, and code processing.",match:{equals:"phi-3-mini-128k-instruct"},prices:{input_mtok:.1,output_mtok:.1}},{id:"phi-3.5-mini-128k-instruct",name:"Phi-3.5 Mini 128K Instruct",description:"Phi-3.5 models are lightweight, state-of-the-art open models. These models were trained with Phi-3 datasets that include both synthetic data and the filtered, publicly available websites data, with a focus on high quality and reasoning-dense properties. Phi-3.5 Mini uses 3.8B parameters, and is a dense decoder-only transformer model using the same tokenizer as Phi-3 Mini.",match:{equals:"phi-3.5-mini-128k-instruct"},prices:{input_mtok:.1,output_mtok:.1}},{id:"phi-4",name:"Phi 4",description:"Microsoft Research Phi-4 is designed to perform well in complex reasoning tasks and can operate efficiently in situations with limited memory or where quick responses are needed.",match:{equals:"phi-4"},prices:{input_mtok:.07,output_mtok:.14}},{id:"phi-4-multimodal-instruct",name:"Phi 4 Multimodal Instruct",description:"Phi-4 Multimodal Instruct is a versatile 5.6B parameter foundation model that combines advanced reasoning and instruction-following capabilities across both text and visual inputs, providing accurate text outputs. The unified architecture enables efficient, low-latency inference, suitable for edge and mobile deployments. Phi-4 Multimodal Instruct supports text inputs in multiple languages including Arabic, Chinese, English, French, German, Japanese, Spanish, and more, with visual input optimized primarily for English. It delivers impressive performance on multimodal tasks involving mathematical, scientific, and document reasoning, providing developers and enterprises a powerful yet compact model for sophisticated interactive applications. For more information, see the Phi-4 Multimodal blog post.",match:{equals:"phi-4-multimodal-instruct"},prices:{input_mtok:.05,output_mtok:.1}},{id:"phi-4-reasoning-plus",name:"Phi 4 Reasoning Plus",description:"Phi-4-reasoning-plus is an enhanced 14B parameter model from Microsoft, fine-tuned from Phi-4 with additional reinforcement learning to boost accuracy on math, science, and code reasoning tasks. It uses the same dense decoder-only transformer architecture as Phi-4, but generates longer, more comprehensive outputs structured into a step-by-step reasoning trace and final answer.",match:{equals:"phi-4-reasoning-plus"},prices:{input_mtok:.07,output_mtok:.35}},{id:"phi-4-reasoning-plus:free",name:"Phi 4 Reasoning Plus (free)",description:"Phi-4-reasoning-plus is an enhanced 14B parameter model from Microsoft, fine-tuned from Phi-4 with additional reinforcement learning to boost accuracy on math, science, and code reasoning tasks. It uses the same dense decoder-only transformer architecture as Phi-4, but generates longer, more comprehensive outputs structured into a step-by-step reasoning trace and final answer.",match:{equals:"phi-4-reasoning-plus:free"},prices:{}},{id:"phi-4-reasoning:free",name:"Phi 4 Reasoning (free)",description:"Phi-4-reasoning is a 14B parameter dense decoder-only transformer developed by Microsoft, fine-tuned from Phi-4 to enhance complex reasoning capabilities. It uses a combination of supervised fine-tuning on chain-of-thought traces and reinforcement learning, targeting math, science, and code reasoning tasks. With a 32k context window and high inference efficiency, it is optimized for structured responses in a two-part format: reasoning trace followed by a final solution.",match:{equals:"phi-4-reasoning:free"},prices:{}},{id:"text-embedding-3-large",match:{equals:"text-embedding-3-large"},prices:{input_mtok:.13}},{id:"text-embedding-3-small",match:{equals:"text-embedding-3-small"},prices:{input_mtok:.02}},{id:"wizardlm-2-8x22b",name:"WizardLM-2 8x22B",description:"WizardLM-2 8x22B is Microsoft AI's most advanced Wizard model. It demonstrates highly competitive performance compared to leading proprietary models, and it consistently outperforms all existing state-of-the-art opensource models.",match:{equals:"wizardlm-2-8x22b"},prices:{input_mtok:.48,output_mtok:.48}}]},{id:"cohere",name:"Cohere",pricing_urls:["https://cohere.com/pricing"],api_pattern:"https://api\\.cohere\\.ai",model_match:{starts_with:"command-"},provider_match:{contains:"cohere"},extractors:[{api_flavor:"default",root:["usage","billed_units"],model_path:"model",mappings:[{path:"input_tokens",dest:"input_tokens",required:!0},{path:"output_tokens",dest:"output_tokens",required:!0}]}],models:[{id:"command",name:"Command",description:"Command is an instruction-following conversational model that performs language tasks with high quality, more reliably and with a longer context than our base generative models.",match:{equals:"command"},prices:{input_mtok:1,output_mtok:2}},{id:"command-a",name:"Command A",description:`Command A is an open-weights 111B parameter model with a 256k context window focused on delivering great performance across agentic, multilingual, and coding use cases.
2
+ `,match:{or:[{starts_with:"claude-2"},{contains:"claude-v2"}]},context_window:2e5,prices:{input_mtok:8,output_mtok:24}},{id:"claude-3-5-haiku-latest",name:"Claude Haiku 3.5",description:"Fastest, most cost-effective model",match:{or:[{starts_with:"claude-3-5-haiku"},{starts_with:"claude-3.5-haiku"}]},context_window:2e5,prices:{input_mtok:.8,cache_write_mtok:1,cache_read_mtok:.08,output_mtok:4}},{id:"claude-3-5-sonnet",name:"Claude Sonnet 3.5",description:"Claude 3.5 Sonnet is an ideal balance of intelligence and speed for enterprise workloads. Maximum utility at a lower price, dependable, balanced for scaled deployments.",match:{or:[{starts_with:"claude-3-5-sonnet"},{starts_with:"claude-3.5-sonnet"}]},context_window:2e5,prices:{input_mtok:3,cache_write_mtok:3.75,cache_read_mtok:.3,output_mtok:15}},{id:"claude-3-7-sonnet-latest",name:"Claude Sonnet 3.7",description:"Claude 3.7 Sonnet is an advanced large language model with improved reasoning, coding, and problem-solving capabilities.",match:{or:[{starts_with:"claude-3-7-sonnet"},{starts_with:"claude-3.7-sonnet"},{starts_with:"claude-sonnet-3.7"},{starts_with:"claude-sonnet-3-7"}]},context_window:2e5,prices:{input_mtok:3,cache_write_mtok:3.75,cache_read_mtok:.3,output_mtok:15}},{id:"claude-3-haiku",name:"Claude Haiku 3",description:"Fastest, most cost-effective model",match:{starts_with:"claude-3-haiku"},context_window:2e5,prices:{input_mtok:.25,cache_write_mtok:.3,cache_read_mtok:.03,output_mtok:1.25}},{id:"claude-3-opus-latest",name:"Claude Opus 3",description:"Claude 3 Opus was Anthropic's most powerful model for highly complex tasks. It boasts top-level performance, intelligence, fluency, and understanding.",match:{starts_with:"claude-3-opus"},context_window:2e5,prices:{input_mtok:15,cache_write_mtok:18.75,cache_read_mtok:1.5,output_mtok:75}},{id:"claude-3-sonnet",name:"Claude 3 Sonnet",description:"Claude 3 Sonnet is an ideal balance of intelligence and speed for enterprise workloads. Maximum utility at a lower price, dependable, balanced for scaled deployments.",match:{starts_with:"claude-3-sonnet"},context_window:2e5,prices:{input_mtok:3,cache_write_mtok:3.75,cache_read_mtok:.3,output_mtok:15}},{id:"claude-opus-4-0",name:"Claude Opus 4",description:"Most intelligent model for complex tasks",match:{or:[{starts_with:"claude-opus-4-0"},{starts_with:"claude-4-opus"},{equals:"claude-opus-4-20250514"}]},context_window:2e5,prices:{input_mtok:15,cache_write_mtok:18.75,cache_read_mtok:1.5,output_mtok:75}},{id:"claude-opus-4-1",name:"Claude Opus 4.1",description:"Most intelligent model for complex tasks",match:{starts_with:"claude-opus-4-1"},context_window:2e5,prices:{input_mtok:15,cache_write_mtok:18.75,cache_read_mtok:1.5,output_mtok:75}},{id:"claude-sonnet-4-0",name:"Claude Sonnet 4",description:"Optimal balance of intelligence, cost, and speed",match:{or:[{starts_with:"claude-sonnet-4-2025"},{starts_with:"claude-sonnet-4-0"},{starts_with:"claude-sonnet-4@"},{equals:"claude-sonnet-4"},{starts_with:"claude-4-sonnet"}]},context_window:2e5,prices:{input_mtok:3,cache_write_mtok:3.75,cache_read_mtok:.3,output_mtok:15}},{id:"claude-sonnet-4-5",name:"Claude Sonnet 4.5",description:"Most intelligent model for building agents and coding",match:{starts_with:"claude-sonnet-4-5"},context_window:1e6,prices:{input_mtok:{base:3,tiers:[{start:2e5,price:6}]},cache_write_mtok:{base:3.75,tiers:[{start:2e5,price:7.5}]},cache_read_mtok:{base:.3,tiers:[{start:2e5,price:.6}]},output_mtok:{base:15,tiers:[{start:2e5,price:22.5}]}}}]},{id:"avian",name:"Avian",pricing_urls:["https://avian.io/pricing/"],api_pattern:"https://api\\.avian\\.io",models:[{id:"Meta-Llama-3.1-405B-Instruct",match:{equals:"Meta-Llama-3.1-405B-Instruct"},prices:{input_mtok:1.5,output_mtok:1.5}},{id:"Meta-Llama-3.1-70B-Instruct",match:{equals:"Meta-Llama-3.1-70B-Instruct"},prices:{input_mtok:.45,output_mtok:.45}},{id:"Meta-Llama-3.1-8B-Instruct",match:{equals:"Meta-Llama-3.1-8B-Instruct"},prices:{input_mtok:.1,output_mtok:.1}},{id:"Meta-Llama-3.3-70B-Instruct",match:{equals:"Meta-Llama-3.3-70B-Instruct"},prices:{input_mtok:.45,output_mtok:.45}}]},{id:"aws",name:"AWS Bedrock",pricing_urls:["https://aws.amazon.com/bedrock/pricing/"],api_pattern:"https://bedrock-runtime\\.[a-z0-9-]+\\.amazonaws\\.com/",provider_match:{contains:"bedrock"},models:[{id:"meta.llama3-8b-instruct-v1%3A0",match:{equals:"meta.llama3-8b-instruct-v1%3A0"},prices:{input_mtok:220,output_mtok:720}},{id:"nova-lite-v1",name:"Nova Lite 1.0",description:"Amazon Nova Lite 1.0 is a very low-cost multimodal model from Amazon that focused on fast processing of image, video, and text inputs to generate text output. Amazon Nova Lite can handle real-time customer interactions, document analysis, and visual question-answering tasks with high accuracy.",match:{equals:"nova-lite-v1"},prices:{input_mtok:.06,output_mtok:.24}},{id:"nova-micro-v1",name:"Nova Micro 1.0",description:"Amazon Nova Micro 1.0 is a text-only model that delivers the lowest latency responses in the Amazon Nova family of models at a very low cost. With a context length of 128K tokens and optimized for speed and cost, Amazon Nova Micro excels at tasks such as text summarization, translation, content classification, interactive chat, and brainstorming. It has simple mathematical reasoning and coding abilities.",match:{equals:"nova-micro-v1"},prices:{input_mtok:.035,output_mtok:.14}},{id:"nova-pro-v1",name:"Nova Pro 1.0",description:"Amazon Nova Pro 1.0 is a capable multimodal model from Amazon focused on providing a combination of accuracy, speed, and cost for a wide range of tasks. As of December 2024, it achieves state-of-the-art performance on key benchmarks including visual question answering (TextVQA) and video understanding (VATEX).",match:{equals:"nova-pro-v1"},prices:{input_mtok:.8,output_mtok:3.2}}]},{id:"azure",name:"Microsoft Azure",pricing_urls:["https://azure.microsoft.com/en-us/pricing/details/cognitive-services/openai-service/#pricing"],api_pattern:"(https?://)?([^.]*\\.)?(?:openai\\.azure\\.com|azure-api\\.net|cognitiveservices\\.azure\\.com)",price_comments:'These are prices for "*-Global" models, prices for "Regional" models are often slightly higher. Retired models are listed at https://learn.microsoft.com/th-th/azure/ai-foundry/openai/concepts/legacy-models',models:[{id:"ada",match:{or:[{equals:"ada"},{equals:"text-embedding-ada"},{equals:"text-embedding-ada-002"},{equals:"text-embedding-ada-002-v2"}]},prices:{input_mtok:.1}},{id:"babbage",match:{or:[{equals:"babbage"},{equals:"babbage-002"}]},prices:{input_mtok:.4}},{id:"curie",match:{or:[{equals:"curie"},{equals:"text-curie"},{equals:"text-curie-001"}]},prices:{input_mtok:2}},{id:"davinci",match:{or:[{equals:"davinci"},{equals:"davinci-002"},{equals:"text-davinci"},{equals:"text-davinci-002"}]},prices:{input_mtok:2}},{id:"gpt-3.5-turbo",match:{or:[{equals:"gpt-3.5-turbo"},{equals:"gpt-3.5-turbo-0301"},{equals:"gpt-3.5-turbo-0613"},{equals:"gpt-3.5-turbo-instruct"},{equals:"gpt-3.5-turbo-instruct-0914"}]},prices:{input_mtok:1.5,output_mtok:2}},{id:"gpt-3.5-turbo-0125",match:{equals:"gpt-3.5-turbo-0125"},prices:{input_mtok:.5,output_mtok:1.5}},{id:"gpt-3.5-turbo-1106",match:{equals:"gpt-3.5-turbo-1106"},prices:{input_mtok:1,output_mtok:2}},{id:"gpt-3.5-turbo-16k-0613",match:{equals:"gpt-3.5-turbo-16k-0613"},prices:{input_mtok:3,output_mtok:4}},{id:"gpt-35-16k",match:{equals:"gpt-35-16k"},prices:{input_mtok:3,output_mtok:4}},{id:"gpt-35-turbo",match:{or:[{equals:"gpt-35-turbo"},{equals:"gpt-35-turbo-0613"},{equals:"gpt-35-turbo-1106"}]},prices:{input_mtok:1.5,output_mtok:2}},{id:"gpt-35-turbo-16k",match:{or:[{equals:"gpt-35-turbo-16k"},{equals:"gpt-35-turbo-16k-0613"}]},prices:{input_mtok:3,output_mtok:4}},{id:"gpt-4",match:{or:[{equals:"gpt-4"},{equals:"gpt-4-0314"},{equals:"gpt-4-0613"}]},prices:{input_mtok:30,output_mtok:60}},{id:"gpt-4-0125-preview",match:{equals:"gpt-4-0125-preview"},prices:{input_mtok:10,output_mtok:30}},{id:"gpt-4-1106-preview",match:{equals:"gpt-4-1106-preview"},prices:{input_mtok:10,output_mtok:30}},{id:"gpt-4-1106-vision-preview",match:{equals:"gpt-4-1106-vision-preview"},prices:{input_mtok:10,output_mtok:30}},{id:"gpt-4-32k",match:{or:[{equals:"gpt-4-32k"},{equals:"gpt-4-32k-0314"},{equals:"gpt-4-32k-0613"}]},prices:{input_mtok:60,output_mtok:120}},{id:"gpt-4-preview-1106",match:{equals:"gpt-4-preview-1106"},prices:{input_mtok:10,output_mtok:30}},{id:"gpt-4-turbo",match:{or:[{equals:"gpt-4-turbo"},{equals:"gpt-4-turbo-0125-preview"},{equals:"gpt-4-turbo-2024-04-09"},{equals:"gpt-4-turbo-preview"}]},prices:{input_mtok:10,output_mtok:30}},{id:"gpt-4-vision",match:{or:[{equals:"gpt-4-vision"},{equals:"gpt-4-vision-preview"}]},prices:{input_mtok:10,output_mtok:30}},{id:"gpt-4.1",match:{or:[{equals:"gpt-4.1"},{equals:"gpt-4.1-2025-04-14"}]},prices:{input_mtok:2,cache_read_mtok:.5,output_mtok:8}},{id:"gpt-4.1-mini",match:{or:[{equals:"gpt-4.1-mini"},{equals:"gpt-4.1-mini-2025-04-14"}]},prices:{input_mtok:.4,cache_read_mtok:.1,output_mtok:1.6}},{id:"gpt-4.1-nano",match:{or:[{equals:"gpt-4.1-nano"},{equals:"gpt-4.1-nano-2025-04-14"}]},prices:{input_mtok:.1,cache_read_mtok:.03,output_mtok:.4}},{id:"gpt-4o-2024-0513",match:{or:[{equals:"gpt-4o-2024-05-13"},{equals:"gpt-4o-2024-0513"}]},prices:{input_mtok:5,output_mtok:15}},{id:"gpt-4o-2024-08-06",match:{equals:"gpt-4o-2024-08-06"},prices:{input_mtok:2.5,cache_read_mtok:1.25,output_mtok:10}},{id:"gpt-4o-2024-1120",match:{or:[{equals:"gpt-4o-2024-1120"},{equals:"gpt-4o-2024-11-20"}]},prices:{input_mtok:2.5,cache_read_mtok:1.25,output_mtok:10}},{id:"gpt-4o-mini",match:{or:[{equals:"gpt-4o-mini"},{equals:"gpt-4o-mini-0718"},{starts_with:"gpt-4o-mini-audio"}]},context_window:128e3,prices:{input_mtok:.15,cache_read_mtok:.075,output_mtok:.6,input_audio_mtok:10,output_audio_mtok:20}},{id:"gpt-4o-mini-realtime",match:{starts_with:"gpt-4o-mini-realtime"},prices:{input_mtok:.6,cache_read_mtok:.3,output_mtok:2.4,input_audio_mtok:10,cache_audio_read_mtok:.3,output_audio_mtok:20}},{id:"gpt-4o-realtime",match:{starts_with:"gpt-4o-realtime"},prices:{input_mtok:5,cache_read_mtok:2.5,output_mtok:20,input_audio_mtok:40,cache_audio_read_mtok:2.5,output_audio_mtok:80}},{id:"gpt-5",name:"GPT-5",description:"GPT-5 is OpenAI's flagship model for coding, reasoning, and agentic tasks across domains.",match:{or:[{equals:"gpt-5"},{equals:"gpt-5-2025-08-07"}]},context_window:4e5,prices:{input_mtok:1.25,cache_read_mtok:.125,output_mtok:10}},{id:"gpt-5-mini",name:"GPT-5 mini",description:"GPT-5 mini is a faster, more cost-efficient version of GPT-5. It's great for well-defined tasks and precise prompts.",match:{or:[{equals:"gpt-5-mini"},{equals:"gpt-5-mini-2025-08-07"}]},context_window:4e5,prices:{input_mtok:.25,cache_read_mtok:.025,output_mtok:2}},{id:"gpt-5-nano",name:"GPT-5 nano",description:"GPT-5 Nano is OpenAI's fastest, cheapest version of GPT-5. It's great for summarization and classification tasks.",match:{or:[{equals:"gpt-5-nano"},{equals:"gpt-5-nano-2025-04-14"}]},context_window:4e5,prices:{input_mtok:.05,cache_read_mtok:.005,output_mtok:.4}},{id:"gpt35",match:{equals:"gpt35"},prices:{input_mtok:1.5,output_mtok:2}},{id:"gpt4-turbo-preview",match:{equals:"gpt4-turbo-preview"},prices:{input_mtok:10,output_mtok:30}},{id:"mai-ds-r1:free",name:"MAI DS R1 (free)",description:"MAI-DS-R1 is a post-trained variant of DeepSeek-R1 developed by the Microsoft AI team to improve the model's responsiveness on previously blocked topics while enhancing its safety profile. Built on top of DeepSeek-R1's reasoning foundation, it integrates 110k examples from the Tulu-3 SFT dataset and 350k internally curated multilingual safety-alignment samples. The model retains strong reasoning, coding, and problem-solving capabilities, while unblocking a wide range of prompts previously restricted in R1.",match:{equals:"mai-ds-r1:free"},prices:{}},{id:"o1",match:{or:[{equals:"o1"},{equals:"o1-2024-12-17"},{equals:"o1-preview"},{equals:"o1-preview-2024-09-12"}]},prices:{input_mtok:15,cache_read_mtok:7.5,output_mtok:60}},{id:"o1-mini",match:{or:[{equals:"o1-mini"},{equals:"o1-mini-2024-09-12"}]},prices:{input_mtok:1.1,cache_read_mtok:.55,output_mtok:4.4}},{id:"o3-2025-04-16",match:{or:[{equals:"o3"},{equals:"o3-2025-04-16"}]},prices:{input_mtok:2,cache_read_mtok:.5,output_mtok:8}},{id:"o3-mini",match:{or:[{equals:"o3-mini"},{equals:"o3-mini-2025-01-31"}]},prices:{input_mtok:1.1,cache_read_mtok:.55,output_mtok:4.4}},{id:"o4-mini",match:{or:[{contains:"o4-mini"},{contains:"o4-mini-2025-04-16"}]},prices:{input_mtok:1.1,cache_read_mtok:.28,output_mtok:4.4}},{id:"phi-3-medium-128k-instruct",name:"Phi-3 Medium 128K Instruct",description:"Phi-3 128K Medium is a powerful 14-billion parameter model designed for advanced language understanding, reasoning, and instruction following. Optimized through supervised fine-tuning and preference adjustments, it excels in tasks involving common sense, mathematics, logical reasoning, and code processing.",match:{equals:"phi-3-medium-128k-instruct"},prices:{input_mtok:1,output_mtok:1}},{id:"phi-3-mini-128k-instruct",name:"Phi-3 Mini 128K Instruct",description:"Phi-3 Mini is a powerful 3.8B parameter model designed for advanced language understanding, reasoning, and instruction following. Optimized through supervised fine-tuning and preference adjustments, it excels in tasks involving common sense, mathematics, logical reasoning, and code processing.",match:{equals:"phi-3-mini-128k-instruct"},prices:{input_mtok:.1,output_mtok:.1}},{id:"phi-3.5-mini-128k-instruct",name:"Phi-3.5 Mini 128K Instruct",description:"Phi-3.5 models are lightweight, state-of-the-art open models. These models were trained with Phi-3 datasets that include both synthetic data and the filtered, publicly available websites data, with a focus on high quality and reasoning-dense properties. Phi-3.5 Mini uses 3.8B parameters, and is a dense decoder-only transformer model using the same tokenizer as Phi-3 Mini.",match:{equals:"phi-3.5-mini-128k-instruct"},prices:{input_mtok:.1,output_mtok:.1}},{id:"phi-4",name:"Phi 4",description:"Microsoft Research Phi-4 is designed to perform well in complex reasoning tasks and can operate efficiently in situations with limited memory or where quick responses are needed.",match:{equals:"phi-4"},prices:{input_mtok:.07,output_mtok:.14}},{id:"phi-4-multimodal-instruct",name:"Phi 4 Multimodal Instruct",description:"Phi-4 Multimodal Instruct is a versatile 5.6B parameter foundation model that combines advanced reasoning and instruction-following capabilities across both text and visual inputs, providing accurate text outputs. The unified architecture enables efficient, low-latency inference, suitable for edge and mobile deployments. Phi-4 Multimodal Instruct supports text inputs in multiple languages including Arabic, Chinese, English, French, German, Japanese, Spanish, and more, with visual input optimized primarily for English. It delivers impressive performance on multimodal tasks involving mathematical, scientific, and document reasoning, providing developers and enterprises a powerful yet compact model for sophisticated interactive applications. For more information, see the Phi-4 Multimodal blog post.",match:{equals:"phi-4-multimodal-instruct"},prices:{input_mtok:.05,output_mtok:.1}},{id:"phi-4-reasoning-plus",name:"Phi 4 Reasoning Plus",description:"Phi-4-reasoning-plus is an enhanced 14B parameter model from Microsoft, fine-tuned from Phi-4 with additional reinforcement learning to boost accuracy on math, science, and code reasoning tasks. It uses the same dense decoder-only transformer architecture as Phi-4, but generates longer, more comprehensive outputs structured into a step-by-step reasoning trace and final answer.",match:{equals:"phi-4-reasoning-plus"},prices:{input_mtok:.07,output_mtok:.35}},{id:"phi-4-reasoning-plus:free",name:"Phi 4 Reasoning Plus (free)",description:"Phi-4-reasoning-plus is an enhanced 14B parameter model from Microsoft, fine-tuned from Phi-4 with additional reinforcement learning to boost accuracy on math, science, and code reasoning tasks. It uses the same dense decoder-only transformer architecture as Phi-4, but generates longer, more comprehensive outputs structured into a step-by-step reasoning trace and final answer.",match:{equals:"phi-4-reasoning-plus:free"},prices:{}},{id:"phi-4-reasoning:free",name:"Phi 4 Reasoning (free)",description:"Phi-4-reasoning is a 14B parameter dense decoder-only transformer developed by Microsoft, fine-tuned from Phi-4 to enhance complex reasoning capabilities. It uses a combination of supervised fine-tuning on chain-of-thought traces and reinforcement learning, targeting math, science, and code reasoning tasks. With a 32k context window and high inference efficiency, it is optimized for structured responses in a two-part format: reasoning trace followed by a final solution.",match:{equals:"phi-4-reasoning:free"},prices:{}},{id:"text-embedding-3-large",match:{equals:"text-embedding-3-large"},prices:{input_mtok:.13}},{id:"text-embedding-3-small",match:{equals:"text-embedding-3-small"},prices:{input_mtok:.02}},{id:"wizardlm-2-8x22b",name:"WizardLM-2 8x22B",description:"WizardLM-2 8x22B is Microsoft AI's most advanced Wizard model. It demonstrates highly competitive performance compared to leading proprietary models, and it consistently outperforms all existing state-of-the-art opensource models.",match:{equals:"wizardlm-2-8x22b"},prices:{input_mtok:.48,output_mtok:.48}}]},{id:"cohere",name:"Cohere",pricing_urls:["https://cohere.com/pricing"],api_pattern:"https://api\\.cohere\\.ai",model_match:{starts_with:"command-"},provider_match:{contains:"cohere"},extractors:[{api_flavor:"default",root:["usage","billed_units"],model_path:"model",mappings:[{path:"input_tokens",dest:"input_tokens",required:!0},{path:"output_tokens",dest:"output_tokens",required:!0}]}],models:[{id:"command",name:"Command",description:"Command is an instruction-following conversational model that performs language tasks with high quality, more reliably and with a longer context than our base generative models.",match:{equals:"command"},prices:{input_mtok:1,output_mtok:2}},{id:"command-a",name:"Command A",description:`Command A is an open-weights 111B parameter model with a 256k context window focused on delivering great performance across agentic, multilingual, and coding use cases.
3
3
  Compared to other leading proprietary and open-weights models Command A delivers maximum performance with minimum hardware costs, excelling on business-critical agentic and multilingual tasks.`,match:{starts_with:"command-a"},prices:{input_mtok:2.5,output_mtok:10}},{id:"command-r",name:"Command R",description:"Command-R is a 35B parameter model that performs conversational language tasks at a higher quality, more reliably, and with a longer context than previous models. It can be used for complex workflows like code generation, retrieval augmented generation (RAG), tool use, and agents.",match:{or:[{equals:"command-r"},{equals:"command-r-08-2024"}]},prices:{input_mtok:.15,output_mtok:.6}},{id:"command-r-plus",name:"Command R+",description:"Command R+ is a new, 104B-parameter LLM from Cohere. It's useful for roleplay, general consumer usecases, and Retrieval Augmented Generation (RAG).",match:{or:[{equals:"command-r-plus"},{equals:"command-r-plus-08-2024"}]},prices:{input_mtok:2.5,output_mtok:10}},{id:"command-r7b",name:"Command R7B",description:"Command R7B (12-2024) is a small, fast update of the Command R+ model, delivered in December 2024. It excels at RAG, tool use, agents, and similar tasks requiring complex reasoning and multiple steps.",match:{or:[{equals:"command-r7b"},{equals:"command-r7b-12-2024"}]},prices:{input_mtok:.0375,output_mtok:.15}}]},{id:"deepseek",name:"Deepseek",pricing_urls:["https://api-docs.deepseek.com/quick_start/pricing"],api_pattern:"https://api\\.deepseek\\.com",price_comments:'Deepseek off-peak pricing applies "UTC 16:30-00:30" so we switch it around and use the off-peak pricing as the default (first) price then the second price with a constraint is the "standard" pricing that applies "UTC 00:30-16:30".',model_match:{contains:"deepseek"},extractors:[{api_flavor:"chat",root:"usage",model_path:"model",mappings:[{path:"prompt_tokens",dest:"input_tokens",required:!0},{path:["prompt_tokens_details","cached_tokens"],dest:"cache_read_tokens",required:!1},{path:["completion_tokens_details","audio_tokens"],dest:"output_audio_tokens",required:!1},{path:"completion_tokens",dest:"output_tokens",required:!0}]}],models:[{id:"deepseek-chat",name:"DeepSeek Chat",description:"DeepSeek-V3 is the latest model from the DeepSeek team, building upon the instruction following and coding abilities of the previous versions. Pre-trained on nearly 15 trillion tokens, the reported evaluations reveal that the model outperforms other open-source models and rivals leading closed-source models.",match:{or:[{starts_with:"deepseek-chat"},{equals:"deepseek-chat-v3-0324"}]},context_window:64e3,prices:[{prices:{input_mtok:.135,cache_read_mtok:.035,output_mtok:.55}},{constraint:{start_time:"00:30:00Z",end_time:"16:30:00Z",type:"time_of_date"},prices:{input_mtok:.27,cache_read_mtok:.07,output_mtok:1.1}}]},{id:"deepseek-reasoner",name:"Deepseek R1",description:"DeepSeek R1 is here: Performance on par with OpenAI o1, but open-sourced and with fully open reasoning tokens. It's 671B parameters in size, with 37B active in an inference pass.",match:{or:[{equals:"deepseek-reasoner"},{starts_with:"deepseek-r1"},{equals:"deepseek-r1-0528"}]},context_window:64e3,prices:[{prices:{input_mtok:.135,cache_read_mtok:.035,output_mtok:.55}},{constraint:{start_time:"00:30:00Z",end_time:"16:30:00Z",type:"time_of_date"},prices:{input_mtok:.55,cache_read_mtok:.14,output_mtok:2.19}}]}]},{id:"fireworks",name:"Fireworks",pricing_urls:["https://fireworks.ai/pricing"],api_pattern:"https://api\\.fireworks\\.ai",model_match:{starts_with:"accounts/fireworks/models/"},extractors:[{api_flavor:"chat",root:"usage",model_path:"model",mappings:[{path:"prompt_tokens",dest:"input_tokens",required:!0},{path:["prompt_tokens_details","cached_tokens"],dest:"cache_read_tokens",required:!1},{path:["completion_tokens_details","audio_tokens"],dest:"output_audio_tokens",required:!1},{path:"completion_tokens",dest:"output_tokens",required:!0}]}],models:[{id:"deepseek-r1-0528",name:"DeepSeek R1 0528",description:"The updated DeepSeek-R1-0528 model delivers major improvements in reasoning, inference, and accuracy through enhanced post-training optimization and greater computational resources. It now performs at a level approaching top-tier models like O3 and Gemini 2.5 Pro, with notable gains in complex tasks such as math and programming.",match:{equals:"accounts/fireworks/models/deepseek-r1-0528"},context_window:16e4,prices:{input_mtok:3,output_mtok:8}},{id:"deepseek-v3-0324",name:"Deepseek V3 03-24",description:"A strong Mixture-of-Experts (MoE) language model with 671B total parameters with 37B activated for each token from Deepseek. Updated checkpoint.",match:{equals:"accounts/fireworks/models/deepseek-v3-0324"},context_window:16e4,price_comments:`docs give just one price - "Pricing Per 1M Tokens", we assume that's input and output`,prices:{input_mtok:.9,output_mtok:.9}},{id:"gemma-3-27b-it",name:"Gemma 3 27B Instruct",match:{equals:"accounts/fireworks/models/gemma-3-27b-it"},context_window:131e3,price_comments:`docs give just one price - "Pricing Per 1M Tokens", we assume that's input and output`,prices:{input_mtok:.1,output_mtok:.1}},{id:"llama-v3p1-8b-instruct",name:"Llama 3.1 8B Instruct",description:"The Meta Llama 3.1 collection of multilingual large language models (LLMs) is a collection of pretrained and instruction tuned generative models in 8B, 70B and 405B sizes. The Llama 3.1 instruction tuned text only models (8B, 70B, 405B) are optimized for multilingual dialogue use cases and outperform many of the available open source and closed chat models on common industry benchmarks.",match:{equals:"accounts/fireworks/models/llama-v3p1-8b-instruct"},context_window:131e3,price_comments:`docs give just one price - "Pricing Per 1M Tokens", we assume that's input and output`,prices:{input_mtok:.2,output_mtok:.2}},{id:"llama4-maverick-instruct-basic",name:"Llama 4 Maverick Instruct (Basic)",description:"The Meta Llama 3.1 collection of multilingual large language models (LLMs) is a collection of pretrained and instruction tuned generative models in 8B, 70B and 405B sizes. The Llama 3.1 instruction tuned text only models (8B, 70B, 405B) are optimized for multilingual dialogue use cases and outperform many of the available open source and closed chat models on common industry benchmarks.",match:{equals:"accounts/fireworks/models/llama4-maverick-instruct-basic"},context_window:1e6,prices:{input_mtok:.22,output_mtok:.88}},{id:"qwen2p5-vl-72b-instruct",name:"Qwen2.5-VL 72B Instruct",description:"Latest Qwen's VLM model",match:{equals:"accounts/fireworks/models/qwen2p5-vl-72b-instruct"},context_window:128e3,price_comments:`docs give just one price - "Pricing Per 1M Tokens", we assume that's input and output`,prices:{input_mtok:.9,output_mtok:.9}},{id:"qwen3-235b-a22b",name:"Qwen3 235B-A22B",description:'Qwen3 is the latest evolution in the Qwen LLM series, featuring both dense and MoE models with major advancements in reasoning, agent capabilities, multilingual support, and instruction following. It uniquely allows seamless switching between "thinking" (for complex logic, math, coding) and "non-thinking" modes (for fast, general dialogue), delivering strong performance across tasks.',match:{equals:"accounts/fireworks/models/qwen3-235b-a22b"},context_window:128e3,prices:{input_mtok:.22,output_mtok:.88}}]},{id:"google",name:"Google",pricing_urls:["https://ai.google.dev/gemini-api/docs/pricing","https://cloud.google.com/vertex-ai/generative-ai/pricing"],api_pattern:"https://(.*\\.)?googleapis\\.com",model_match:{contains:"gemini"},provider_match:{or:[{contains:"google"},{contains:"vertex"},{contains:"gemini"}]},extractors:[{api_flavor:"default",root:"usageMetadata",model_path:"modelVersion",mappings:[{path:"promptTokenCount",dest:"input_tokens",required:!0},{path:["cacheTokensDetails",{type:"array-match",field:"modality",match:{equals:"TEXT"}},"tokenCount"],dest:"cache_read_tokens",required:!1},{path:["cacheTokensDetails",{type:"array-match",field:"modality",match:{equals:"AUDIO"}},"tokenCount"],dest:"cache_audio_read_tokens",required:!1},{path:["promptTokensDetails",{type:"array-match",field:"modality",match:{equals:"AUDIO"}},"tokenCount"],dest:"input_audio_tokens",required:!1},{path:"candidatesTokenCount",dest:"output_tokens",required:!0},{path:"thoughtsTokenCount",dest:"output_tokens",required:!1}]}],models:[{id:"claude-3-5-haiku",match:{contains:"claude-3-5-haiku"},context_window:2e5,prices:{input_mtok:.8,cache_write_mtok:1,cache_read_mtok:.08,output_mtok:4}},{id:"claude-3-5-sonnet",match:{contains:"claude-3-5-sonnet"},context_window:2e5,prices:{input_mtok:3,cache_write_mtok:3.75,cache_read_mtok:.3,output_mtok:15}},{id:"claude-3-7-sonnet",match:{contains:"claude-3-7-sonnet"},context_window:2e5,prices:{input_mtok:3,cache_write_mtok:3.75,cache_read_mtok:.3,output_mtok:15}},{id:"claude-3-haiku",match:{contains:"claude-3-haiku"},context_window:2e5,prices:{input_mtok:.25,cache_write_mtok:.3,cache_read_mtok:.03,output_mtok:1.25}},{id:"claude-3-opus",match:{contains:"claude-3-opus"},prices:{input_mtok:15,cache_write_mtok:18.75,cache_read_mtok:1.5,output_mtok:75}},{id:"claude-4-opus",match:{or:[{contains:"claude-4-opus"},{contains:"claude-opus-4"}]},context_window:2e5,prices:{input_mtok:15,cache_write_mtok:18.75,cache_read_mtok:1.5,output_mtok:75}},{id:"claude-4-sonnet",match:{or:[{contains:"claude-4-sonnet"},{contains:"claude-sonnet-4"}]},context_window:2e5,prices:{input_mtok:3,cache_write_mtok:3.75,cache_read_mtok:.3,output_mtok:15}},{id:"gemini-1.0-pro-vision-001",name:"gemini 1.0 pro vision",description:"Google's first-generation advanced multimodal model that can understand text, code, and images. It provides strong reasoning capabilities and follows instructions effectively.",match:{equals:"gemini-1.0-pro-vision-001"},context_window:32768,price_comments:"I can't find anything about this model or it's pricing, so trusting the original source",prices:{input_mtok:.125,output_mtok:.375}},{id:"gemini-1.5-flash",name:"gemini 1.5 flash",description:"A faster, more cost-effective variant of Gemini 1.5 that maintains strong capabilities while optimizing for performance and cost efficiency. Suitable for production deployments requiring high throughput.",match:{contains:"gemini-1.5-flash"},context_window:1e6,prices:{input_mtok:{base:.075,tiers:[{start:128e3,price:.15}]},cache_read_mtok:{base:.01875,tiers:[{start:128e3,price:.0375}]},output_mtok:{base:.3,tiers:[{start:128e3,price:.6}]}}},{id:"gemini-1.5-pro",name:"gemini 1.5 Pro",description:"Google's most capable multimodal model with an extremely long context window of up to 1 million tokens. It excels at complex reasoning, long-form content processing, and multimodal understanding.",match:{contains:"gemini-1.5-pro"},context_window:1e6,prices:{input_mtok:{base:1.25,tiers:[{start:128e3,price:2.5}]},output_mtok:{base:5,tiers:[{start:128e3,price:10}]}}},{id:"gemini-2.0-flash",name:"gemini 2.0 flash",description:"The newest generation of Google's Gemini models, featuring improved reasoning, instruction following, and factual accuracy, with the Flash variant optimized for cost-efficiency and performance.",match:{or:[{contains:"gemini-2.0-flash"},{equals:"gemini-2.0-flash-lite-001"},{equals:"gemini-2.0-flash-001"},{equals:"gemini-2.0-flash-exp:free"}]},context_window:1e6,prices:{input_mtok:.1,cache_read_mtok:{base:.025,tiers:[{start:1e6,price:.175}]},output_mtok:.4,input_audio_mtok:.7}},{id:"gemini-2.0-flash-lite",name:"gemini 2.0 flash lite",description:"A lighter, more cost-effective version of Gemini 2.0 Flash, designed for applications requiring high efficiency while maintaining good performance. Ideal for high-volume, cost-sensitive deployments.",match:{contains:"gemini-2.0-flash-lite"},context_window:1e6,prices:{input_mtok:.075,output_mtok:.3}},{id:"gemini-2.5-flash",name:"Gemini 2.5 Flash",description:`Gemini 2.5 Flash is Google's state-of-the-art workhorse model, specifically designed for advanced reasoning, coding, mathematics, and scientific tasks. It includes built-in "thinking" capabilities, enabling it to provide responses with greater accuracy and nuanced context handling.`,match:{or:[{equals:"gemini-2.5-flash"},{equals:"gemini-2.5-flash-latest"}]},prices:{input_mtok:.3,cache_read_mtok:.075,output_mtok:2.5,input_audio_mtok:1,cache_audio_read_mtok:.25}},{id:"gemini-2.5-flash-lite",name:"Gemini 2.5 Flash Lite",description:'Gemini 2.5 Flash-Lite is a lightweight reasoning model in the Gemini 2.5 family, optimized for ultra-low latency and cost efficiency. It offers improved throughput, faster token generation, and better performance across common benchmarks compared to earlier Flash models. By default, "thinking" (i.e. multi-pass reasoning) is disabled to prioritize speed, but developers can enable it via the Reasoning API parameter to selectively trade off cost for intelligence.',match:{or:[{equals:"gemini-2.5-flash-lite"},{starts_with:"gemini-2.5-flash-lite-preview"}]},context_window:1e6,prices:{input_mtok:.1,cache_read_mtok:.025,output_mtok:.4,input_audio_mtok:.5,cache_audio_read_mtok:.125}},{id:"gemini-2.5-flash-preview",name:"Gemini 2.5 Flash Preview 05-20",description:`Gemini 2.5 Flash May 20th Checkpoint is Google's state-of-the-art workhorse model, specifically designed for advanced reasoning, coding, mathematics, and scientific tasks. It includes built-in "thinking" capabilities, enabling it to provide responses with greater accuracy and nuanced context handling.`,match:{or:[{contains:"gemini-2.5-flash-preview"},{equals:"gemini-2.5-flash-preview-05-20"},{equals:"gemini-2.5-flash-preview-05-20:thinking"},{equals:"gemini-2.5-flash-preview"},{equals:"gemini-2.5-flash-preview:thinking"}]},price_comments:"from https://cloud.google.com/vertex-ai/generative-ai/pricing should be retired 2025-07-15",prices:{input_mtok:.15,output_mtok:.6}},{id:"gemini-2.5-pro",name:"Gemini 2.5 Pro",description:`Gemini 2.5 Pro is Google's state-of-the-art AI model designed for advanced reasoning, coding, mathematics, and scientific tasks. It employs "thinking" capabilities, enabling it to reason through responses with enhanced accuracy and nuanced context handling. Gemini 2.5 Pro achieves top-tier performance on multiple benchmarks, including first-place positioning on the LMArena leaderboard, reflecting superior human-preference alignment and complex problem-solving abilities.`,match:{starts_with:"gemini-2.5-pro"},price_comments:"See https://ai.google.dev/gemini-api/docs/pricing#gemini-2.5-pro",prices:{input_mtok:{base:1.25,tiers:[{start:2e5,price:2.5}]},cache_read_mtok:{base:.31,tiers:[{start:2e5,price:.625}]},output_mtok:{base:10,tiers:[{start:2e5,price:15}]}}},{id:"gemini-flash-1.5",name:"Gemini 1.5 Flash",description:"Gemini 1.5 Flash is a foundation model that performs well at a variety of multimodal tasks such as visual understanding, classification, summarization, and creating content from image, audio and video. It's adept at processing visual and text inputs such as photographs, documents, infographics, and screenshots.",match:{equals:"gemini-flash-1.5"},price_comments:"See https://ai.google.dev/gemini-api/docs/pricing#gemini-1.5-flash",prices:{input_mtok:{base:.075,tiers:[{start:128e3,price:.15}]},cache_read_mtok:{base:.01875,tiers:[{start:128e3,price:.0375}]},output_mtok:{base:.3,tiers:[{start:128e3,price:.6}]}}},{id:"gemini-flash-1.5-8b",name:"gemini 1.5 flash",description:"A faster, more cost-effective variant of Gemini 1.5 that maintains strong capabilities while optimizing for performance and cost efficiency. Suitable for production deployments requiring high throughput.",match:{equals:"gemini-flash-1.5-8b"},context_window:1e6,price_comments:"See https://ai.google.dev/gemini-api/docs/pricing#gemini-1.5-flash-8b",prices:{input_mtok:{base:.0375,tiers:[{start:128e3,price:.075}]},cache_read_mtok:{base:.01,tiers:[{start:128e3,price:.02}]},output_mtok:{base:.15,tiers:[{start:128e3,price:.3}]}}},{id:"gemini-pro",name:"gemini 1.0 pro",description:"Google's first-generation advanced multimodal model that can understand text, code, and images. It provides strong reasoning capabilities and follows instructions effectively.",match:{or:[{equals:"gemini-pro"},{equals:"gemini-1.0-pro"}]},context_window:32768,price_comments:"I can't find anything so trusting these prices, not sure the model still exists",prices:{input_mtok:.125,output_mtok:.375}},{id:"gemini-pro-1.5",name:"Gemini 1.5 Pro",description:"Google's latest multimodal model, supports image and video[0] in text or chat prompts.",match:{equals:"gemini-pro-1.5"},context_window:2e6,price_comments:"See https://ai.google.dev/gemini-api/docs/pricing#gemini-1.5-pro",prices:{input_mtok:{base:1.25,tiers:[{start:128e3,price:2.5}]},cache_read_mtok:{base:.3125,tiers:[{start:128e3,price:.625}]},output_mtok:{base:5,tiers:[{start:128e3,price:10}]}}},{id:"gemma-3",name:"Gemma 3 (free)",description:"Lightweight, state-of the art, open model built from the same technology that powers our Gemini models.",match:{or:[{starts_with:"gemma-3-"},{equals:"gemma-3"}]},prices:{}},{id:"gemma-3n",name:"Gemma 3n (free)",description:"Our open model built for efficient performance on everyday devices like mobile phones, laptops, and tablets.",match:{or:[{starts_with:"gemma-3n"}]},prices:{}}]},{id:"groq",name:"Groq",pricing_urls:["https://groq.com/pricing/"],api_pattern:"https://api\\.groq\\.com",extractors:[{api_flavor:"default",root:"usage",model_path:"model",mappings:[{path:"prompt_tokens",dest:"input_tokens",required:!0},{path:"completion_tokens",dest:"output_tokens",required:!0}]}],models:[{id:"deepseek-r1-distill-llama-70b",name:"DeepSeek R1 Distill Llama 70B",match:{equals:"deepseek-r1-distill-llama-70b"},context_window:131072,prices:{input_mtok:.75,output_mtok:.99}},{id:"gemma2-9b-it",name:"Gemma 2 9B 8k",match:{or:[{equals:"gemma2-9b-it"},{equals:"gemma2-9b"}]},prices:{input_mtok:.2,output_mtok:.2}},{id:"llama-3.1-8b-instant",name:"Llama 3.1 8B Instant 128k",match:{equals:"llama-3.1-8b-instant"},prices:{input_mtok:.05,output_mtok:.08}},{id:"llama-3.3-70b-versatile",name:"Llama 3.3 70B Versatile 128k",match:{equals:"llama-3.3-70b-versatile"},prices:{input_mtok:.59,output_mtok:.79}},{id:"llama2-70b-4096",match:{equals:"llama2-70b-4096"},prices:{input_mtok:.7,output_mtok:.8}},{id:"llama3-70b-8192",match:{equals:"llama3-70b-8192"},prices:{input_mtok:.59,output_mtok:.79}},{id:"llama3-8b-8192",match:{equals:"llama3-8b-8192"},prices:{input_mtok:.05,output_mtok:.08}},{id:"llama3-groq-70b-8192-tool-use-preview",match:{equals:"llama3-groq-70b-8192-tool-use-preview"},prices:{input_mtok:.89,output_mtok:.89}},{id:"llama3-groq-8b-8192-tool-use-preview",match:{equals:"llama3-groq-8b-8192-tool-use-preview"},prices:{input_mtok:.19,output_mtok:.19}},{id:"meta-llama/llama-4-maverick-17b-128e-instruct",name:"Llama 4 Maverick 17B 128E",match:{equals:"meta-llama/llama-4-maverick-17b-128e-instruct"},context_window:131072,prices:{input_mtok:.2,output_mtok:.6}},{id:"meta-llama/llama-4-scout-17b-16e-instruct",name:"Llama 4 Scout (17Bx16E) 128k",match:{equals:"meta-llama/llama-4-scout-17b-16e-instruct"},prices:{input_mtok:.11,output_mtok:.34}},{id:"meta-llama/llama-guard-4-12b",name:"Llama Guard 4 12B",match:{equals:"meta-llama/llama-guard-4-12b"},context_window:131072,prices:{input_mtok:.2,output_mtok:.2}},{id:"moonshotai/kimi-k2-instruct",name:"Kimi K2 1T 128k",match:{equals:"moonshotai/kimi-k2-instruct"},context_window:131072,prices:{input_mtok:1,output_mtok:3}},{id:"openai/gpt-oss-120b",description:`GPT-OSS 120B is OpenAI's flagship open source model, built on a Mixture-of-Experts (MoE) architecture with
4
4
  120 billion parameters and 128 experts.
5
5
  `,match:{equals:"openai/gpt-oss-120b"},context_window:131072,prices:{input_mtok:.15,output_mtok:.75}},{id:"openai/gpt-oss-20b",description:`GPT-OSS 20B is OpenAI's flagship open source model, built on a Mixture-of-Experts (MoE) architecture with
package/dist/index.js CHANGED
@@ -235,7 +235,16 @@ const w = [
235
235
  match: {
236
236
  or: [
237
237
  {
238
- starts_with: "claude-sonnet-4"
238
+ starts_with: "claude-sonnet-4-2025"
239
+ },
240
+ {
241
+ starts_with: "claude-sonnet-4-0"
242
+ },
243
+ {
244
+ starts_with: "claude-sonnet-4@"
245
+ },
246
+ {
247
+ equals: "claude-sonnet-4"
239
248
  },
240
249
  {
241
250
  starts_with: "claude-4-sonnet"
@@ -249,6 +258,53 @@ const w = [
249
258
  cache_read_mtok: 0.3,
250
259
  output_mtok: 15
251
260
  }
261
+ },
262
+ {
263
+ id: "claude-sonnet-4-5",
264
+ name: "Claude Sonnet 4.5",
265
+ description: "Most intelligent model for building agents and coding",
266
+ match: {
267
+ starts_with: "claude-sonnet-4-5"
268
+ },
269
+ context_window: 1e6,
270
+ prices: {
271
+ input_mtok: {
272
+ base: 3,
273
+ tiers: [
274
+ {
275
+ start: 2e5,
276
+ price: 6
277
+ }
278
+ ]
279
+ },
280
+ cache_write_mtok: {
281
+ base: 3.75,
282
+ tiers: [
283
+ {
284
+ start: 2e5,
285
+ price: 7.5
286
+ }
287
+ ]
288
+ },
289
+ cache_read_mtok: {
290
+ base: 0.3,
291
+ tiers: [
292
+ {
293
+ start: 2e5,
294
+ price: 0.6
295
+ }
296
+ ]
297
+ },
298
+ output_mtok: {
299
+ base: 15,
300
+ tiers: [
301
+ {
302
+ start: 2e5,
303
+ price: 22.5
304
+ }
305
+ ]
306
+ }
307
+ }
252
308
  }
253
309
  ]
254
310
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pydantic/genai-prices",
3
- "version": "0.0.28",
3
+ "version": "0.0.30",
4
4
  "description": "Calculate prices for calling LLM inference APIs",
5
5
  "author": "Pydantic Team",
6
6
  "type": "module",