ai_tokens meter and separate exact rules for each configured token category.
The supported Version One categories are input, cached_input, cache_write, output, and reasoning. Provider catalogue references are retained on the Cost Rule so negotiated overrides remain traceable to their base prices. Unknown provider, model, or token-category combinations enter the Uncosted queue instead of silently becoming zero-cost usage.
parent_transaction_idlinks the cost to an existing or future Feature Event in the same organization.external_customer_idrecords a customer-direct cost that is not linked to a Feature.- Both may be provided; asynchronous processing verifies that they resolve to the same customer.
202 Accepted after Kafka durably acknowledges the message; cost calculation and analytics happen asynchronously.
If cost_event_id is omitted, Nozle generates and returns a version 7 universally unique identifier. Reuse the same identifier and payload when retrying a Cost Event.
Provider wrapper flow
The Node.js and Python OpenAI and Anthropic wrappers can create the parent Feature Event and its detailed Cost Events together. SetcostMeterCode in Node.js or cost_meter_code in Python. The wrapper generates the parent transaction_id before delivery, so child Cost Events may safely arrive before the Feature Event.
Each non-zero category is emitted separately with canonical properties: