Skip to content

Graphorin API reference v0.7.0


Graphorin API reference / @graphorin/pricing / / ModelPrice

Interface: ModelPrice

Defined in: packages/pricing/src/types.ts:17

Per-model pricing entry. All amounts are in USD per token unless the snapshot declares an alternative currency. Reasoning tokens (when supported) follow the same pricing as completion tokens unless the entry declares an explicit reasoningUsdPerToken.

Stable

Properties

PropertyModifierTypeDescriptionDefined in
cachedReadUsdPerToken?readonlynumberOptional cached-read price (Anthropic / OpenAI prompt caching).packages/pricing/src/types.ts:27
cacheWriteUsdPerToken?readonlynumberOptional cache-write (cache-creation) price. Anthropic bills prompt tokens written to the 5-minute cache at 1.25x the input rate; OpenAI does not charge (or report) cache writes, so its entries omit this.packages/pricing/src/types.ts:33
inputUsdPerTokenreadonlynumberPrice per input token, in USD.packages/pricing/src/types.ts:23
modelreadonlystringLower-case model id, e.g. 'claude-3-5-sonnet-20241022'.packages/pricing/src/types.ts:21
notes?readonlystringFree-form notes for tooling / docs.packages/pricing/src/types.ts:39
outputUsdPerTokenreadonlynumberPrice per output token, in USD.packages/pricing/src/types.ts:25
providerreadonlystringLower-case provider id (e.g. 'anthropic', 'openai', 'ollama').packages/pricing/src/types.ts:19
reasoningUsdPerToken?readonlynumberOptional reasoning-token price (OpenAI o1 / Gemini 2 thinking).packages/pricing/src/types.ts:35
region?readonlystringOptional region label (e.g. 'us-east-1').packages/pricing/src/types.ts:37