Event-level sync
Metronome ingests raw usage events and lets you define billable metrics on top of them, filtering and grouping by event properties. That design fits gateway data well: PALM SOUQ sends one event per request, or per tenant per minute if you prefer lower volume, with properties for model, provider, feature, input tokens, output tokens, cached tokens and cost.
Each event carries a transaction_id derived from the PALM SOUQ request id, which Metronome uses to de-duplicate. If an ingest call is retried after a timeout, the customer is not charged twice.
Designing billable metrics
With properties on every event, pricing changes become metric changes in Metronome rather than code changes in your product. You can price cached tokens differently from uncached ones, charge a premium for a frontier model while discounting a small one, or group usage by feature so customers see an itemised invoice.
PALM SOUQ keeps the property names stable and documented, so a billable metric written today keeps working after the gateway adds new providers. New models arrive as new values of the model property, not as new fields.
Commits, credits and governance working together
Metronome manages prepaid commitments and credits. PALM SOUQ manages what happens in the request path when a customer approaches their limits. The two connect through webhooks: when Metronome reports a balance threshold, PALM SOUQ can switch the tenant's quota policy, for example from full access to a fallback model, without a deploy.
The reverse also works. When PALM SOUQ trips a soft cap for a tenant it can post an event to Metronome so account teams see the warning next to the contract.
Rolling it out safely
Start by sending events for a few internal tenants and build your billable metrics in Metronome against them. Because every event carries the same property names, you can try several pricing designs on the same stream, such as per token, per dollar of cost with markup, or per feature, and compare the draft invoices side by side.
Choose per-request events when you want line-item detail on invoices, and per-minute aggregation when event volume matters more than granularity. You can change the granularity later without changing your metrics.
Before launch, agree with finance which properties are contractual. Property names PALM SOUQ sends are stable, but your billable metrics decide what customers pay, so they deserve the same review as a price change. Keep a test customer in Metronome that receives a copy of production events for one internal tenant, and check its draft invoice whenever a metric changes.