Skip to content

projectCost

projectCost(tokens, entry): Cost

Defined in: packages/gateway/src/cost.ts:74

The most one call can cost: every input token at the highest input rate in the tier the input selects (the uncached rate or either cache-write rate, whichever costs most), plus maxOutputTokens at the output rate. Without an entry, the result is { total: null, basis: "unknown" }.

ProjectedTokens

CatalogEntry | undefined

Cost

These docs are licensedCC BY 4.0. Thelicence text is in the repository.