Skip to main content

Anthropic

Messages API, streaming included, with the full prompt-caching breakdown

OpenAI

Chat Completions and Responses API, streaming included

Google Gemini

One-shot calls and chats, streaming included, with thinking tokens reported separately

OpenRouter

Gateway: bills the credits actually charged and the model that actually served, through the OpenRouter or OpenAI client

LiteLLM Proxy

Self-hosted or cloud gateway: bills the cost LiteLLM computed for each call

Groq

Groq’s own client or the OpenAI client, reported under Groq’s own event name

Mistral

Chat, fill-in-the-middle and agent calls, streaming included

Ollama

Models you host yourself: meter and limit your own capacity

Amazon Bedrock

Gateway: the Converse API, for every model Bedrock serves

TypeSafe

Typed question answering through the TypeSafe client
Also works with any OpenAI-compatible endpoint, through the OpenAI client: How OpenAI-compatible support works stigg.wrap(client) recognizes each of these from the client object itself, so you do not name the vendor. Each provider’s page shows how to wrap it and exactly what is reported.

Why some vendors use the OpenAI client

Many vendors and gateways, including OpenRouter, LiteLLM Proxy, Groq, Mistral and Ollama, expose an API in OpenAI’s format, and support calling it with OpenAI’s openai client, alongside or instead of a client of their own. So you wrap an OpenAI client whose baseURL points at that vendor. Here OpenAI names the format of the API, not who you are calling or paying. The SDK then picks the recipe from the address: Where a vendor has its own client, such as @openrouter/sdk, groq-sdk, @mistralai/mistralai or ollama, you can wrap that client instead. The SDK recognizes it by its shape.

At a glance

For any other vendor, including your own models, see Bring your own vendor.

How usage is reported

  • Same names as the vendor. Each metric keeps the name the vendor uses, such as input_tokens for Anthropic, prompt_tokens for OpenAI or promptTokenCount for Gemini. You can compare the numbers in Stigg directly with the vendor’s own usage reports, such as its usage dashboard.
  • A total, and its parts. Every vendor also reports a total: the vendor’s own where it publishes one, such as total_tokens or totalTokenCount, and otherwise the sum of the parts, added up by the SDK (Anthropic, Ollama and TypeSafe). The total includes the other counters, so price the total or the parts, never both.
  • Every usage field, not just the named metrics. Each event also includes every usage field the vendor returned, with a raw. prefix (raw.<field name>). If a vendor adds a field the SDK does not report as a metric yet, you can build a meter on it without waiting for an SDK update.
  • No prompts or responses. Only usage numbers are sent to Stigg. The text of your prompts and the model’s responses never leaves your application.