Skip to main content
POST
Typescript (SDK)

Body Parameters

Response

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

x-api-version
string
default:2.6.0
required

Body

application/json
name
string
required

The name of the feature.

type
enum<string>
required

The type of the feature. 'single_use' features are consumed, like API calls, tokens, or messages. 'continuous_use' features are allocated, like seats, workspaces, or projects. 'credit_system' features are schemas that unify multiple 'single_use' features into a single credit system.

Available options:
boolean,
metered,
credit_system,
ai_credit_system
feature_id
string
required

The ID of the feature to create.

consumable
boolean

Whether this feature is consumable. A consumable feature is one that periodically resets and is consumed rather than allocated (like credits, API requests, etc.). Applicable only for 'metered' features.

combine
enum<string>

How grants of this feature from several plans combine. 'sum' (default) adds them up. 'max' or 'min' keeps only the highest or lowest grant among plan items with no price; priced items always add on top. Metered and credit system features only.

Available options:
sum,
max,
min
display
object

Singular and plural display names for the feature in your user interface.

credit_schema
object[]

A schema that maps metered feature IDs to flat or graduated credit costs. For classic credit systems only โ€” AI credit systems use model_markups instead.

model_markups
object | null

Per-model markup overrides for AI credit systems. Maps model IDs to their markup configuration.

default_markup
number

Default percentage markup for this AI credit system. Used when no model or provider markup applies. Use -100 to make usage free.

Required range: x >= -100
provider_markups
object | null

Per-provider default markup percentages for AI credit systems. Provider keys match the first segment of model_id.

event_names
string[]

Response

200 - application/json

OK

id
string
required

The unique identifier for this feature, used in /check and /track calls.

name
string
required

Human-readable name displayed in the dashboard and billing UI.

type
enum<string>
required

Feature type: 'boolean' for on/off access, 'metered' for usage-tracked features, 'credit_system' for unified credit pools, 'ai_credit_system' for model-based token pricing.

Available options:
boolean,
metered,
credit_system,
ai_credit_system
consumable
boolean
required

For metered features: true if usage resets periodically (API calls, credits), false if allocated persistently (seats, storage).

archived
boolean
required

Whether the feature is archived and hidden from the dashboard.

combine
enum<string>

How grants of this feature from several plans combine: 'sum' adds them up, 'max' / 'min' keep the highest / lowest grant among plan items with no price. Omitted when 'sum'.

Available options:
sum,
max,
min
event_names
string[]

Event names that trigger this feature's balance. Allows multiple features to respond to a single event.

credit_schema
object[]

For classic credit systems: maps metered features to flat or graduated credit costs.

model_markups
object | null

Per-model markup overrides for AI credit systems.

default_markup
number

Default percentage markup for AI credit systems. Use -100 to make usage free.

Required range: x >= -100
provider_markups
object | null

Per-provider default markup percentages for AI credit systems.

display
object

Display names for the feature in billing UI and customer-facing components.

processors
object

Processor mappings for this feature. Present when a Stripe product or meter is set.