---
title: Delete a model pricing override by canonical ID
description: Clear a provider model's pricing override, naming the model in the canonical query parameter.
breadcrumbs: Docs > API > Delete a model pricing override by canonical ID
---

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

# Delete a model pricing override by canonical ID

## v2 (latest)

{% alert level="warning" %}
**Note**: This endpoint is in Preview and is subject to change.
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help.md).
{% /alert %}

| Datadog site      | API endpoint                                                                      |
| ----------------- | --------------------------------------------------------------------------------- |
| app.datadoghq.com | DELETE https://api.datadoghq.com/api/v2/providers/{provider_id}/model-pricing     |
| us3.datadoghq.com | DELETE https://api.us3.datadoghq.com/api/v2/providers/{provider_id}/model-pricing |
| us5.datadoghq.com | DELETE https://api.us5.datadoghq.com/api/v2/providers/{provider_id}/model-pricing |
| app.datadoghq.eu  | DELETE https://api.datadoghq.eu/api/v2/providers/{provider_id}/model-pricing      |
| ap1.datadoghq.com | DELETE https://api.ap1.datadoghq.com/api/v2/providers/{provider_id}/model-pricing |
| ap2.datadoghq.com | DELETE https://api.ap2.datadoghq.com/api/v2/providers/{provider_id}/model-pricing |
| uk1.datadoghq.com | DELETE https://api.uk1.datadoghq.com/api/v2/providers/{provider_id}/model-pricing |
| app.ddog-gov.com  | DELETE https://api.ddog-gov.com/api/v2/providers/{provider_id}/model-pricing      |
| us2.ddog-gov.com  | DELETE https://api.us2.ddog-gov.com/api/v2/providers/{provider_id}/model-pricing  |

### Overview

Clear a provider model's pricing override, naming the model in the `canonical` query parameter. Unlike the endpoint that takes the canonical ID in the path, this one accepts canonical IDs that contain `/`. Requires `ai_gateway_config_write` and provider Edit. Models and pricing inherit provider access.

This endpoint requires the `ai_gateway_config_write` permission.

OAuth apps require the `ai_gateway_config_write` authorization [scope](https://docs.datadoghq.com/api/latest/scopes.md#ai-gateway) to access this endpoint.

### Arguments

#### Path Parameters

| Field                    | Type    | Description  |
| ------------------------ | ------- | ------------ |
| provider_id [*required*] | integer | Provider ID. |

#### Query Strings

| Field                  | Type   | Description                                                              |
| ---------------------- | ------ | ------------------------------------------------------------------------ |
| canonical [*required*] | string | Canonical model identifier. It can contain `/`, such as `openai/gpt-4o`. |

### Response

{% tabs %}
{% tab label="204" %}
No Content
{% /tab %}

{% tab label="400" %}
Bad Request

{% tabs %}
{% tab label="Model" %}
API error response.

| Field               | Type     | Description       |
| ------------------- | -------- | ----------------- |
| errors [*required*] | [string] | A list of errors. |
{% /tab %}

{% tab label="Example" %}
```json
{
  "errors": [
    "Bad Request"
  ]
}
```
{% /tab %}
{% /tabs %}
{% /tab %}

{% tab label="403" %}
Forbidden

{% tabs %}
{% tab label="Model" %}
API error response.

| Field               | Type     | Description       |
| ------------------- | -------- | ----------------- |
| errors [*required*] | [string] | A list of errors. |
{% /tab %}

{% tab label="Example" %}
```json
{
  "errors": [
    "Bad Request"
  ]
}
```
{% /tab %}
{% /tabs %}
{% /tab %}

{% tab label="404" %}
Not Found

{% tabs %}
{% tab label="Model" %}
API error response.

| Field               | Type     | Description       |
| ------------------- | -------- | ----------------- |
| errors [*required*] | [string] | A list of errors. |
{% /tab %}

{% tab label="Example" %}
```json
{
  "errors": [
    "Bad Request"
  ]
}
```
{% /tab %}
{% /tabs %}
{% /tab %}

{% tab label="429" %}
Too many requests

{% tabs %}
{% tab label="Model" %}
API error response.

| Field               | Type     | Description       |
| ------------------- | -------- | ----------------- |
| errors [*required*] | [string] | A list of errors. |
{% /tab %}

{% tab label="Example" %}
```json
{
  "errors": [
    "Bad Request"
  ]
}
```
{% /tab %}
{% /tabs %}
{% /tab %}
{% /tabs %}

### Code Example

{% tabs %}
{% tab label="Curl" %}
```bash
# Path parameters
export provider_id="42"
# Required query arguments
export canonical="openai/gpt-4o"

# Set your Datadog site and credentials
export DD_SITE="datadoghq.com" # Or us3.datadoghq.com, us5.datadoghq.com, datadoghq.eu, ap1.datadoghq.com, ap2.datadoghq.com, uk1.datadoghq.com, ddog-gov.com, us2.ddog-gov.com
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X DELETE "https://api.${DD_SITE}/api/v2/providers/${provider_id}/model-pricing?canonical=${canonical}" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"
```
{% /tab %}
{% /tabs %}
