ModelPricing
@forge/monorepo / backend/src / ModelPricing
Type Alias: ModelPricing
ModelPricing =
object
Defined in: backend/src/models/index.ts:76
Prices are per million tokens, in minor currency units, to avoid float drift.
Properties
cacheReadPerMillion?
readonlyoptionalcacheReadPerMillion?:number
Defined in: backend/src/models/index.ts:80
cacheWritePerMillion?
readonlyoptionalcacheWritePerMillion?:number
Defined in: backend/src/models/index.ts:81
currency
readonlycurrency:string
Defined in: backend/src/models/index.ts:77
inputPerMillion
readonlyinputPerMillion:number
Defined in: backend/src/models/index.ts:78
nonTextInput?
readonlyoptionalnonTextInput?:"in-input-tokens"|"per-unit"
Defined in: backend/src/models/index.ts:96
How this provider charges for non-text input — REQ-036 (#185), AC-4.
The field exists because getting it wrong is a wrong bill in either direction, and the two conventions are indistinguishable from the token counts alone:
"in-input-tokens"(the default, and what OpenAI does): an image is converted to input tokens by the provider and already counted ininputTokens. Adding a per-image charge on top double-bills."per-unit": images and audio are billed separately, per image or per second, in addition to the text tokens. Not adding the charge under-bills, silently, and the shortfall scales with usage.
Defaulting to "in-input-tokens" is the safe direction for the model catalogue we ship, and it means every
existing pricing record keeps costing exactly what it did.
outputPerMillion
readonlyoutputPerMillion:number
Defined in: backend/src/models/index.ts:79
perAudioSecondMinorUnits?
readonlyoptionalperAudioSecondMinorUnits?:number
Defined in: backend/src/models/index.ts:100
Minor units per second of audio input. Only consulted when nonTextInput is "per-unit".
perImageMinorUnits?
readonlyoptionalperImageMinorUnits?:number
Defined in: backend/src/models/index.ts:98
Minor units per image sent. Only consulted when nonTextInput is "per-unit".