How AI Providers are Calculating charges

Who are AI Providers?

"AI Providers" is a broad term encompassing a wide range of entities involved in the development, deployment, and maintenance of artificial intelligence technologies. 

Tech Gaints Like Google, Amazon, Meta have their own AI and few open source and researches like OpenAI provide a AI capabilites. 

Lets have a look at how these AI Providers charge

OpenAI

OpenAI combines the total tokens used for both requests (prompts) and responses to calculate the overall cost.

What is a token?

Tokens are the basic unit that OpenAI models (GPT Models) use to compute the length of a text. They are groups of characters, which sometimes align with words, but not always. In particular, it depends on the number of characters and includes punctuation signs or emojis.

Please go through the official OpenAI Tokenizer tool here https://platform.openai.com/tokenizer 

Models and costs

Google (Gemini)

Google's generative AI charges every 1,000 characters of input (prompt) and every 1,000 characters of output (response).

Characters are counted by UTF-8 code points and white space is excluded from the count. At the end of each billing cycle, fractions of one cent ($0.01) are rounded to one cent.

Models and Costs

Mistral

Mistral, works in a Pay as you go model, we would require to pay only for the usage we made. The Mistral calculation is based on 1 Million tokens

Models and Costs

Anthropic - Claude

Anthropic - Claude, is another famous AI provider with multiple models. The Anthropic calculation is based on 1 Million tokens