---
title: "Update feature"
method: PATCH
path: "/openmeter/features/{featureId}"
tags: ["OpenMeter Features"]
---

# Update feature

`PATCH /openmeter/features/{featureId}`

Update a feature by id. Currently only the unit_cost field can be updated.

## Path parameters

- `featureId` string, required — ULID (Universally Unique Lexicographically Sortable Identifier).

## Request body

- UpdateFeatureRequest — Request body for updating a feature. Currently only the unit_cost field can be updated.
  - `unit_cost` union — Per-unit cost configuration for a feature. Either a fixed manual amount or a dynamic LLM cost lookup.
    - object — A fixed per-unit cost amount.
      - `type` 'manual', required — The type discriminator for manual unit cost.
      - `amount` string, required — Numeric represents an arbitrary precision number.
    - object — LLM cost lookup configuration. Each dimension (provider, model, token type) can be specified as either a static value or a meter group-by property name (mutually exclusive).
      - `type` 'llm', required — The type discriminator for LLM unit cost.
      - `provider_property` string — Meter group-by property that holds the LLM provider. Use this when the meter has a group-by dimension for provider. Mutually exclusive with `provider`.
      - `provider` string — Static LLM provider value (e.g., "openai", "anthropic"). Use this when the feature tracks a single provider. Mutually exclusive with `provider_property`.
      - `model_property` string — Meter group-by property that holds the model ID. Use this when the meter has a group-by dimension for model. Mutually exclusive with `model`.
      - `model` string — Static model ID value (e.g., "gpt-4", "claude-3-5-sonnet"). Use this when the feature tracks a single model. Mutually exclusive with `model_property`.
      - `token_type_property` string — Meter group-by property that holds the token type. Use this when the meter has a group-by dimension for token type. Mutually exclusive with `token_type`.
      - `token_type` 'input' | 'output' | 'cache_read' | 'cache_write' | 'reasoning' | 'request' | 'response' — Token type for LLM cost lookup.
      - `pricing` BillingFeatureLLMUnitCostPricing — Resolved per-token pricing from the LLM cost database.
        - `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.
        - `reasoning_per_token` string — Numeric represents an arbitrary precision number.
        - `cache_write_per_token` string — Numeric represents an arbitrary precision number.

## Response `200`

Feature updated response.

- Feature — A capability or billable dimension offered by a provider.
  - `id` string, required — ULID (Universally Unique Lexicographically Sortable Identifier).
  - `name` string, required — Display name of the resource. Between 1 and 256 characters.
  - `description` string — Optional description of the resource. Maximum 1024 characters.
  - `labels` Labels — Labels store metadata of an entity that can be used for filtering an entity list or for searching across entity types. Keys must be of length 1-63 characters, and cannot start with "kong", "konnect", "mesh", "kic", or "_".
  - `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.
  - `deleted_at` string, date-time — [RFC3339](https://tools.ietf.org/html/rfc3339) formatted date-time string in UTC.
  - `key` string, required — A key is a unique string that is used to identify a resource.
  - `meter` FeatureMeterReference — Reference to a meter associated with a feature.
    - `id` string, required — ULID (Universally Unique Lexicographically Sortable Identifier).
    - `filters` object — Filters to apply to the dimensions of the meter.
  - `unit_cost` union — Per-unit cost configuration for a feature. Either a fixed manual amount or a dynamic LLM cost lookup.
    - object — A fixed per-unit cost amount.
      - `type` 'manual', required — The type discriminator for manual unit cost.
      - `amount` string, required — Numeric represents an arbitrary precision number.
    - object — LLM cost lookup configuration. Each dimension (provider, model, token type) can be specified as either a static value or a meter group-by property name (mutually exclusive).
      - `type` 'llm', required — The type discriminator for LLM unit cost.
      - `provider_property` string — Meter group-by property that holds the LLM provider. Use this when the meter has a group-by dimension for provider. Mutually exclusive with `provider`.
      - `provider` string — Static LLM provider value (e.g., "openai", "anthropic"). Use this when the feature tracks a single provider. Mutually exclusive with `provider_property`.
      - `model_property` string — Meter group-by property that holds the model ID. Use this when the meter has a group-by dimension for model. Mutually exclusive with `model`.
      - `model` string — Static model ID value (e.g., "gpt-4", "claude-3-5-sonnet"). Use this when the feature tracks a single model. Mutually exclusive with `model_property`.
      - `token_type_property` string — Meter group-by property that holds the token type. Use this when the meter has a group-by dimension for token type. Mutually exclusive with `token_type`.
      - `token_type` 'input' | 'output' | 'cache_read' | 'cache_write' | 'reasoning' | 'request' | 'response' — Token type for LLM cost lookup.
      - `pricing` BillingFeatureLLMUnitCostPricing — Resolved per-token pricing from the LLM cost database.
        - `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.
        - `reasoning_per_token` string — Numeric represents an arbitrary precision number.
        - `cache_write_per_token` string — Numeric represents an arbitrary precision number.

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `403` — Forbidden
- `404` — Not Found

---

[API](https://skmtc.net/openmeterio/apis/openmeter-and-konnect-metering-billing-api.md) · [All operations](https://skmtc.net/openmeterio/apis/openmeter-and-konnect-metering-billing-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/openmeterio/openmeter-and-konnect-metering-billing-api/versions/9bca44e2d61d/schema)
