Skip to content

Graphorin API reference v0.1.0


Graphorin API reference / @graphorin/pricing / / lookupPrice

Function: lookupPrice()

ts
function lookupPrice(args, snapshot?): 
  | LookupPriceResult
  | null;

Defined in: pricing/src/lookup.ts:43

Resolve a per-token price for the (provider, model) pair. Returns null when the snapshot does not contain an entry for the model.

The function emits one WARN per process per unknown (provider, model) pair so cost dashboards surface drift without spamming the log.

Parameters

ParameterTypeDefault value
argsLookupPriceArgsundefined
snapshotPricingSnapshotBUNDLED_SNAPSHOT

Returns

| LookupPriceResult | null

Stable