price_usage
Calculate the USD cost of a model's token usage by input and output tokens, helping estimate or verify LLM spend per task.
Instructions
Price a concrete usage record at a model's list rates.
Args: model_id: Model identifier from the pricing snapshot, e.g. "anthropic.claude-sonnet-4-5" or "openai.gpt-5-mini". input_tokens: Input (prompt) tokens consumed. output_tokens: Output (completion) tokens consumed.
Returns the input/output/total cost in USD.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| model_id | Yes | ||
| input_tokens | Yes | ||
| output_tokens | Yes |