Automatic Tracking
Automatic tracking simplifies your integration by intercepting calls to LLM providers. You don’t have to manually extract token counts or call sendUsage() for each API request.
Scenario: You’re building a chatbot and making dozens of OpenAI API calls. Manually extracting usage data and calling the Paygent tracking API for each one is tedious and error-prone. You just want the tracking to happen automatically.
Solution: Use Paygent’s automatic wrappers or interceptors.
Python
Node.js
Go
Automatic tracking uses monkeypatching to intercept calls to LLM providers. This means you don’t have to change how you call the LLM, other than adding three optional tracking parameters.
Call paygent_sdk.init() once. Then, simply pass tracking IDs directly into your standard model calls.
