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
| Property | Modifier | Type | Description | Defined in |
|---|---|---|---|---|
cachedReadUsdPerToken? | readonly | number | Optional cached-read price (Anthropic / OpenAI prompt caching). | packages/pricing/src/types.ts:27 |
cacheWriteUsdPerToken? | readonly | number | Optional 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 |
inputUsdPerToken | readonly | number | Price per input token, in USD. | packages/pricing/src/types.ts:23 |
model | readonly | string | Lower-case model id, e.g. 'claude-3-5-sonnet-20241022'. | packages/pricing/src/types.ts:21 |
notes? | readonly | string | Free-form notes for tooling / docs. | packages/pricing/src/types.ts:39 |
outputUsdPerToken | readonly | number | Price per output token, in USD. | packages/pricing/src/types.ts:25 |
provider | readonly | string | Lower-case provider id (e.g. 'anthropic', 'openai', 'ollama'). | packages/pricing/src/types.ts:19 |
reasoningUsdPerToken? | readonly | number | Optional reasoning-token price (OpenAI o1 / Gemini 2 thinking). | packages/pricing/src/types.ts:35 |
region? | readonly | string | Optional region label (e.g. 'us-east-1'). | packages/pricing/src/types.ts:37 |