Structs§
- Model
Pricing - Model Pricing tiers (USD per 1 million tokens).
Functions§
- calculate_
cost - Calculates the cost in USD for a given token usage block. Applies a 90% discount for cached input tokens.
- calculate_
estimated_ cost - Calculates a rough estimate for non-streamed or partial data.
- get_
pricing - Returns the pricing tier for a model based on its ID. Benchmark rates based on standard cloud provider tiers.