Register custom model pricing
Changed onRegister custom token pricing for models you host. Every token bucket is priced separately, so submit one entry per bucket you charge for - input, output, cache_read, cache_write - each with its own unit_price_per_mtok. A bucket you leave out has no rate, and usage in it resolves to no price rather than to zero. Entries are versioned: a price change closes the current row and opens a new one, so historic spend 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 instead of holding on to an earlier one. Superseded by POST /v1/marketplace/models, which returns RFC 9457 problem responses on failure.
Request
- Base URLhttps://pricing.baselinehq.cloud
- Auth
- API key in header X-API-Key
- or API key in header Authorization
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Request body
Response
Pricing response for custom model pricing
Changes
- info
added the non-success response with the status
- info
- breaking
request property
//was restricted to a list of enum values - warning
added the new
cache_readenum value to the//response property for the response status - warning
added the new
cache_writeenum value to the//response property for the response status - warning
added the new
inputenum value to the//response property for the response status - warning
added the new
outputenum value to the//response property for the response status - info
added the new
cache_readenum value to the request property// - info
added the new
cache_writeenum value to the request property// - info
added the new
inputenum value to the request property// - info
added the new
outputenum value to the request property//
- breaking