Get started
DocumentationConcepts

Price period

Source

One stretch during which a price did not move. The history unit.

Where an observation is a reading, a period is the claim built from readings: this sku cost this much, for this dimension, from here to there.

Fields

From witness.price_period:

FieldMeaning
skuId, dimensionIdThe cell this period belongs to
amountUsdThe price during the period
validFromWhen it started
validToWhen it ended, null while current
firstObservationIdThe reading that opened it
lastObservationIdThe most recent reading confirming it
confirmedWhether a second consistent read has confirmed it
flapWhether the value moved and moved back

validTo IS NULL is the tape

The current price of any cell is its one open period. A partial unique index enforces exactly one open row per (skuId, dimensionId), so the record cannot hold two current prices for one thing. That is a constraint rather than an assumption, because the alternative is a tape that is quietly self- contradictory.

A second constraint requires validTo >= validFrom, so a period cannot run backwards.

Confirmation

confirmed is what separates a reading from a price. A figure seen once is recorded, but a move is published only on the second consistent read. One malformed page, one partial deploy on the provider's side, or one transient parse failure therefore does not enter the log as a price change.

The cost is latency: a real price cut shows up on the second read rather than the first. That is the trade the record makes on purpose, because a log that is occasionally wrong is worth less than one that is slightly late.

flap

Set when a value moved and moved back. Providers do deploy a wrong price and withdraw it, and a record that reported both moves as decisive would be reporting noise as signal.

Reading history

bash
curl "https://vitna.ai/api/v1/skus/gpt-5-pro/history?dimension=input_per_mtok"

History exists only in the live record. A checkout serving the committed snapshot answers with the sku, an empty periods array, and a meta.note saying why, rather than inventing a single period out of the current price.