Register custom model pricing

Changed on

Register 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.

post/marketplace/providers/models

Request

Request body

Response

Pricing response for custom model pricing

status'Registered' | 'Deleted'

Changes

    • info

      added the non-success response with the status

    • breaking

      request property // was restricted to a list of enum values

    • warning

      added the new cache_read enum value to the // response property for the response status

    • warning

      added the new cache_write enum value to the // response property for the response status

    • warning

      added the new input enum value to the // response property for the response status

    • warning

      added the new output enum value to the // response property for the response status

    • info

      added the new cache_read enum value to the request property //

    • info

      added the new cache_write enum value to the request property //

    • info

      added the new input enum value to the request property //

    • info

      added the new output enum value to the request property //