Estimate what a request costs
estimateRead-onlyIdempotent
The cost of a request on every chat model (or the ids given), cheapest first, with the developer's list cost and the saving. Give input_tokens, or a prompt / messages to count from. With the caller's key, prices are the key's own (price locks included). Live from POST /v1/estimate.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| models | No | Model ids to price. Default: every chat model, cheapest first. | |
| prompt | No | Text to estimate the prompt tokens from, instead of input_tokens. | |
| messages | No | Chat messages to estimate from, instead of input_tokens. | |
| input_tokens | No | Prompt tokens. Give this or a prompt / messages to count from. | |
| output_tokens | No | Completion tokens. Default 1000. |