Sometimes you just want to set usage totals directly instead of adding separate usage events.You can use the set usage endpoint which will automatically calculate the usage event needed to get to your desired total.
import { PriceOS } from "priceos";import type { MyFeatures } from "./priceos.types";const priceos = new PriceOS<MyFeatures>(process.env.PRICEOS_API_KEY!);const result = await priceos.usage.set({ customerId: "customer_123", featureKey: "api_calls", used: 1200, eventKey: "set_usage_customer_123_api_calls_2026_02_18",});