---
title: "Get the AI Gateway data capture configuration"
method: GET
path: "/api/v2/data-capture/configuration"
tags: ["AI Gateway"]
---

# Get the AI Gateway data capture configuration

`GET /api/v2/data-capture/configuration`

## Request

- Base URL: `https://api.datadoghq.com`
- URL: `https://api.datadoghq.com/api/v2/data-capture/configuration`
- 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/data-capture/configuration/get.ts> (a function with typed inputs; its response is checked against the schema)

Get the organization default mode, scoped capture overrides, and configuration revision.

## Response `200`

OK

- AiGatewayCaptureConfigurationResponse: Response containing the organization data capture configuration.
  - `data` AiGatewayCaptureConfigurationResponseData, required: Organization data capture configuration, including its default mode and scoped overrides.
    - `attributes` AiGatewayCaptureConfigurationResponseDataAttributes, required: Organization default mode, scoped overrides, and current configuration revision.
      - `configuration_revision` string, required: Opaque revision of the organization default and all overrides. Writes require the revision returned by a current read or preview.
      - `default_metadata_capture` AiGatewayMetadataCaptureItem[]: Items Metadata-only capture adds, each listed once. An item requires the items whose information it already reveals: `tool_output_size`, `tool_names` and `conversation_shape` require `tool_usage`, and `input_size_by_role` requires `tool_output_size`. A set that leaves out a required item is rejected. When several Metadata-only overrides match a request, it gets only the items all of them select.
      - `default_mode` 'metadata_only' | 'full_capture', required: Default capture mode for the organization. Change it in **Org defaults**.
      - `overrides` AiGatewayCaptureOverride[], required: Scoped overrides currently configured for the organization.
        - `created_at` string, date-time, required: Timestamp when the override was created.
        - `id` string, uuid, required: UUID identifying the override within the organization.
        - `metadata_capture` AiGatewayMetadataCaptureItem[]: Items Metadata-only capture adds, each listed once. An item requires the items whose information it already reveals: `tool_output_size`, `tool_names` and `conversation_shape` require `tool_usage`, and `input_size_by_role` requires `tool_output_size`. A set that leaves out a required item is rejected. When several Metadata-only overrides match a request, it gets only the items all of them select.
        - `mode` 'metadata_only' | 'full_capture', required: Capture mode for matching traffic.
        - `name` string, required: Display name of the override. Names need not be unique; identify overrides by `id`.
        - `revision` integer, required: Current override revision, required for replacement or deletion.
        - `scope` AiGatewayCaptureResponseScope, required: Visible request filters. Provider and model tags are withheld when the caller cannot view them. An empty object or empty tags can represent a fully restricted scope; scope_restricted identifies redaction.
          - `tags` object: Exact-match request tags with lowercase keys. The reserved `model` tag is the canonical model ID, and the reserved `provider` tag is the configured connection slug. The server sets both. Custom tags come from `x-dd-tag` headers. Keys and values must not have leading or trailing white space. Values are case-sensitive.
          - `team_id` string, uuid: UUID of a Datadog team. Matches the authorized team selected by the `x-ai-gateway-team` request header. Requests without this header do not match team-scoped overrides. Open-membership teams cannot scope overrides.
          - `user_id` string, uuid: Authenticated Datadog user UUID in this organization.
        - `scope_restricted` boolean, required: Whether provider or model scope metadata was withheld. Omit unchanged scope fields on an unrelated update to preserve their saved values.
        - `updated_at` string, date-time, required: Timestamp when the override was last modified.
    - `id` string, required: Identifier of the organization configuration resource, always `organization`.
    - `type` 'data-capture-configurations', required: Data capture configurations resource type.

## Other responses

- `403`: Forbidden
- `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)
