Documentation
Metering and usage billing at the event level, built for the engineers behind agentic workflows.
Start here
Paygentic meters and bills agent activity. Your workflows send usage events, and deduplication, aggregation, and billing-period arithmetic stay on our side. Customers receive invoices that match what actually ran, along with a live view of their spend.
The pages ahead run from a first integration, measured in minutes, up to attribution patterns for orchestrated multi-agent systems.
How the pieces fit
An integration has three parts:
- Send events through the Paygentic SDK or the REST API. Any agent action you intend to charge for arrives as an event.
- Define meters for the totals you want to track. Point a meter at one or more event types and name the quantity it should count.
- Attach pricing to those meters. From there Paygentic generates invoices, works out overage, and passes the result to Stripe.
Where to begin
The core concepts
Events
One billable action is one event: a model call, a tool run, a document handled. Each event carries an idempotency key, a customer ID, and dimension fields your meters can filter on.
Meters
Meters turn a stream of events into a running count or sum for the billing period. You choose the event types that feed each meter and the fields to total. Several meters can read the same stream and aggregate it differently.
Multi-agent attribution
An orchestrator that spawns children leaves a trail Paygentic can follow. A trace_id on every event lets cost roll back through the call graph, so per-workflow reporting stays accurate even when agents share one model provider account.
Authentication
Requests authenticate with a bearer token. Find your key in the dashboard under Settings > API Keys and send it in the Authorization header:
Authorization: Bearer pyg_live_xxxxxxxxxxxxxxxxxxxxxx
Test-mode keys use the pyg_test_ prefix. Events sent with them are excluded from invoice totals.
Environments
| Environment | Base URL | Key prefix | Invoice impact |
|---|---|---|---|
| Live | https://api.getpaygentic.org/v1 |
pyg_live_ |
Yes |
| Test | https://api.getpaygentic.org/v1 |
pyg_test_ |
No |
Rate limits
By default the ingestion endpoint takes 1,000 events per second per account. Agent workloads tend to arrive in bursts, so batch requests of up to 500 events are the recommended path. Higher limits can be arranged through support.
Support
Anything this guide does not answer: write to [email protected] or start a thread in the Discord developer community.