Cost attributed signals
Prerequisites
- Have your API key ready.
- [Optional] Configure Customers and Products with external ids. Or programmatically via API endpoints: Create product, Create customer.
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.