AI usage metering
Meter every AI call in real time across models, agents, and features - including streaming responses - so usage lands in an auditable ledger as it happens.
One SDK for real-time usage attribution, streaming-safe metering, provider routing, and an auditable billing ledger.
Metering runs asynchronously so it does not sit in your request path. See how the layer is built.
One integration layer for metering, billing, routing, and observability across every AI provider.
Built for modern AI infrastructure
One SDK for supported providers. One event API for everything else.
If you are looking for AI usage metering, LLM cost attribution, agent billing, or budget enforcement - this is the infrastructure layer those problems need.
Meter every AI call in real time across models, agents, and features - including streaming responses - so usage lands in an auditable ledger as it happens.
Attribute OpenAI, Anthropic, Gemini, and other LLM spend to customers, workspaces, agents, and sessions instead of reconciling provider invoices weeks later.
Bill autonomous agents by tokens, tool calls, outcomes, or hybrid rules with idempotent invoice runs built for production traffic.
One SDK meters supported LLM providers with a shared unit model and price book, so routing changes do not break cost estimates.
Meter Deepgram, ElevenLabs, LiveKit, and other voice stacks as one conversation - audio minutes, tokens, and tool calls on a single timeline.
Bring your own provider keys, route through MetricAI for metering and governance, and keep credentials encrypted under your control.
Enforce hard and soft budgets per agent, user, or workspace in the request path so runaway agents are stopped before they become an invoice.
Turn metered AI usage into customer invoices with outcome-based or hybrid pricing and UPI-native settlement for Indian collections.
The infrastructure primitives for AI usage don't exist in traditional billing systems.
Long-running agents can burn through monthly budgets in minutes without real-time visibility.
Multi-provider AI stacks make accurate cost attribution across users, agents and workflows difficult.
Traditional billing systems were never designed for token-based, streaming AI workloads.
Everything you need between your application and AI providers.
Measure every request, token, completion and provider usage in real time.
Immutable financial records with complete auditability and reconciliation.
Safe retries with cryptographic keys prevent duplicate billing events.
Integrate once. Work across OpenAI, Anthropic, Gemini, Bedrock and more.
Drop into Python or Node.js in a few lines. No infra to run.
Designed for high-throughput AI systems that demand precision.
Four problems that keep showing up once AI hits production traffic.
Charge customers for AI usage without guesswork.
Read the scenarioStop a runaway agent before it becomes an invoice.
Read the scenarioMeter audio minutes, tokens, and tool calls as one session.
Read the scenarioOne ledger across every model you route to.
Read the scenarioWatch the tour, then poke at a live slice of the dashboard below. Same layout you get on day one.
Rather than ship a fake player, we would rather walk you through it live - or you can start free and see it yourself in five minutes.
| Customer | Calls | Cost | Margin |
|---|---|---|---|
| Northwind AI | 41,230 | $812.40 | 68% |
| Kettle Labs | 18,902 | $1,240.90 | 41% |
| Voxa Support | 9,640 | $508.15 | 55% |
| Finlyt | 4,310 | $96.70 | 74% |
Figures are illustrative sample data, not customer data. Click a row to switch the breakdown.
A single infrastructure layer between your application and every AI provider you use.
Lightweight SDKs for Python and Node.js. Provider-agnostic, streaming-native, and idempotent by default. Meter every token without touching your business logic.
import os
import metricai
from openai import OpenAI
metricai.init(
api_key=os.getenv("METRICAI_API_KEY"),
auto_instrument=True,
default_agent_id="weather-bot",
default_user_id="user_123",
llm_keys={"openai": os.getenv("OPENAI_API_KEY")},
)
client = OpenAI()
resp = client.chat.completions.create(
model="gpt-4o",
messages=[
{
"role": "user",
"content": "What is the current weather in Tokyo?"
}
],
)
print(resp.choices[0].message.content)Works with OpenAI, Gemini, Anthropic, Vertex AI, Bedrock, LiveKit, Deepgram, ElevenLabs, Sarvam AI, and other supported providers through a unified SDK.
A complete billing and metering surface for token-based AI workloads.
One SDK for supported providers. One event API for everything else.
Straight answers for teams evaluating usage metering, cost attribution, and spend controls.
AI usage metering measures every AI call - tokens, audio minutes, tool invocations, and outcomes - in real time so you can attribute cost and bill accurately.
MetricAI attributes OpenAI, Anthropic, Gemini, and other provider spend to customers, agents, workspaces, and sessions at request time, with an append-only ledger for reconciliation.
Yes. Meter autonomous agents and voice sessions that span Deepgram, ElevenLabs, LiveKit, LLMs, and tools as one billable conversation or workflow.
Bring Your Own Key means you keep provider credentials while MetricAI sits in the request path to meter usage, enforce budgets, and optionally apply billing markups.
Soft alerts and hard caps are enforced in the proxy per agent, user, or workspace, so runaway spend is blocked before the upstream provider charges you.
Yes. Export attributed usage into customer invoices, charge by usage or outcome, and settle natively in INR over UPI through Razorpay.
Install the SDK, point it at your provider, and watch usage land in the ledger. The same integration carries you from prototype to production.
No credit card required · Cancel or downgrade at any time