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. Tracing API / DeepEval — Costs explicitly set when logging traces take highest priority
  2. Custom Model Costs — Costs you configure in project settings 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. Navigate to Project SettingsModel Costs
  2. Click Add Model Cost
  3. Enter a Match Pattern (e.g., gpt-4.1, claude-*, or my-custom-model)
  4. Optionally select a Provider to restrict the cost rule to spans from that specific provider
  5. Set the Input Cost per million token
  6. Set the Output Cost per million tokens
  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.

Use wildcard patterns (e.g., gpt-4*) to match multiple model variants with a single cost configuration.

FieldDescription
Match PatternThe model name or pattern to match against traced models
ProviderOptional provider filter for the cost rule
Input Cost / M TokensCost per million input tokens
Output Cost / M TokensCost 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 available for:

  • OpenAI — GPT-4, GPT-4o, GPT-3.5 Turbo, and other OpenAI models
  • Anthropic — Claude 3.5, Claude 3, and other Anthropic models
  • Gemini — Gemini Pro, Gemini Ultra, and other Google models

Pre-configured costs are updated periodically to reflect current provider pricing. For the most accurate cost tracking, consider setting custom costs or passing costs directly via the tracing API.

You can search through pre-configured costs by model name to verify the pricing being used for your traces.

Inherit From Organization

Toggle this option to inherit model cost configurations from your organization settings. When enabled, organization-level model costs will override the pre-configured defaults for this project.

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