Estimate AbliteratedLLM request cost
estimate_costEstimate a request's USD cost from input, cached, and output token counts using live model prices, so you can plan spend before sending prompts.
Instructions
Estimate the USD cost of a request from token counts and the live catalog prices, with the API's billing formula: (input - cached) × input price + cached × cached-input price + output × output price, per 1M tokens, rounded up to $0.000001. You supply the token counts: this server has no tokenizer, so the result is an estimate. Reasoning tokens are output tokens. To see the most a chat call can cost, pass its max_tokens as output_tokens. No API key needed.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"input_tokens": "<input_tokens>",
"output_tokens": "<output_tokens>"
},
"name": "estimate_cost"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| model | No | Model id from list_models. Default glm-5.3-flash-abliterated. | glm-5.3-flash-abliterated |
| priority | No | Use the priority-tier prices (service_tier "priority"). Default false. | |
| input_tokens | Yes | Prompt tokens, cached ones included. | |
| output_tokens | Yes | Output tokens, reasoning tokens included. | |
| cached_input_tokens | No | How many of input_tokens are read from the prompt cache. Default 0. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| note | Yes | ||
| tier | Yes | ||
| model | Yes | ||
| tokens | Yes | ||
| cost_usd | Yes | ||
| prices_usd_per_1m_tokens | Yes |