Docs/Aigovernance/Aicost

AI Cost

ANTS Platform prices every LLM call your applications send as a trace, rolls the cost up by model, user, agent, environment and time, and helps you cut it with tested model recommendations. This page explains where the numbers come from and where to find each tool.

ℹ

Came here from the AI Optimizer or Models page? Jump to AI Optimizer to create an optimizer, or Models & Pricing to set model prices.

How cost gets into the platform

  1. Your application sends traces through the SDK, OpenTelemetry or the Budget AI gateway. Each LLM call is a generation with a model name and token usage.
  2. The platform matches the model name to a model definition and multiplies usage by price, unless the trace already reports a cost.
  3. Generation costs add up to the trace cost, which the Gauge AI views break down further.
python
from ants_platform import get_client client = get_client() with client.start_as_current_span(name="support-agent") as span: span.update_trace(user_id="user-123", session_id="session-456", tags=["support"]) with client.start_as_current_generation( name="answer", model="gpt-4o-mini", input=[{"role": "user", "content": "Where is my order?"}], ) as generation: generation.update( output="It ships tomorrow.", usage_details={"input": 412, "output": 38}, )

The OpenAI, LangChain and CrewAI integrations capture model and usage for you. See Python SDK and Sending Data In.

Where to see and act on cost

GoalWhereDocs
See spend by model, user, trace name, environment and gateway keyGauge AI → Cost DashboardCost & Latency Dashboards
Compare cost, tokens and latency with quality scoresGauge AI → Cost Performance Metrics, Latency & AnalyticsCost & Performance Metrics
See cost per end userGauge AI → UsersUsers
See cost and projections per agentDiscover AI → AI Agent CenterAI Agent Center
Find a cheaper model that keeps qualityGauge AI → AI OptimizerAI Optimizer
Set or override model pricesSettings → ModelsModels & Pricing
Cap spend with budgets and rate limitsBudget AI → Budgets & LimitsBudget AI

In this section

© 2026 ANTS Platform, Inc.Docs v1.0 · Last updated June 2026