modelPricing

settings.json型object記述場所管理者設定のみ

定価の代わりに、組織が支払うレートで支出を報告する。組織が契約レートを持つ場合に設定し、開発者に表示される金額を請求額と一致させる。Claude Code は /usage、ステータスライン、Agent SDK の total_cost_usd、--max-budget-usd の上限、OpenTelemetry のコストメトリクスとイベントにこのレートを適用する。レートはユーザーが提供するものであり、Claude Code が契約書や Claude Console から読み取ることはない。Claude Code v2.1.242 以降が必要。

既定値未設定であるため、ホストアプリケーションがテーブルを提供しない限り、Claude Code は定価を報告する。

記述例

{
  "modelPricing": {
    "multiplier": 0.85,
    "overrides": {
      "claude-sonnet-4-6": {
        "input": 2.4,
        "output": 12,
        "cacheRead": 0.24,
        "cacheWrite": 3
      }
    }
  }
}

使い方・用途

  • 組織が Anthropic と契約割引レートを結んでいる場合に、開発者が /usage やステータスラインで見る金額を定価ではなく実際の請求額に一致させる。
  • OpenTelemetry のコストメトリクスや Agent SDK の total_cost_usd などテレメトリ上のコスト数値を、組織が実際に支払うレートで集計・レポートしたい。
  • 内部チャージバックのため原価にマークアップしたレートを multiplier と overrides で設定し、開発者に見せる金額を組織の課題単位に合わせる。
英語原文

Report spend at the rates your organization pays instead of list price. Set it when your organization has contracted rates, so the dollar figures developers see match your bill. Claude Code applies the rates in /usage, the status line, the Agent SDK's total_cost_usd, the --max-budget-usd limit, and the OpenTelemetry cost metric and events. You supply the rates: Claude Code doesn't read them from your contract or the Claude Console. Requires Claude Code v2.1.242 or later.

関連する変更履歴

v2.1.271(1件)

modelPricing 管理設定と Claude アプリゲートウェイの pricing ブロックで、1 を超え最大 10 までの multiplier に対応した。上乗せされた内部チャージバック料金に使える。
英語原文を表示
Added support for a multiplier above 1, up to 10, in the modelPricing managed setting and the Claude apps gateway pricing block, for marked-up internal chargeback rates

変更後

組織内で割増料金を設定して利用部門に請求する場合でも、/usage やステータスラインなどに表示されるコストの数値を実際の内訳金額に合わせられる。これまでリスト価格ベースの表示しかできず、実コストと合わない場面で正確なチャージバックが可能になる。

v2.1.243(1件)

modelPricing 管理設定を追加した。組織の契約モデル別レートと割引乗数が /cost、ステータスライン、テレメトリのコスト計算にリスト価格の代わりに適用される。
英語原文を表示
Added modelPricing managed setting so an organization's contracted per-model rates and discount multiplier are used for /cost, the status line, and telemetry cost figures instead of list price

変更後

組織の契約レートや割引率を反映した金額でコスト表示やテレメトリを確認できるようになる。