View current pricing
To see every model price currently active (built-in defaults merged with any custom overrides you have set), run:Built-in model families
CostHQ ships with pricing for the following models out of the box.Anthropic Claude
| Model |
|---|
claude-opus-4 |
claude-sonnet-4 |
claude-3-7-sonnet |
claude-3-5-sonnet-20241022 |
claude-3-5-haiku-20241022 |
claude-3-opus-20240229 |
claude-3-sonnet-20240229 |
claude-3-haiku-20240307 |
OpenAI
| Model |
|---|
gpt-4o |
gpt-4o-mini |
gpt-4-turbo |
gpt-4 |
gpt-3.5-turbo |
o1 |
o1-mini |
o3-mini |
OpenAI Codex
| Model |
|---|
gpt-5.1-codex-max |
gpt-5.1-codex-mini |
gpt-5.3-codex |
codex-mini-latest |
cs pricing list to see the full table.
Custom pricing
Usecs pricing set to add a new model or override the built-in price for an existing one.
Command parameters
| Parameter | Description |
|---|---|
<model> | Model name |
<in> | Input price per 1 million tokens (USD) |
<out> | Output price per 1 million tokens (USD) |
--provider <p> | Optional provider namespace — stores the entry as provider/model to prevent name collisions across providers |
Where custom pricing is stored
Custom prices are saved to~/.CostHQ/pricing.json and merged with the built-in defaults at runtime. Deleting this file or running cs pricing reset returns all prices to their built-in values.
Fallback lookup order
When you runcs log-ai, CostHQ resolves the model price in this order:
provider/model(namespaced key, e.g.azure/gpt-4o)- Plain
modelname (e.g.gpt-4o)
Unknown models
If you use a model that is not in the pricing table and you have not added a custom price for it, CostHQ cannot calculate the cost automatically. Pass the-c <cost> flag to cs log-ai to provide the dollar amount manually:
Pricing source transparency —
cs log-ai --json returns a pricing object that tells you exactly where the price came from:source is "built-in", "custom", "local", or "manual". If modelKnown is false, pass -c <cost> explicitly to avoid untracked spend.Local Model Pricing
For local models (Ollama, vLLM, LM Studio) where costs are based on compute time rather than tokens, usecs local-models add to set an hourly GPU rate, and log usage with cs log-ai --duration. See Local Models for details.