Model Meter
Model Meter captures AI usage via OpenTelemetry without sitting in the critical path of your requests. Two-line SDK integration.
Add the npm package to your app — it instruments the Vercel AI SDK via OpenTelemetry. Full setup guide: https://github.com/jayanti-prajapati/model-meter/blob/main/docs/GETTING-STARTED.md
Call init() once at application startup — before any AI calls are made. This is the only required code change.
If you use the Vercel AI SDK, add the OTel span processor once. After that, every generateText(), streamText(), generateObject(), and embed() call is captured automatically — no per-call changes needed.
Use the @model-meter/sdk wrapper instead of importing from 'ai' to add an operation label to each call. Operations appear as a breakdown dimension in the dashboard — useful for attributing costs to specific features.
The SDK captures usage from any provider supported by the Vercel AI SDK via OpenTelemetry. Verified providers with full pricing records: OpenAI (GPT-4o, GPT-4o-mini, GPT-4 Turbo, GPT-3.5), Anthropic (Claude 3.5 Sonnet, Claude 3.5 Haiku, Claude 3 Opus), Google Gemini (1.5 Pro, 1.5 Flash, 2.0 Flash), Mistral, Groq, and Cohere.
Model Meter does not sit in the critical path of your AI calls. The SDK instruments calls via OpenTelemetry and sends telemetry asynchronously. Your AI requests go directly to the provider. There is no latency overhead, no single point of failure, and no prompts or completions are collected by default.
Launch offer