Model Meter — AI cost tracking

Model Meter

Integrations and provider compatibility

Model Meter tracks AI spending across providers via three collection paths: TypeScript SDK, gateway adapters, and billing imports.

Collection methods

Model Meter supports three paths for collecting usage data. They are not interchangeable — each has different coverage and provenance.

  • TypeScript SDK — instruments your Node.js app via OpenTelemetry. Best for teams using the Vercel AI SDK or calling provider APIs directly.
  • Gateway adapter — receives telemetry emitted by an LLM gateway (LiteLLM, Portkey).
  • Billing import — imports provider-reported invoice data for reconciliation.

Verified providers (TypeScript SDK)

The SDK captures usage from any provider supported by the Vercel AI SDK via gen_ai.* OTel spans. Verified providers with cost estimates:

  • OpenAI — @ai-sdk/openai — input, output, cached tokens — gpt-4o, gpt-4o-mini, gpt-4-turbo, gpt-3.5-turbo
  • Anthropic — @ai-sdk/anthropic — input, output, cached tokens — claude-3-5-sonnet, claude-3-5-haiku, claude-3-opus
  • Google Gemini — @ai-sdk/google — input, output tokens — gemini-1.5-pro, gemini-1.5-flash, gemini-2.0-flash
  • Mistral — @ai-sdk/mistral — input, output tokens — mistral-large-latest, mistral-small-latest
  • Groq — @ai-sdk/groq — input, output tokens — llama3-70b-8192, mixtral-8x7b-32768
  • Cohere — @ai-sdk/cohere — input, output tokens — command-r-plus, command-r
  • Azure OpenAI — @ai-sdk/azure — uses OpenAI pricing
  • Amazon Bedrock — @ai-sdk/amazon-bedrock — partial pricing coverage

Gateway adapters

Gateway adapters normalize telemetry from LLM gateways into Model Meter's canonical event format.

  • LiteLLM — callback-based, per-request cost and token data
  • Portkey — webhook-based, detailed usage metadata
  • OpenRouter — REST-based usage data

Billing imports

Billing imports pull provider-reported invoice data for reconciliation against Model Meter's request-level estimates. Billing records are always stored separately from estimates — they are never summed together.

  • OpenAI Usage API — paginated usage records, cost by model
  • Anthropic Usage API
  • Google Cloud Billing — BigQuery export or billing API
  • AWS Bedrock Cost Explorer

Runtime support

The SDK (@model-meter/sdk) is a Node.js package. Supported runtimes:

  • Node.js 18+ and 22 LTS (recommended)
  • Next.js — API routes on the Node.js runtime (call init() in instrumentation.ts)
  • AWS Lambda and Vercel Functions — call flush() before the function exits
  • Not supported: Cloudflare Workers, Deno, browser environments

Launch offer

Lock in the best launch pricing.

Join the Waitlist