Repository navigation
Update custom.md - add ai custom cost - #41655
dd-CyrilleChev wants to merge 1 commit into
Conversation
| -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}}}' |
There was a problem hiding this comment.
This code block is never closed, so the rest of the page (from ## Cost metric types on) renders inside it.
| -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 |
There was a problem hiding this comment.
To match the term used in the body ("AI provider file"). If you change this, also update the anchor on line 329.
| ### 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. |
There was a problem hiding this comment.
| 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: |
There was a problem hiding this comment.
| 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. | |
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
| 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. |
| 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. |
There was a problem hiding this comment.
These are two alternatives, not steps in a sequence, so a bulleted list fits better.
| 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. |
There was a problem hiding this comment.
| 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]. |
There was a problem hiding this comment.
| 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. |

What does this PR do? What is the motivation?
Merge readiness
AI assistance
For Datadog employees:
<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./reviewto run an automated check that catches common issues before a Documentation team member reviews your PR.Additional notes