---
title: "Set Pricing"
method: POST
path: "/v1/pricing"
tags: ["pricing"]
---

# Set Pricing

`POST /v1/pricing`

Set or update pricing for a model.

Rejects an alias: pricing, budgets, and usage all key on the resolved
target, so a row stored under an alias name would never be read.

## Request body

- SetPricingRequest — Create a versioned per-model price, with optional cache and context tiers.
  - `cache_read_price_per_million` number, nullable — Price per 1M cached-input tokens
  - `cache_write_1h_price_per_million` number, nullable — Price per 1M Anthropic 1-hour cache-write tokens
  - `cache_write_price_per_million` number, nullable — Price per 1M cache-write (creation) tokens
  - `effective_at` string, date-time, nullable — ISO 8601 datetime from which this price applies. Defaults to now if omitted.
  - `input_price_per_million` number, required — Price per 1M input tokens
  - `model_key` string, required — Model identifier in format 'provider:model'
  - `output_price_per_million` number, required — Price per 1M output tokens
  - `pricing_tiers` PricingTier[], nullable — Whole-request context thresholds. Fields omitted by a tier inherit the base rate.
    - `cache_read_price_per_million` number, nullable
    - `cache_write_1h_price_per_million` number, nullable
    - `cache_write_price_per_million` number, nullable
    - `input_price_per_million` number, nullable
    - `min_input_tokens` integer, required
    - `output_price_per_million` number, nullable

## Response `200`

Successful Response

- PricingResponse — Response model for model pricing.
  - `cache_read_price_per_million` number, nullable, required
  - `cache_write_1h_price_per_million` number, nullable, required
  - `cache_write_price_per_million` number, nullable, required
  - `created_at` string, required
  - `effective_at` string, required
  - `input_price_per_million` number, required
  - `model_key` string, required
  - `output_price_per_million` number, required
  - `pricing_tiers` PricingTier[], required
    - `cache_read_price_per_million` number, nullable
    - `cache_write_1h_price_per_million` number, nullable
    - `cache_write_price_per_million` number, nullable
    - `input_price_per_million` number, nullable
    - `min_input_tokens` integer, required
    - `output_price_per_million` number, nullable
  - `updated_at` string, required

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/mozilla-ai/apis/otari.md) · [All operations](https://skmtc.net/mozilla-ai/apis/otari/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/mozilla-ai/otari/revisions/9efeac9dd037/schema)
