calculate_estimate
Estimate token costs for any model by providing input and output token counts, with optional prompt caching discounts.
Instructions
Estimate the cost for a given number of input and output tokens on a specific model. Supports optional cached_tokens for prompt caching discounts.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| model_name | Yes | Model name (fuzzy matched) | |
| input_tokens | Yes | Number of input tokens | |
| output_tokens | Yes | Number of output tokens | |
| cached_tokens | No | Number of input tokens served from cache (prompt caching). Must be <= input_tokens. These tokens are billed at the cached rate instead of the standard input rate. |