---
title: "Get AI Gateway governance controls"
method: GET
path: "/api/v2/governance"
tags: ["AI Gateway"]
---

# Get AI Gateway governance controls

`GET /api/v2/governance`

## Request

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

Get the organization-wide AI Gateway governance settings, which are the default data capture mode and whether requests must reach providers covered by a zero data retention agreement.

## Response `200`

OK

- AiGatewayGovernanceResponse: Response containing the organization's AI Gateway governance controls.
  - `data` AiGatewayGovernanceResource, required: Organization-wide AI Gateway governance resource.
    - `attributes` AiGatewayGovernanceAttributes, required: Organization-wide AI Gateway governance controls.
      - `data_capture_mode` 'metadata_only' | 'full_capture', required: Controls whether AI Gateway captures request and response content in addition to metadata.
      - `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.
      - `zdr_mode` 'off' | 'required', required: Zero data retention requirement for the organization's requests.
    - `id` string, required: Singleton governance resource identifier.
    - `type` 'governance', required: AI Gateway governance resource type.

## Other responses

- `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)
