marketplace

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.

post/v1/marketplace/models

Request body

Response

The published prices

Changes

Changed in 2 of the 30 revisions of this API.145

  • 57ac66a4ba4d144See the full diff
    • ▲

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

      request-property-became-enum

    • ●

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

      response-property-enum-value-added

    • ●

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

      response-property-enum-value-added

    • ●

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

      response-property-enum-value-added

    • ●

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

      response-property-enum-value-added

    • ○

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

      request-property-enum-value-added

    • ○

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

      request-property-enum-value-added

    • ○

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

      request-property-enum-value-added

    • ○

      added the new output enum 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