Documentation
¶
Overview ¶
Package cost estimates per-model pricing for prompt tokens.
Prices are per 1M input tokens, in USD, approximate list prices as of this project's v1. The map is used for README-style "cost impact per 100k runs" projections; it is not a substitute for live billing data.
Index ¶
Constants ¶
const PricesAsOf = "2026-08-13"
PricesAsOf is the date the built-in price table was last updated. Bump it whenever prices map changes so `prompt-diff models --check` can warn when it goes stale.
Variables ¶
This section is empty.
Functions ¶
func EstimateBulk ¶
EstimateBulk computes the cost to run each model's tokens n times.
func IsKnown ¶ added in v1.4.0
IsKnown reports whether model has an exact or override entry in the price table (as opposed to falling back to a prefix or family-default guess).
func Lookup ¶
Lookup returns the USD per-1M-token price for a model. Unlisted models fall back to a neutral default so projections never crash.
func SetOverride ¶ added in v1.3.0
SetOverride pins model's price, overriding the built-in list.