Model: Google: Gemini 1.5 Flash 8B, Context: 1000000, Cost: $0.0375 per 1M input tokens, $0.15 per 1M output tokens
Note: Calculation is approximate based on public data. Prices may change, check official websites.
Calculate the cost of using the Google Gemini 1.5 Flash 8B model based on input and output tokens.
The pricing is as follows:
- Input tokens: $0.0375 per 1 million tokens
- Output tokens: $0.15 per 1 million tokens
The model supports a context window of up to 1,000,000 tokens.
Formula:
Total Cost (USD) = (Number of Input Tokens / 1,000,000) * $0.0375 + (Number of Output Tokens / 1,000,000) * $0.15
Example:
If you use 100,000 input tokens and 50,000 output tokens in one request:
Cost = (100,000 / 1,000,000) * $0.0375 + (50,000 / 1,000,000) * $0.15
Cost = 0.1 * $0.0375 + 0.05 * $0.15
Cost = $0.00375 + $0.0075 = $0.01125