Skip to main content
CostHQ includes built-in pricing for 42+ AI models, so you never have to calculate costs manually — just provide prompt and completion tokens when logging an API call and CostHQ computes the dollar cost for you.

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

OpenAI

OpenAI Codex

CostHQ also includes built-in pricing for DeepSeek, Azure OpenAI, and Cohere models (42+ total). Run cs pricing list to see the full table.

Custom pricing

Use cs pricing set to add a new model or override the built-in price for an existing one.

Command parameters

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 run cs log-ai, CostHQ resolves the model price in this order:
  1. provider/model (namespaced key, e.g. azure/gpt-4o)
  2. Plain model name (e.g. gpt-4o)
This means namespaced entries always win over generic ones when both exist.

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 transparencycs 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, use cs local-models add to set an hourly GPU rate, and log usage with cs log-ai --duration. See Local Models for details.