Cost attributed signals
Prerequisites
- A Paid API key.
- The Paid SDK installed in the service that emits signals and makes AI provider calls.
- Cost traces working for the AI call you want to attribute.
- Optional: customers and products with stable external IDs for attribution. You can also create them through the Products API and Customers API.
Track the AI cost behind each signal
Knowing the cost behind each signal helps you understand your margins. This combines the previous two steps (signals and cost traces) with a dedicated API call that links an agent action to the AI costs captured in the same tracing context.
The one requirement: send the signal from inside a paid_tracing context where your AI calls run.
Python
Consuming multiple credits and tracking users
Cost-attributed signals support the same data fields as regular signals. Pass quantity to consume more than one credit per signal, and include external_user_id to route credit spend to a specific user’s seat balance:
See First signals for details on dynamic credit consumption and user-level tracking for per-user attribution.