---
title: "Publish model prices"
method: POST
path: "/v1/marketplace/models"
tags: ["marketplace"]
---

# Publish model prices

`POST /v1/marketplace/models`

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

- ModelPricesRequest
  - `entries` ModelPrice[], required
    - `context_limit` integer
    - `currency` string
    - `effective_from` string
    - `effective_to` string
    - `fetched_at` string
    - `host` string
    - `id` string
    - `modalities_input` string[]
    - `modalities_output` string[]
    - `model` string
    - `model_id` string
    - `open_weights` boolean
    - `output_limit` integer
    - `provider` string
    - `publisher` string
    - `raw_pricing_data` DatatypesJSON
    - `reasoning` boolean
    - `region` string
    - `sku_price_id` string
    - `source` string
    - `source_url` string
    - `structured_output` boolean
    - `tags` DatatypesJSON
    - `token_bucket` 'input' | 'output' | 'cache_read' | 'cache_write'
    - `tool_call` boolean
    - `unit_price_per_mtok` number

## Response `201`

The published prices

- PublishedModelPrices
  - `data` ModelPrice[]
    - `context_limit` integer
    - `currency` string
    - `effective_from` string
    - `effective_to` string
    - `fetched_at` string
    - `host` string
    - `id` string
    - `modalities_input` string[]
    - `modalities_output` string[]
    - `model` string
    - `model_id` string
    - `open_weights` boolean
    - `output_limit` integer
    - `provider` string
    - `publisher` string
    - `raw_pricing_data` DatatypesJSON
    - `reasoning` boolean
    - `region` string
    - `sku_price_id` string
    - `source` string
    - `source_url` string
    - `structured_output` boolean
    - `tags` DatatypesJSON
    - `token_bucket` 'input' | 'output' | 'cache_read' | 'cache_write'
    - `tool_call` boolean
    - `unit_price_per_mtok` number

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `403` — Forbidden
- `422` — Unprocessable Entity
- `500` — Internal Server Error

## Changes

- **2026-09-11** `57ac66a4ba4d` — 1 breaking, 4 warning, 4 info
  - request property `entries/items/token_bucket` was restricted to a list of enum values
  - added the new `cache_read` enum value to the `data/items/token_bucket` response property for the response status `201`
  - added the new `cache_write` enum value to the `data/items/token_bucket` response property for the response status `201`
  - added the new `input` enum value to the `data/items/token_bucket` response property for the response status `201`
  - …5 more
- **2026-09-03** `2b7d1ae74be1` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/baselinehq/apis/costgraph-pricing-api/changes/v1/marketplace/models/post.md)

---

[API](https://skmtc.dev/baselinehq/apis/costgraph-pricing-api.md) · [All operations](https://skmtc.dev/baselinehq/apis/costgraph-pricing-api/llms.txt) · [OpenAPI document](https://skmtc.dev/baselinehq/apis/costgraph-pricing-api/revisions/8cb58cf63915?raw)
