---
title: "Create LLM cost override"
method: POST
path: "/openmeter/llm-cost/overrides"
tags: ["OpenMeter LLM Cost"]
---

# Create LLM cost override

`POST /openmeter/llm-cost/overrides`

Create a per-namespace price override.

## Request body

- LLMCostOverrideCreate — Input for creating a per-namespace price override. Unique per provider, model and currency. If an override already exists for the given provider, model and currency, it will be updated. If an override does not exist, it will be created.
  - `provider` string, required — Provider/vendor of the model.
  - `model_id` string, required — Canonical model identifier.
  - `model_name` string — Human-readable model name.
  - `pricing` LLMCostModelPricing, required — Token pricing for an LLM model, denominated per token.
    - `input_per_token` string, required — Numeric represents an arbitrary precision number.
    - `output_per_token` string, required — Numeric represents an arbitrary precision number.
    - `cache_read_per_token` string — Numeric represents an arbitrary precision number.
    - `cache_write_per_token` string — Numeric represents an arbitrary precision number.
    - `reasoning_per_token` string — Numeric represents an arbitrary precision number.
  - `currency` string, required — Three-letter [ISO4217](https://www.iso.org/iso-4217-currency-codes.html) currency code. Custom three-letter currency codes are also supported for convenience.
  - `effective_from` string, date-time, required — [RFC3339](https://tools.ietf.org/html/rfc3339) formatted date-time string in UTC.
  - `effective_to` string, date-time — [RFC3339](https://tools.ietf.org/html/rfc3339) formatted date-time string in UTC.

## Response `201`

Price created response.

- LLMCostPrice — An LLM cost price record, representing the cost per token for a specific model from a specific provider.
  - `id` string, required — ULID (Universally Unique Lexicographically Sortable Identifier).
  - `provider` LLMCostProvider, required — LLM Provider
    - `id` string, required — Identifier of the provider, e.g., "openai", "anthropic".
    - `name` string, required — Name of the provider, e.g., "OpenAI", "Anthropic".
  - `model` LLMCostModel, required — LLM Model
    - `id` string, required — Identifier of the model, e.g., "gpt-4", "claude-3-5-sonnet".
    - `name` string, required — Name of the model, e.g., "GPT-4", "Claude 3.5 Sonnet".
  - `pricing` LLMCostModelPricing, required — Token pricing for an LLM model, denominated per token.
    - `input_per_token` string, required — Numeric represents an arbitrary precision number.
    - `output_per_token` string, required — Numeric represents an arbitrary precision number.
    - `cache_read_per_token` string — Numeric represents an arbitrary precision number.
    - `cache_write_per_token` string — Numeric represents an arbitrary precision number.
    - `reasoning_per_token` string — Numeric represents an arbitrary precision number.
  - `currency` string, required — Three-letter [ISO4217](https://www.iso.org/iso-4217-currency-codes.html) currency code. Custom three-letter currency codes are also supported for convenience.
  - `source` 'manual' | 'system', required — Identifies where an LLM cost price came from.
  - `effective_from` string, date-time, required — [RFC3339](https://tools.ietf.org/html/rfc3339) formatted date-time string in UTC.
  - `effective_to` string, date-time — [RFC3339](https://tools.ietf.org/html/rfc3339) formatted date-time string in UTC.
  - `created_at` string, date-time, required — [RFC3339](https://tools.ietf.org/html/rfc3339) formatted date-time string in UTC.
  - `updated_at` string, date-time, required — [RFC3339](https://tools.ietf.org/html/rfc3339) formatted date-time string in UTC.

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `403` — Forbidden

---

[API](https://skmtc.net/openmeterio/apis/openmeter-api.md) · [All operations](https://skmtc.net/openmeterio/apis/openmeter-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/openmeterio/openmeter-api/revisions/eabb28bd0633/schema)
