---
title: "Get an AI Gateway Custom Policy"
method: GET
path: "/v1/ai-gateways/{gatewayId}/custom-policies/{customPolicyIdOrName}"
tags: ["AI Gateway Custom Policies"]
---

# Get an AI Gateway Custom Policy

`GET /v1/ai-gateways/{gatewayId}/custom-policies/{customPolicyIdOrName}`

## Request

- Base URL: `https://global.api.konghq.com`
- URL: `https://global.api.konghq.com/v1/ai-gateways/{gatewayId}/custom-policies/{customPolicyIdOrName}`
- Auth: one of:
  - HTTP bearer
  - HTTP bearer
  - HTTP bearer
  - HTTP bearer

Returns the details of a specific AI Gateway custom policy.

## Path parameters

- `gatewayId` string, uuid, required: Contains a unique identifier used for this resource.
- `customPolicyIdOrName` string, uuid, required: Contains a unique identifier used for this resource.

## Response `200`

A successful response returning the AI Gateway Custom Policy.

- union: An AI Gateway custom policy.
  - intersection
    - [`AIGatewayCustomPolicyInstalled`](https://skmtc.dev/kong/apis/konnect-api/revisions/5da43f6209ea/schema?at=%2Fcomponents%2Fschemas%2FAIGatewayCustomPolicyInstalled)
  - intersection
    - [`AIGatewayCustomPolicyStreaming`](https://skmtc.dev/kong/apis/konnect-api/revisions/5da43f6209ea/schema?at=%2Fcomponents%2Fschemas%2FAIGatewayCustomPolicyStreaming)

## Other responses

- `401`: Unauthorized
- `403`: Forbidden
- `404`: Not Found
- `429`: Too Many Requests

## Changes

- **2026-11-20** `757a21fb79f2`: 2 breaking, 2 info
  - the `oneOf[#/components/schemas/AIGatewayCustomPolicyInstalled]/managed_by/additionalProperties/` response property's maxLength was increased from `63` to `127` for the response status `200`
  - the `oneOf[#/components/schemas/AIGatewayCustomPolicyStreaming]/managed_by/additionalProperties/` response property's maxLength was increased from `63` to `127` for the response status `200`
  - the `oneOf[#/components/schemas/AIGatewayCustomPolicyInstalled]/managed_by/additionalProperties/` response's property pattern was changed from `^[a-z0-9A-Z]{1}([a-z0-9A-Z-._]*[a-z0-9A-Z]+)?$` to `^[^\s\x00-\x1F\x7F-\x9F]+$` for the status `200`
  - the `oneOf[#/components/schemas/AIGatewayCustomPolicyStreaming]/managed_by/additionalProperties/` response's property pattern was changed from `^[a-z0-9A-Z]{1}([a-z0-9A-Z-._]*[a-z0-9A-Z]+)?$` to `^[^\s\x00-\x1F\x7F-\x9F]+$` for the status `200`
- **2026-09-30** `f530bf400198`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/kong/apis/konnect-api/changes/v1/ai-gateways/:gatewayId/custom-policies/:customPolicyIdOrName/get.md)

---

[API](https://skmtc.dev/kong/apis/konnect-api.md) - [All operations](https://skmtc.dev/kong/apis/konnect-api/llms.txt) - [OpenAPI document](https://skmtc.dev/kong/apis/konnect-api/revisions/5da43f6209ea?raw)
