Skip to content

Update custom.md - add ai custom cost - #41655

Open
dd-CyrilleChev wants to merge 1 commit into
masterfrom
cyrille.chevallier/add-ai-custom-cost
Open

dd-CyrilleChev wants to merge 1 commit into
masterfrom
cyrille.chevallier/add-ai-custom-cost

Conversation

@dd-CyrilleChev

Copy link
Copy Markdown
Contributor

What does this PR do? What is the motivation?

Merge readiness

  • Ready for merge

AI assistance

For Datadog employees:

  • ⚠️ Your branch name MUST follow the <name>/<description> convention and include the forward slash (/). If you've already created your PR with an incorrect branch name, please rename your branch and open a fresh PR.
  • 🤖 New: Comment with /review to run an automated check that catches common issues before a Documentation team member reviews your PR.

Additional notes

@dd-CyrilleChev
dd-CyrilleChev requested review from a team as code owners November 11, 2026 20:51
@maycmlee maycmlee self-assigned this Nov 11, 2026

@maycmlee maycmlee left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left some feedback. Some of the links are broken in the preview. I'm not sure why. Let's see if fixing the code block helps.

2026-11-11_16-47-23

-H "Content-Type: application/json" \
-H "DD-API-KEY: ${DD_API_KEY}" \
-H "DD-APPLICATION-KEY: ${DD_APP_KEY}" \
-d '{"data": {"type": "cost_metadata", "id": "'"${file_id}"'", "attributes": {"ai_provider": true}}}'

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This code block is never closed, so the rest of the page (from ## Cost metric types on) renders inside it.

Suggested change
-d '{"data": {"type": "cost_metadata", "id": "'"${file_id}"'", "attributes": {"ai_provider": true}}}'
-d '{"data": {"type": "cost_metadata", "id": "'"${file_id}"'", "attributes": {"ai_provider": true}}}'
```


Cost data appears in Datadog after 24 hours.

### Mark a file as AI provider costs

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To match the term used in the body ("AI provider file"). If you change this, also update the anchor on line 329.

Suggested change
### Mark a file as AI provider costs
### Mark a file as an AI provider file


### Mark a file as AI provider costs

If a file contains the costs of an AI provider, such as a model API or an AI platform that Datadog doesn't integrate with natively, you can mark the file as an AI provider file. The costs of the file then appear on the [**AI Costs** page][11], next to your other AI costs.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
If a file contains the costs of an AI provider, such as a model API or an AI platform that Datadog doesn't integrate with natively, you can mark the file as an AI provider file. The costs of the file then appear on the [**AI Costs** page][11], next to your other AI costs.
If a file contains costs from an AI provider that Datadog doesn't integrate with natively, such as a model API or an AI platform, mark it as an AI provider file. Its costs then appear on the [**AI Costs** page][11] alongside your other AI costs.


If a file contains the costs of an AI provider, such as a model API or an AI platform that Datadog doesn't integrate with natively, you can mark the file as an AI provider file. The costs of the file then appear on the [**AI Costs** page][11], next to your other AI costs.

Line items from an AI provider file get two additional tags:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Line items from an AI provider file get two additional tags:
Datadog adds the following tags to line items from an AI provider file:

| Tag | Description |
| ----------| ----------------------------------|
| `custom_ai_provider` | Set to `true` for line items from an AI provider file. |
| `ai_vendor` | The AI provider, derived from the `ProviderName` of the line item. |

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you add an example of the resulting value? On the AI Costs page, ai_vendor values are normalized (for example, anthropic_enterprise), so it would help to show what a given ProviderName turns into. For example, Acme AI → acme_ai.

| `custom_ai_provider` | Set to `true` for line items from an AI provider file. |
| `ai_vendor` | The AI provider, derived from the `ProviderName` of the line item. |

You can mark a file as an AI provider file when you upload it, or change it later. When you change it, Datadog recomputes the costs for the months that the file covers.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
You can mark a file as an AI provider file when you upload it, or change it later. When you change it, Datadog recomputes the costs for the months that the file covers.
You can mark a file as an AI provider file when you upload it, or change the setting later. When you change the setting, Datadog recomputes costs for the months that the file covers.

Comment on lines +281 to +282
1. To mark a new file, navigate to [**Cloud Cost > Settings > Custom Costs**][3], click the {{< ui >}}\+ Upload Costs{{< /ui >}} button, and turn on {{< ui >}}AI provider{{< /ui >}} before uploading the file.
1. To change an existing file, click the file in the [**Custom Costs**][3] list and turn {{< ui >}}AI provider{{< /ui >}} on or off.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are two alternatives, not steps in a sequence, so a bulleted list fits better.

Suggested change
1. To mark a new file, navigate to [**Cloud Cost > Settings > Custom Costs**][3], click the {{< ui >}}\+ Upload Costs{{< /ui >}} button, and turn on {{< ui >}}AI provider{{< /ui >}} before uploading the file.
1. To change an existing file, click the file in the [**Custom Costs**][3] list and turn {{< ui >}}AI provider{{< /ui >}} on or off.
- To mark a new file: Navigate to [**Cloud Cost > Settings > Custom Costs**][3] and click {{< ui >}}\+ Upload Costs{{< /ui >}}. Turn on {{< ui >}}AI provider{{< /ui >}} before you upload the file.
- To change an existing file: In the [**Custom Costs**][3] list, click the file and turn {{< ui >}}AI provider{{< /ui >}} on or off.

-F "file=${file};type=text/json"
```

To change an existing file, use the [`PATCH api/v2/cost/custom_costs/{file_id}`][12] endpoint.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
To change an existing file, use the [`PATCH api/v2/cost/custom_costs/{file_id}`][12] endpoint.
To change the AI provider setting of an existing file, use the [`PATCH api/v2/cost/custom_costs/{file_id}`][12] endpoint. Set `ai_provider` to `false` to unmark the file.

You can view custom costs data on the [**Cloud Cost Explorer** page][6], the [Cloud Cost Tag Explorer][7], and in [dashboards][8], [notebooks][9], or [monitors][10]. You can also combine Custom Cost metrics with other cloud cost metrics or observability metrics.
Costs from [AI provider files](#mark-a-file-as-ai-provider-costs) also appear on the [**AI Costs** page][11].

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Costs from [AI provider files](#mark-a-file-as-ai-provider-costs) also appear on the [**AI Costs** page][11].
Costs from AI provider files also appear on the [**AI Costs** page][11]. See the [Mark a file as an AI provider file](#mark-a-file-as-an-ai-provider-file) section.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants