API reference

API reference · Public

Price and latency history for one model

GET/api/planet/historyNo key

Every observation of the model's published price, and its measured latency per UTC day over the last 30 completed days, with the minimum sample rule applied. Limited to 60 reads a minute per client address and cacheable at the edge for ten minutes.

Parameters

Path and query parameters
FieldTypeWhat it is
id (query)requiredstringA catalog model id. At most 200 characters.

Answer 200

The two series.

Fields of the 200 answer
FieldTypeWhat it is
modelrequiredstring
pricerequiredobject
price.unit"USD per 1M tokens"
price.observationsarray of objectOldest first. A row is written only when one of the four published rates changed, so a steady price is one row. The first is the first time this deployment saw the model priced; nothing before it is backfilled.
price.observations[].atstring
price.observations[].promptPer1Mnumber or nullUSD per 1M tokens; null where unpublished.
price.observations[].completionPer1Mnumber or nullUSD per 1M tokens; null where unpublished.
price.observations[].cacheReadPer1Mnumber or nullUSD per 1M tokens; null where unpublished.
price.observations[].cacheWritePer1Mnumber or nullUSD per 1M tokens; null where unpublished.
latencyrequiredobject
latency.daysintegerThe window, 30 completed UTC days.
latency.minSamplesintegerSamples a day needs before any figure is given (5).
latency.seriesarray of objectOne entry per UTC day, oldest first, ending yesterday. Samples are organic requests that reached an upstream (a 4xx or a caller hanging up is not a sample, a 5xx is a failed one) and the scheduled latency probe.
latency.series[].daystring
latency.series[].samplesinteger
latency.series[].enoughbooleanFalse below minSamples; every figure is then null.
latency.series[].successRatenumber or null0 to 1.
latency.series[].ttftP50Msinteger or nullMedian time to first token over successful samples.
latency.series[].totalP50Msinteger or nullMedian time to the whole answer over successful samples.

Errors

  • 400OpenAI shaped error.
  • 404OpenAI shaped error.
  • 429OpenAI shaped error.

Every error answers in one shape, with its type, code and the field it names. The whole list is in the docs' Errors section.

Antimatter