Calculate LLM API cost
jsonhouse_calculate_pricingEstimate monthly LLM API cost per model from jsonhouse's weekly official-price snapshot, including cache reads, cache writes, long-context and regional multipliers, and tokenizer inflation where the snapshot records them. Call this when choosing a model, before writing a model ID into code or config, or when sizing a token budget. Prices are official list prices, not measured bills.
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": "jsonhouse_calculate_pricing"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Cheapest N models to return (default 10) | |
| region | No | API region, e.g. us (default global) | |
| providers | No | Only these providers | |
| cache_ratio | No | Share of input served from cache (default 0) | |
| cache_writes | No | Monthly tokens written to cache (default 0) | |
| input_tokens | Yes | Monthly input tokens | |
| output_tokens | Yes | Monthly output tokens | |
| prompt_length | No | Typical prompt length in tokens (default 4096) |