---
title: "Append a new pricing row"
method: POST
path: "/api/pricing/{provider}/{model}/{tokenClass}"
tags: ["Pricing"]
---

# Append a new pricing row

`POST /api/pricing/{provider}/{model}/{tokenClass}`

## Path parameters

- `provider` 'claude' | 'claude-managed' | 'codex' | 'pi' | 'opencode' | 'devin' | 'gemini', required
- `model` string, required
- `tokenClass` 'input' | 'cached_input' | 'output' | 'cache_write' | 'cache_write_1h' | 'web_search' | 'runtime_hour' | 'acu', required

## Request body

- object
  - `pricePerMillionUsd` number, required
  - `effectiveFrom` number

## Response `201`

Pricing row inserted

- PricingRow
  - `provider` 'claude' | 'claude-managed' | 'codex' | 'pi' | 'opencode' | 'devin' | 'gemini', required
  - `model` string, required
  - `tokenClass` 'input' | 'cached_input' | 'output' | 'cache_write' | 'cache_write_1h' | 'web_search' | 'runtime_hour' | 'acu', required
  - `effectiveFrom` number, required
  - `pricePerMillionUsd` number, required
  - `createdAt` number, required
  - `lastUpdatedAt` number, required

## Other responses

- `400` — Validation error
- `409` — Duplicate (provider, model, tokenClass, effectiveFrom)

## Changes

- **2026-08-07** `06cac6a7c5bc` — 2 info
  - added the media type `application/json` for the response with the status `400`
  - added the media type `application/json` for the response with the status `409`
- **2026-08-06** `89ca53f117ce` — 2 warning, 2 info
  - added the new `cache_write_1h` enum value to the `tokenClass` response property for the response status `201`
  - added the new `web_search` enum value to the `tokenClass` response property for the response status `201`
  - added the new enum value `cache_write_1h` to the `path` request parameter `tokenClass`
  - added the new enum value `web_search` to the `path` request parameter `tokenClass`

[Change history](https://skmtc.dev/desplega-ai/apis/agent-swarm-api/changes/api/pricing/:provider/:model/:tokenClass/post.md)

---

[API](https://skmtc.dev/desplega-ai/apis/agent-swarm-api.md) · [All operations](https://skmtc.dev/desplega-ai/apis/agent-swarm-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/desplega-ai/agent-swarm-api/revisions/db1079e034dc/schema)
