Estimate the cost of LLM requests
estimate_costCalculate the USD cost of one or more LLM requests for a chosen model, including input/output tokens, caching, batch pricing, long-context surcharges, and announced price changes.
Instructions
Cost in USD of N requests on one model, with input/output breakdown, caching, batch, long-context surcharges and announced price changes.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| date | No | Price on this date (YYYY-MM-DD), including announced changes; default today | |
| batch | No | Use asynchronous batch prices (results within 24 hours) | |
| model | Yes | ||
| requests | No | Number of requests to price | |
| input_tokens | Yes | Prompt tokens per request, including cached tokens | |
| output_tokens | Yes | Output tokens per request, including any reasoning/thinking tokens | |
| cached_input_tokens | No | Part of input_tokens read from the prompt cache |