---
title: AI Costs
description: >-
  Gain unified visibility into AI spend across providers, normalize cost data,
  and attribute usage to users and teams.
breadcrumbs: Docs > Cloud Cost Management > AI Costs
---

> For the complete documentation index, see [llms.txt](https://docs.datadoghq.com/llms.txt).

# AI Costs

## Overview{% #overview %}

AI Costs in Cloud Cost Management gives FinOps and engineering teams a unified destination for analyzing AI spend across providers, including Amazon Bedrock, Amazon SageMaker, Anthropic, Azure Foundry, Cursor, Databricks Mosaic AI, GitHub Copilot, Google Gemini, OpenAI, Snowflake AI, and Vertex AI. View total AI spend alongside your existing cloud infrastructure costs, analyze it with normalized tags, track cost anomalies, identify optimization opportunities, and attribute usage to the specific users and API keys driving it.

## Prerequisites{% #prerequisites %}

To use AI Costs, you must have at least one of the following supported providers set up for [Cloud Cost Management](https://docs.datadoghq.com/cloud_cost_management.md):

| AI provider                         | Setup method                                                                                                                         |
| ----------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ |
| Amazon Bedrock                      | [AWS integration](https://docs.datadoghq.com/cloud_cost_management/setup/aws.md)                                                     |
| Amazon SageMaker                    | [AWS integration](https://docs.datadoghq.com/cloud_cost_management/setup/aws.md)                                                     |
| Anthropic (Enterprise and Platform) | [SaaS integration](https://docs.datadoghq.com/cloud_cost_management/setup/saas_costs.md?tab=anthropic#configure-your-saas-accounts)  |
| Azure Foundry (Models and Tools)    | [Azure integration](https://docs.datadoghq.com/cloud_cost_management/setup/azure.md?tab=terraform)                                   |
| Google Gemini                       | [Google Cloud integration](https://docs.datadoghq.com/cloud_cost_management/setup/google_cloud.md)                                   |
| OpenAI (Platform only)              | [SaaS integration](https://docs.datadoghq.com/cloud_cost_management/setup/saas_costs.md?tab=openai#configure-your-saas-accounts)     |
| Vertex AI                           | [Google Cloud integration](https://docs.datadoghq.com/cloud_cost_management/setup/google_cloud.md)                                   |
| GitHub Copilot                      | [GitHub Copilot](https://docs.datadoghq.com/cloud_cost_management/setup/saas_costs.md?tab=github#configure-your-saas-accounts)       |
| Cursor                              | [Cursor](https://docs.datadoghq.com/cloud_cost_management/setup/saas_costs.md?tab=cursor#configure-your-saas-accounts)               |
| Databricks Mosaic AI                | [SaaS integration](https://docs.datadoghq.com/cloud_cost_management/setup/saas_costs.md?tab=databricks#configure-your-saas-accounts) |
| Snowflake AI                        | [SaaS integration](https://docs.datadoghq.com/cloud_cost_management/setup/saas_costs.md?tab=snowflake#configure-your-saas-accounts)  |

## AI cost summary{% #ai-cost-summary %}

After connecting your AI providers, navigate to [**Cloud Cost** > **Summarize** > **AI**](https://app.datadoghq.com/cost/summarize/ai-costs) to view the AI cost summary page.

{% image
   source="https://docs.dd-static.net/images/cloud_cost/ai_costs/ccm-ai-costs-overview.20ea73b5f26ec1eff19ddc6d8b5d6fd7.png?auto=format&fit=max&w=850 1x, https://docs.dd-static.net/images/cloud_cost/ai_costs/ccm-ai-costs-overview.20ea73b5f26ec1eff19ddc6d8b5d6fd7.png?auto=format&fit=max&w=850&dpr=2 2x"
   alt="The AI cost summary dashboard, showing daily spend trends over a one-month period, a list of top spend drivers, and an anomaly graph." /%}

The AI cost summary page provides:

- **Total AI Cost**: Aggregated AI cost and cost change over the selected time frame.
- **Daily AI Cost**: Daily cost trends across the selected providers over the selected time frame. Use the **Filter to** dropdown to define which providers appear in the graph.
- **Top Cost Drivers**: The models, projects, services, and users generating the most spend.
- **Active AI Cost Anomalies**: Cost [anomalies](https://docs.datadoghq.com/cloud_cost_management/cost_changes/anomalies.md) surfaced proactively across all connected providers. Select an anomaly to open a side panel with more details and options for further action.
- **AI Cost Recommendations**: Cost [recommendations](https://docs.datadoghq.com/cloud_cost_management/recommendations.md) and optimization opportunities surfaced across all connected providers. Select a recommendation to open a side panel with more details and options for further action.
- **AI Cost Dashboards**: Out-of-the-box dashboard templates for each supported provider, combining cost data with usage signals such as token consumption, model distribution, and user analytics.

## Normalized AI tags{% #normalized-ai-tags %}

AI cost data from all supported providers is normalized to a consistent set of tags. Use these tags to filter, group, compare, and plan AI spend across dashboards, [monitors](https://docs.datadoghq.com/cloud_cost_management/cost_changes/monitors.md), [budgets](https://docs.datadoghq.com/cloud_cost_management/planning/budgets.md), [forecasts](https://docs.datadoghq.com/cloud_cost_management/planning/forecasting.md), and other Datadog tools. Use [Cloud Cost Explorer](https://app.datadoghq.com/cost/explorer) to query and compare spend across providers without writing per-provider logic.

The following tags are available for all supported AI providers:

| Tag name     | Tag description                                                                                                                                                                                             |
| ----------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `providername`    | The AI provider.                                                                                                                                                                                            |
| `ai_vendor`       | The AI provider and plan that the cost belongs to (for example, `amazon_bedrock`, `anthropic_enterprise`, or `anthropic_platform`).                                                                         |
| `model`           | The AI model identifier (for example, `claude-opus-4-6`, `gpt-4.1`).                                                                                                                                        |
| `model_name`      | The human-readable model name (for example, `Claude Opus 4.6`).                                                                                                                                             |
| `token_direction` | Whether tokens are being consumed (input) or generated (output) within a service or application.                                                                                                            |
| `token_category`  | The specific category of tokens consumed, such as input tokens, output tokens, or tokens related to caching and search operations (for example, `cached input`, `cache write`, `standard input`, `output`). |
| `project`         | The project, workspace, or environment the AI costs belong to.                                                                                                                                              |

## Attribute AI spend to sources{% #attribute-ai-spend-to-sources %}

Each provider reports its own tags that attribute AI spend to the users, API keys, projects, and other sources that generated it. For Anthropic and OpenAI, Datadog also adds tags through [out-of-the-box (OOTB) allocation rules](https://docs.datadoghq.com/cloud_cost_management/allocation/custom_allocation_rules.md?tab=even), which require no configuration.

### Provider-specific tags{% #provider-specific-tags %}

In addition to the normalized AI tags, each provider reports its own set of tags. The AI cost summary page uses these tags to break down, filter, and group each provider's spend. The label column shows the name the tag uses on the AI cost summary page.

{% tab title="Amazon Bedrock" %}

| Tag                                  | Label                | Description                                                     |
| ------------------------------------ | -------------------- | --------------------------------------------------------------- |
| `model_name`                         | Model                | The model that generated the cost.                              |
| `project`                            | Project              | The project that the cost belongs to.                           |
| `aws_iam_principal_user`             | IAM User             | The IAM user that made the request.                             |
| `aws_iam_principal_session_name`     | IAM Session Name     | The session name of the IAM role session that made the request. |
| `aws_iam_principal_application_role` | IAM Application Role | The IAM role that the application assumed to make the request.  |

The IAM principal tags are available only when your [AWS Cost and Usage Report (CUR 2.0)](https://docs.datadoghq.com/cloud_cost_management/setup/aws.md?tab=cloudformation#configure-the-cost-and-usage-report-settings) includes IAM principal data.
{% /tab %}

{% tab title="Amazon SageMaker" %}

| Tag                       | Label         | Description                                                                                           |
| ------------------------- | ------------- | ----------------------------------------------------------------------------------------------------- |
| `sagemaker_resource_type` | Resource Type | The type of SageMaker resource that generated the cost (for example, `app`).                          |
| `sagemaker_resource_name` | Resource Name | The name of the SageMaker resource that generated the cost.                                           |
| `sagemaker_app_type`      | App Type      | The type of SageMaker app. Available only for resources where `sagemaker_resource_type` is `app`.     |
| `sagemaker_app_name`      | App Name      | The name of the SageMaker app. Available only for resources where `sagemaker_resource_type` is `app`. |
| `sagemaker_component`     | Component     | The SageMaker component that generated the cost.                                                      |

{% /tab %}

{% tab title="Anthropic" %}
Anthropic reports a different set of tags for each plan.

**Anthropic Enterprise**

| Tag              | Label          | Description                                                                                  |
| ---------------- | -------------- | -------------------------------------------------------------------------------------------- |
| `model_name`     | Model          | The model that generated the cost.                                                           |
| `user_email`     | User           | The email address of the user who generated the cost.                                        |
| `product`        | Product        | The Anthropic product that generated the cost (for example, `claude_code`).                  |
| `context_window` | Context Window | The context window size range of the request (for example, `tier_0-200k` or `tier_200k-1m`). |
| `speed`          | Speed          | The output speed mode of the request.                                                        |

**Anthropic Platform**

| Tag              | Label          | Description                                                                                  |
| ---------------- | -------------- | -------------------------------------------------------------------------------------------- |
| `model_name`     | Model          | The model that generated the cost.                                                           |
| `api_key_name`   | API Key Name   | The name of the API key that made the request.                                               |
| `workspace_name` | Workspace      | The Anthropic workspace that the cost belongs to.                                            |
| `context_window` | Context Window | The context window size range of the request (for example, `tier_0-200k` or `tier_200k-1m`). |
| `service_tier`   | Service Tier   | The service tier that processed the request (for example, `Standard`).                       |
| `cost_type`      | Cost Type      | The type of charge (for example, `tokens`).                                                  |

**Additional tags**

The following Anthropic tags aren't shown on the AI cost summary page, but are available for filtering and grouping across Cloud Cost Management:

| Tag            | Description                                                                |
| -------------- | -------------------------------------------------------------------------- |
| `api_key_id`   | The unique identifier of the API key that made the request.                |
| `model`        | An alias for `model_id`, provided for consistency with usage metrics.      |
| `model_id`     | The canonical Anthropic model identifier (for example, `claude-opus-4-6`). |
| `org_id`       | The unique identifier of the Anthropic organization.                       |
| `org_name`     | A tag-normalized version of the Anthropic organization's name.             |
| `user_id`      | The unique identifier of the user who generated the cost.                  |
| `user_name`    | The name of the user who generated the cost.                               |
| `workspace_id` | The unique identifier of the Anthropic workspace.                          |

{% /tab %}

{% tab title="Azure Foundry" %}
Azure Foundry spend is split into Foundry Models, which covers the `Foundry Models` meter category, and Foundry Tools, which covers all other AI meter categories.

**Azure Foundry Models**

| Tag                 | Label          | Description                                                             |
| ------------------- | -------------- | ----------------------------------------------------------------------- |
| `model_name`        | Model          | The model that generated the cost.                                      |
| `resourcegroupname` | Resource Group | The Azure resource group that the cost belongs to.                      |
| `metercategory`     | Category       | The Azure meter category of the charge (for example, `Foundry Models`). |
| `metersubcategory`  | Subcategory    | The Azure meter subcategory of the charge.                              |

**Azure Foundry Tools**

| Tag                 | Label          | Description                                                                                    |
| ------------------- | -------------- | ---------------------------------------------------------------------------------------------- |
| `resourcegroupname` | Resource Group | The Azure resource group that the cost belongs to.                                             |
| `metercategory`     | Category       | The Azure meter category of the charge (for example, `Foundry Tools` or `Cognitive Services`). |
| `metersubcategory`  | Subcategory    | The Azure meter subcategory of the charge.                                                     |

{% /tab %}

{% tab title="Cursor" %}

| Tag             | Label         | Description                                                          |
| --------------- | ------------- | -------------------------------------------------------------------- |
| `model_name`    | Model         | The model that generated the cost.                                   |
| `user_email`    | User          | The email address of the user who generated the cost.                |
| `max_mode`      | Max Mode      | Whether the request used Cursor's Max Mode.                          |
| `is_headless`   | Headless Mode | Whether the request ran in headless mode, without the Cursor editor. |
| `billing_group` | Billing Group | The Cursor billing group that the user belongs to.                   |

{% /tab %}

{% tab title="Databricks Mosaic AI" %}

| Tag                      | Label                  | Description                                                                                       |
| ------------------------ | ---------------------- | ------------------------------------------------------------------------------------------------- |
| `billing_origin_product` | Billing Origin Product | The Databricks product that generated the cost (for example, `MODEL_SERVING` or `VECTOR_SEARCH`). |
| `model_name`             | Model                  | The model that generated the cost.                                                                |
| `workspace_name`         | Workspace              | The Databricks workspace that the cost belongs to.                                                |

{% /tab %}

{% tab title="Gemini" %}

| Tag          | Label   | Description                                        |
| ------------ | ------- | -------------------------------------------------- |
| `model_name` | Model   | The model that generated the cost.                 |
| `project`    | Project | The Google Cloud project that the cost belongs to. |

{% /tab %}

{% tab title="GitHub Copilot" %}

| Tag                 | Label        | Description                                       |
| ------------------- | ------------ | ------------------------------------------------- |
| `organization_name` | Organization | The GitHub organization that the cost belongs to. |
| `repository_name`   | Repository   | The GitHub repository that the cost belongs to.   |

{% /tab %}

{% tab title="OpenAI" %}

| Tag            | Label        | Description                                           |
| -------------- | ------------ | ----------------------------------------------------- |
| `model_name`   | Model        | The model that generated the cost.                    |
| `user_email`   | User         | The email address of the user who generated the cost. |
| `project`      | Project      | The OpenAI project that the cost belongs to.          |
| `api_key_name` | API Key Name | The name of the API key that made the request.        |

**Additional tags**

The following OpenAI tags aren't shown on the AI cost summary page, but are available for filtering and grouping across Cloud Cost Management:

| Tag            | Description                                                 |
| -------------- | ----------------------------------------------------------- |
| `account_id`   | The unique identifier of the OpenAI account.                |
| `account_name` | The name of the OpenAI account.                             |
| `api_key_id`   | The unique identifier of the API key that made the request. |
| `batch`        | Whether the request used the OpenAI Batch API.              |
| `endpoint`     | The OpenAI API endpoint that the request was sent to.       |
| `model`        | The OpenAI model identifier (for example, `gpt-4.1`).       |
| `org_id`       | The unique identifier of the OpenAI organization.           |
| `project_id`   | The unique identifier of the OpenAI project.                |
| `project_name` | The name of the OpenAI project.                             |
| `user_id`      | The unique identifier of the user who generated the cost.   |

{% /tab %}

{% tab title="Snowflake AI" %}

| Tag            | Label   | Description                                     |
| -------------- | ------- | ----------------------------------------------- |
| `account_name` | Account | The Snowflake account that the cost belongs to. |

{% /tab %}

{% tab title="Vertex AI" %}

| Tag          | Label   | Description                                        |
| ------------ | ------- | -------------------------------------------------- |
| `model_name` | Model   | The model that generated the cost.                 |
| `project`    | Project | The Google Cloud project that the cost belongs to. |

{% /tab %}

### Map tags to teams{% #map-tags-to-teams %}

Configure [Tag Pipelines](https://docs.datadoghq.com/cloud_cost_management/allocation/tag_pipelines.md) to map provider-specific tags (such as `user_email`) to teams, services, or business units for aggregate reporting:

{% image
   source="https://docs.dd-static.net/images/cloud_cost/ai_costs/ccm-tag-pipeline-ai-costs.dadd5dc5df518f514f310efb69172a0c.png?auto=format&fit=max&w=850 1x, https://docs.dd-static.net/images/cloud_cost/ai_costs/ccm-tag-pipeline-ai-costs.dadd5dc5df518f514f310efb69172a0c.png?auto=format&fit=max&w=850&dpr=2 2x"
   alt="The Tag Pipelines Rule Setup page, showing user_email values mapped to team values through an existing reference table, and additional tag mapping options." /%}

After mapping, attributed spend appears in provider-specific dashboards and [Cost Reports](https://docs.datadoghq.com/cloud_cost_management/reporting.md):

{% image
   source="https://docs.dd-static.net/images/cloud_cost/ai_costs/ccm-anthropic-ai-cost-reporting.ff6fa9c8c8472419433157278660c5b9.png?auto=format&fit=max&w=850 1x, https://docs.dd-static.net/images/cloud_cost/ai_costs/ccm-anthropic-ai-cost-reporting.ff6fa9c8c8472419433157278660c5b9.png?auto=format&fit=max&w=850&dpr=2 2x"
   alt="A provider-specific dashboard with a stacked bar graph showing daily provider spend attributed by team and model name, and a summary list of the spend attributions." /%}

### Allocate shared AI gateway spend{% #allocate-shared-ai-gateway-spend %}

If your teams send LLM requests through a shared AI gateway, you can split that spend across the teams, users, or services that sent the requests. For more information, see [AI Gateway Allocation](https://docs.datadoghq.com/cloud_cost_management/ai_costs/ai_gateway_allocation.md).

## Further reading{% #further-reading %}

Additional helpful documentation, links, and articles:

- [Cloud Cost Management](https://docs.datadoghq.com/cloud_cost_management.md)
- [SaaS and AI Costs](https://docs.datadoghq.com/cloud_cost_management/setup/saas_costs.md)
- [Custom Allocation Rules](https://docs.datadoghq.com/cloud_cost_management/allocation/custom_allocation_rules.md)
- [AI Gateway Allocation](https://docs.datadoghq.com/cloud_cost_management/ai_costs/ai_gateway_allocation.md)
- [Tag Pipelines](https://docs.datadoghq.com/cloud_cost_management/allocation/tag_pipelines.md)
- [Reporting](https://docs.datadoghq.com/cloud_cost_management/reporting.md)
- [Cloud Cost Monitors](https://docs.datadoghq.com/cloud_cost_management/cost_changes/monitors.md)
- [Budgets](https://docs.datadoghq.com/cloud_cost_management/planning/budgets.md)
- [Forecasting](https://docs.datadoghq.com/cloud_cost_management/planning/forecasting.md)
- [Attribute AI costs across providers with Datadog Cloud Cost Management](https://www.datadoghq.com/blog/cloud-cost-management-ai-costs/)
- [Making agentic token costs visible in production](https://www.datadoghq.com/blog/making-agentic-token-costs-visible-in-production/)
- [Answer any cost question faster with the Cloud Cost skill in Bits Chat](https://www.datadoghq.com/blog/cloud-cost-skill-bits-chat/)
- [How Datadog saves over $1 million each month by optimizing AI usage](https://www.datadoghq.com/blog/how-datadog-saves-money-by-optimizing-ai-usage/)
- [Beyond the $1 AI era: How federal agencies can build the evidence for FY27 renewals](https://www.datadoghq.com/blog/federal-agencies-ai-spend-cloud-cost-management/)
- [Manage Cursor costs with Datadog Cloud Cost Management](https://www.datadoghq.com/blog/cursor-cloud-cost-management/)
