Estimate cost
estimate_costEstimate the cost of a single LLM call before making it, using known or estimated token counts from text inputs, all offline without API keys.
Instructions
Estimate the cost of a single LLM call for one model from known or estimated token counts. Offline, no keys.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| model | Yes | Model alias or full id, e.g. "sonnet" or "claude-sonnet-4-6". | |
| inputTokens | No | Exact input tokens; optional if inputText is given. | |
| outputTokens | No | Exact output tokens; defaults to the model output cap. | |
| inputText | No | Prompt text; estimated to tokens if inputTokens is absent. | |
| expectedOutputText | No | Expected output text; estimated if outputTokens is absent. | |
| charsPerToken | No | Override the chars-per-token heuristic divisor. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| model | Yes | ||
| provider | Yes | ||
| tier | Yes | ||
| inputTokens | Yes | ||
| outputTokens | Yes | ||
| tokensWereEstimated | Yes | ||
| cost | Yes | ||
| breakdown | Yes | ||
| pricing | Yes | ||
| catalogVersion | Yes | ||
| asOf | Yes |