Pricing
ALLM turns provider-specific rate cards into deterministic quotes without floating-point rounding.
Units and precision
Rate cards store prices as integer micro-USD per one million tokens. Quotes return exact decimal strings with six fractional digits. Parse total_usd as a decimal value or retain it as a string—never convert money to binary floating point for billing.
input_micro_usdcached_input_micro_usdoutput_micro_usdQuote formula
regular_input = input_tokens - cached_input_tokens
total =
regular_input × input_rate / 1,000,000
+ cached_input_tokens × cached_input_rate / 1,000,000
+ output_tokens × output_rate / 1,000,000Cached input
cached_input_tokens is a subset of input_tokens, not an additional amount. For GPT-5.1, 1,000,000 input tokens of which 800,000 are cached produces 0.350000 USD before output: 200,000 at $1.25/M plus 800,000 at $0.125/M.
Missing pricing
Some image, audio, search, or newly released deployments use dimensions that the token quote endpoint does not yet normalize. Filter with has_pricing=true for token-priced deployments. A request without an applicable rate card returns 422 PRICING_UNAVAILABLE.