---
title: "Get a model pricing override"
method: GET
path: "/api/v2/providers/{provider_id}/models/{canonical}/pricing"
tags: ["AI Gateway"]
---

# Get a model pricing override

`GET /api/v2/providers/{provider_id}/models/{canonical}/pricing`

## Request

- Base URL: `https://api.datadoghq.com`
- URL: `https://api.datadoghq.com/api/v2/providers/{provider_id}/models/{canonical}/pricing`
- Auth: one of:
  - API key in header `DD-API-KEY` and API key in header `DD-APPLICATION-KEY`
  - OAuth 2
    - Authorization code: `/oauth2/v1/authorize`
    - Token URL: `/oauth2/v1/token` scopes: `ai_gateway_config_read`
- TypeScript: <https://skmtc.dev/datadog/apis/datadog-api-v2-collection/docs/api/v2/providers/:provider_id/models/:canonical/pricing/get.ts> (a function with typed inputs; its response is checked against the schema)

Get a custom provider model's pricing override and effective pricing source. Requires `ai_gateway_config_read` and provider View. Catalog and pricing metadata inherit provider access. Lists omit hidden entries; direct reads of hidden resources return 404.

## Path parameters

- `provider_id` integer, required
- `canonical` string, required

## Response `200`

OK

- AiGatewayModelPricingResponse: Response containing model pricing information.
  - `data` AiGatewayModelPricingResponseData, required: Data for a model pricing response.
    - `attributes` AiGatewayModelPricingAttributes, required: Attributes of a model pricing resource.
      - `effective_source` 'catalog_auto' | 'model_override' | 'unknown': Effective source of the model pricing data.
      - `pricing_config` AiGatewayModelPricingConfig: Pricing configuration for a model.
        - `overrides` AiGatewayModelPricingRates: Pricing rates for a model.
          - `cache_read_cost_per_mtok` number, double: Cost per million tokens for cache reads.
          - `cache_write_cost_per_mtok` number, double: Cost per million tokens for cache writes.
          - `non_cached_input_cost_per_mtok` number, double: Cost per million tokens for non-cached input.
          - `output_cost_per_mtok` number, double: Cost per million tokens for output.
        - `rates` AiGatewayModelPricingRates: Pricing rates for a model.
          - `cache_read_cost_per_mtok` number, double: Cost per million tokens for cache reads.
          - `cache_write_cost_per_mtok` number, double: Cost per million tokens for cache writes.
          - `non_cached_input_cost_per_mtok` number, double: Cost per million tokens for non-cached input.
          - `output_cost_per_mtok` number, double: Cost per million tokens for output.
        - `source` AiGatewayModelPricingSource, required: Source information for a model's pricing.
          - `provider_id` string: Pricing catalog provider identifier.
          - `type` 'catalog' | 'custom', required: Source type for the pricing configuration.
        - `version` integer, required: Pricing configuration version. The only supported version is `1`.
    - `id` string, required: Resource identifier.
    - `type` 'model-pricing', required: Model pricing resource type.

## Other responses

- `400`: Bad Request
- `404`: Not Found
- `429`: Too many requests

---

[API](https://skmtc.dev/datadog/apis/datadog-api-v2-collection.md) - [All operations](https://skmtc.dev/datadog/apis/datadog-api-v2-collection/llms.txt) - [OpenAPI document](https://skmtc.dev/datadog/apis/datadog-api-v2-collection/revisions/3f70db624329?raw)
