Launch Week 3: Five days of launches

Model Costs

Configure LLM model costs for usage tracking and cost estimation for LLM tracing.

Model Costs lets you configure cost tracking for your LLM usage. This is useful for monitoring spending across different models and understanding cost breakdowns in your traces.

Configure Model Costs

Cost Priority

Model costs are applied in the following order of priority:

  1. Explicit trace cost attributes — Costs explicitly set when logging traces take highest priority
  2. Custom Model Costs — Costs you configure on the Model Costs page override pre-configured defaults
  3. Pre-configured Model Costs — Fallback pricing for common models when no other cost is set

Custom Model Costs

Custom model costs let you define pricing for specific models or model patterns. These costs override pre-configured defaults but are themselves overridden by costs explicitly set via the tracing API or DeepEval.

To add a custom model cost:

  1. Open Model Costs from the project sidebar (under More in Observe)
  2. Click Add Model Cost
  3. Enter a Match Pattern (Regex) (e.g., gpt-4.1, claude-.*, or ^my-custom-model$). Expand Test pattern with a model name to check it matches
  4. Set the Input Token Cost in USD per million tokens
  5. Set the Output Token Cost in USD per million tokens
  6. Optionally enter a Provider (e.g., openai) to restrict the cost rule to spans from that specific provider
  7. Click Save

You can treat input and output costs as separate entities, and you'll only need either one of the either. For example, not providing the output cost would default to the pre-configured model costs, so be sure to set it to 0 if you don't wish to count output costs.

FieldDescription
Match Pattern (Regex)Regex matched against traced model names
ProviderOptional provider filter for the cost rule
Input Cost / M TokensCost in USD per million input tokens
Output Cost / M TokensCost in USD per million output tokens

Pre-configured Model Costs

Confident AI includes pre-configured costs for popular models from major providers. These serve as fallback pricing when no cost is set through the tracing API or custom model costs.

Pre-configured costs are grouped into one tab per provider: OpenAI, Anthropic, Gemini, Vertex AI, Bedrock, Azure, xAI, DeepSeek, Moonshot AI, Mistral, Perplexity, OpenRouter, and Hugging Face.

Pick a provider's tab and search by model name to verify the pricing being used for your traces.

Inherit From Organization

Toggle Inherit Custom Model Pricing From Organization to inherit model cost configurations from your organization settings. When enabled, organization-level model costs will override the pre-configured defaults for this project, and the project's own Custom Model Costs table is hidden.

This is useful when you want to maintain consistent pricing across multiple projects without configuring each one individually.

Ready to monitor AI in production?Connect traces, alerts, dashboards, and evals in one production workflowBook a demo

Last updated on

Built byConfident AI