Skip to main content
POST
Create meter

Authorizations

Authorization
string
header
required

Bearer token authentication used for standard API calls. Format: 'Bearer YOUR_API_KEY'

Body

application/json
name
string
required

Display name of the meter

Example:

"GPT-4 Usage"

rate_type
enum<string>
required

Fee model: 'fixed' (credits per usage unit) or 'percentage' (percentage of provider base cost)

Available options:
fixed,
percentage
Example:

"fixed"

tier_type
enum<string>
required

Unit type for pricing tiers

Available options:
tokens_1m,
characters_1m,
minutes,
requests
Example:

"tokens_1m"

tiers
object[]
required

Pricing tiers (at least one required, must be in ascending start order)

meter_slug
string

Unique slug identifier for the meter. If not provided, one will be auto-generated.

Example:

"gpt4-usage"

Response

Meter created

meter_id
string
required

Unique identifier for the meter

meter_slug
string
required

Slug identifier for the meter used in forward token authentication

name
string
required

Display name of the meter

rate_type
enum<string>
required

Fee model: 'fixed' (credits per usage unit) or 'percentage' (percentage of provider base cost)

Available options:
fixed,
percentage
tiers
object[]
required

Pricing tiers for the meter

created_at
string<date-time>
required

When the meter was created