OpenMeter Entitlements

Get customer entitlement value by feature key

Changed on

Get the customer's entitlement value for a feature at a point in time. Without an active entitlement, the result denies access and omits the type.

get/openmeter/customers/{customerId}/entitlement-access/features/{featureKey}/value

Request

  • Base URL: http://localhost:8888/api/v3
  • URL: http://localhost:8888/api/v3/openmeter/customers/{customerId}/entitlement-access/features/{featureKey}/value
  • Auth: none declared

Path parameters

customerIdstring required

ULID (Universally Unique Lexicographically Sortable Identifier).

Example:01G65Z755AFWAKHE12NY0CQ9FH
featureKeystring required

A key is a unique string that is used to identify a resource.

Example:resource_key

Query parameters

expandBillingEntitlementAccessExpand[]

Expand computed fields.

Supported values are:

  • value: Expand the balance details of a metered entitlement; it sets the value field.
atstring date-time

RFC3339 formatted date-time string in UTC.

Example:2023-01-01T01:01:01.001Z

The point in time to evaluate the entitlement at. Defaults to the current time.

Response

EntitlementFeatureValueResult response.

feature_keystring required

A key is a unique string that is used to identify a resource.

has_accessboolean required

Whether the customer has access to the feature. Always true for boolean and static entitlements. Depends on balance for metered entitlements.

configstring

Only available for static entitlements. Config is the JSON parsable configuration of the entitlement. Useful to describe per customer configuration.

type'metered' | 'static' | 'boolean'

The type of the entitlement.

Example response

{
  "feature_key": "resource_key",
  "has_access": true,
  "config": "{ \"availableModels\": [\"gpt-5\", \"gpt-4o\"] }",
  "value": {
    "balance": "100",
    "usage": "50",
    "overage": "0",
    "total_available_grant_amount": "100",
    "grant_balances": {
      "additional_property": "1"
    }
  }
}

Changes