Skip to main content
POST
/
stores
/
{storeId}
/
products
/
{productId}
/
meters
Create meter
curl --request POST \
  --url https://api.pandabase.io/v2/core/stores/{storeId}/products/{productId}/meters/ \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "eventName": "<string>",
  "unitPrice": 50000000,
  "unitQuantity": 1,
  "includedUnits": 1
}
'
{
  "ok": true,
  "data": {
    "id": "umt_5e1q3npwt0u6s2k8h9j7rzbc",
    "productId": "prd_8h4t6sqzy3x9w5n2k1m0vqbf",
    "eventName": "input_tokens",
    "unitPrice": 300,
    "unitQuantity": 1000000,
    "aggregation": "SUM",
    "settlement": "ARREARS",
    "includedUnits": null,
    "createdAt": "2026-05-20T14:00:00.000Z",
    "updatedAt": "2026-05-20T14:00:00.000Z"
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.pandabase.io/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Bearer token authentication. Pass the secret directly in the Authorization header. Token secrets start with sk_.

Headers

idempotency-key
string
Required string length: 8 - 32

Path Parameters

storeId
string
required
Required string length: 12 - 48
productId
string
required
Required string length: 12 - 48

Body

application/json
eventName
string
required

Name reported on POST /v2/core/.../usage; unique per product.

Required string length: 1 - 64
Pattern: ^[a-zA-Z0-9_.-]+$
unitPrice
integer
required

Cents per unitQuantity units. Zero allowed for free meters.

Required range: 0 <= x <= 100000000
aggregation
required
Available options:
SUM
unitQuantity
integer
default:1

Denominator for unitPrice. E.g. 1_000_000 for '$3 / 1M tokens'.

Required range: 1 <= x <= 1000000000
settlement
Available options:
ARREARS
includedUnits
integer

Units included in base fee before metering kicks in. Only for BASE_PLUS_OVERAGE.

Required range: x >= 0

Response

Default Response

ok
enum<boolean>
required
Available options:
true
data
any
required