Connect the AI stack you already use
Meter LLM, voice, agent, and tool usage through one financial layer. See what each integration captures before you ship.
Three integrations, end to end
What actually changes in your code, and what the ledger gets back.
OpenAI
Wrap your existing client. Every completion is metered with customer and agent attribution.
from metricai import MetricAI
from openai import OpenAI
mai = MetricAI(api_key="mai_...")
client = mai.wrap(OpenAI())
resp = client.chat.completions.create(
model="gpt-4o-mini",
messages=[{"role": "user", "content": "Hello"}],
# attribution
metadata={"customer_id": "cust_123", "agent": "support"},
)Full integration catalogue
Support status is stated honestly - beta means it works and is still hardening.
- Available now
OpenAI
LLM providers
- Connection
- SDK wrap or OpenAI-compatible proxy
- Chat
- Streaming
- Embeddings
- Tools
- Available now
Anthropic
LLM providers
- Connection
- SDK wrap or Anthropic Messages API
- Chat
- Streaming
- Tools
- Available now
Google Gemini
LLM providers
- Connection
- Google Generative AI SDK
- Chat
- Streaming
- Multimodal
- Available now
Grok
LLM providers
- Connection
- xAI OpenAI-compatible API
- Chat
- Streaming
- Available now
Groq
LLM providers
- Connection
- Groq OpenAI-compatible API
- Chat
- Streaming
- Available now
Mistral
LLM providers
- Connection
- Mistral API
- Chat
- Streaming
- Embeddings
- Available now
Vertex AI
LLM providers
- Connection
- Vertex AI / Google Cloud
- Chat
- Streaming
- Multimodal
- Available now
Azure Foundry
LLM providers
- Connection
- Azure OpenAI / AI Foundry
- Chat
- Streaming
- Embeddings
- Available now
Bedrock
LLM providers
- Connection
- AWS Bedrock Runtime
- Chat
- Streaming
- Available now
CrewAI
Agentic frameworks & tools
- Connection
- SDK instrumentation around Crew runs
- Agents
- Tools
- Sessions
- Available now
LangChain
Agentic frameworks & tools
- Connection
- Callbacks / wrappers on LLM & tool calls
- Chains
- Tools
- Streaming
- Available now
LangGraph
Agentic frameworks & tools
- Connection
- Graph node / edge instrumentation
- Agents
- Sessions
- Tools
- Available now
LlamaIndex
Agentic frameworks & tools
- Connection
- Callback handlers on LLM & retrieval
- RAG
- Tools
- Streaming
- Beta
AutoGen
Agentic frameworks & tools
- Connection
- Agent conversation wrappers
- Agents
- Tools
- Sessions
- Available now
Tavily
Agentic frameworks & tools
- Connection
- Tool call metering for search
- Tools
- Cost attribution
- Available now
LiveKit
Voice & realtime
- Connection
- Session metering for realtime agents
- Audio minutes
- Sessions
- Tools
- Available now
Deepgram
Voice & realtime
- Connection
- STT usage events
- Audio minutes
- Streaming
- Available now
ElevenLabs
Voice & realtime
- Connection
- TTS usage events
- Audio minutes
- Characters
- Available now
Sarvam AI
Voice & realtime
- Connection
- Voice / speech API metering
- Audio minutes
- Streaming
- Available now
Custom LLM / OpenAI-compatible
Custom & self-hosted
- Connection
- Normalized usage events via SDK or REST
- Tokens
- Cost
- Attribution
- Available now
Custom tools & internal APIs
Custom & self-hosted
- Connection
- Emit tool-call events with unit + cost
- Tool calls
- Sessions
- Attribution
Your model. Your tools. Same ledger.
Use automatic integrations for supported providers, or send normalized usage events from custom LLMs, self-hosted inference, internal tools, and OpenAI-compatible APIs.
- Available now
Custom LLM / OpenAI-compatible
Meterable units
- input_tokens
- output_tokens
- requests
- cost
Connection: Normalized usage events via SDK or REST
- Available now
Custom tools & internal APIs
Meterable units
- tool_calls
- units
- duration_ms
- cost
Connection: Emit tool-call events with unit + cost
Track a custom tool call
One call, fully attributable and safe to retry.
await mai.track({
event_type: "tool_call",
customer_id: "cust_123",
agent: "research-agent",
tool: "internal_search",
units: 1,
cost_usd: 0.002,
idempotency_key: "evt_7f3a...",
})What a usage event carries
Every event - automatic or custom - normalises to these fields.
- customer_id / workspace - who to bill or attribute
- agent / session - where the spend happened
- model / provider / tool - what was invoked
- units + cost - tokens, seconds, calls, or dollars
- idempotency_key - safe retries, no double billing
- timestamp + latency - when it ran and how long
Don't see your provider?
Tell us what you are building. We prioritize integrations with active production teams.
