Publish model prices
Register your own token rates for models you host, so CostGraph can price calls it has no public rate for. Every token bucket is priced separately, so publish one price per bucket you charge for - input, output, cache_read, cache_write - each with its own unit_price_per_mtok. A bucket you do not publish has no rate, and usage in it resolves to no price rather than to zero. token_bucket identifies the price alongside the model, host and region, so it cannot be patched later: delete the price and publish a new one to move a rate to another bucket. Entries are versioned: a price change closes the current row and opens a new one, so spend already recorded keeps the rate it was billed at. The returned id is what you attach with the costgraph.ai/pricing-id.model label or tag. Each version carries its own id, so read the live entry back after a price change.
Request body
Response
The published prices
Changes
Changed in 2 of the 30 revisions of this API.145
- ▲
request property
//was restricted to a list of enum valuesrequest-property-became-enum
- ●
added the new
cache_readenum value to the//response property for the response statusresponse-property-enum-value-added
- ●
added the new
cache_writeenum value to the//response property for the response statusresponse-property-enum-value-added
- ●
added the new
inputenum value to the//response property for the response statusresponse-property-enum-value-added
- ●
added the new
outputenum value to the//response property for the response statusresponse-property-enum-value-added
- ○
added the new
cache_readenum value to the request property//request-property-enum-value-added
- ○
added the new
cache_writeenum value to the request property//request-property-enum-value-added
- ○
added the new
inputenum value to the request property//request-property-enum-value-added
- ○
added the new
outputenum value to the request property//request-property-enum-value-added
- ▲
- ○
endpoint added
endpoint-added
This revision also has 24 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog
- ○