Delete an AI Gateway Model

Removes a specific AI Gateway model.

delete

Path Parameters

gatewayIdstring(uuid)requiredread-only

Contains a unique identifier used for this resource.

Example:bf138ba2-c9b1-4229-b268-04d9d8a6410b

modelIdstring(uuid)requiredread-only

Contains a unique identifier used for this resource.

Example:bf138ba2-c9b1-4229-b268-04d9d8a6410b

Response

Model deleted successfully.

delete/ai-gateways/{gatewayId}/models/{modelId}
 

AI Gateway Policies

Policies that control security, rate-limiting, and guardrail behavior for the AI Gateway.

List AI Gateway Policies

Returns a list of policies configured for the AI Gateway.

get

Query Parameters

page[size]integer

The maximum number of items to include per page. The last page of a collection may include fewer items.

Example:10

page[after]string

Request the next page of data, starting with the item after this parameter.

Example:ewogICJpZCI6ICJoZWxsbyB3b3JsZCIKfQ

Path Parameters

gatewayIdstring(uuid)requiredread-only

Contains a unique identifier used for this resource.

Example:bf138ba2-c9b1-4229-b268-04d9d8a6410b

Response

application/json

A successful response listing AI Gateway Policies.

dataarray[object]required
* Additional properties are NOT allowed.
Show Child Parameters
metaobjectrequired

Pagination metadata.

Show Child Parameters
get/ai-gateways/{gatewayId}/policies
 
application/json

Create an AI Gateway Policy

Registers a new policy for the AI Gateway.

post

Path Parameters

gatewayIdstring(uuid)requiredread-only

Contains a unique identifier used for this resource.

Example:bf138ba2-c9b1-4229-b268-04d9d8a6410b

Body

application/json

CreateAIGatewayPolicyRequest

* Additional properties are NOT allowed.
display_namestringrequired

The display name for this policy instance.

Example:My Cool AI PII Sanitizer Policy

refstringrequired

A user-defined unique identifier for this policy instance, used as a stable human-readable reference.

Example:ai-pii-sanitizer-1234

typestringrequired

The type of the policy. Some examples are: ‘ai-sanitizer’, ‘ai-prompt-guard’,
and ‘openid-connect’.

Example:ai-sanitizer

enabledbooleanrequired

Whether the policy is enabled.

Example:true

configobjectrequired

Configuration for the policy. The structure varies depending on the policy type.

Example:{"anonymize":["phone","creditcard"],"stop_on_error":true}

* Additional properties are allowed.
labelsobject

Public labels store information about an entity that can be used for filtering a list of objects.

Public labels are intended to store PUBLIC metadata.

Keys must be of length 1-63 characters, and cannot start with “kong”, “konnect”, “mesh”, “kic”, or “_”.

Example:{"category":"finance"}

managed_byobject | null

Indicates the managing entities for a resource. A maximum of 5 keys is allowed.

Keys must be 63 characters or less, starting and ending with an alphanumeric character,
and may include dashes (-), underscores (_), and dots (.).

Values must be non-empty strings of 127 characters or less.

Keys and values must not contain spaces or control characters, and are case-insensitive.

Example:{"team":"platform","owner":"kong"}

Response

application/json

Policy created successfully.

AIGatewayPolicy

* Additional properties are NOT allowed.
display_namestringrequired

The display name for this policy instance.

Example:My Cool AI PII Sanitizer Policy

refstringrequired

A user-defined unique identifier for this policy instance, used as a stable human-readable reference.

Example:ai-pii-sanitizer-1234

typestringrequired

The type of the policy. Some examples are: ‘ai-sanitizer’, ‘ai-prompt-guard’,
and ‘openid-connect’.

Example:ai-sanitizer

enabledbooleanrequired

Whether the policy is enabled.

Example:true

configobjectrequired

Configuration for the policy. The structure varies depending on the policy type.

Example:{"anonymize":["phone","creditcard"],"stop_on_error":true}

* Additional properties are allowed.
labelsobject

Public labels store information about an entity that can be used for filtering a list of objects.

Public labels are intended to store PUBLIC metadata.

Keys must be of length 1-63 characters, and cannot start with “kong”, “konnect”, “mesh”, “kic”, or “_”.

Example:{"category":"finance"}

managed_byobject | null

Indicates the managing entities for a resource. A maximum of 5 keys is allowed.

Keys must be 63 characters or less, starting and ending with an alphanumeric character,
and may include dashes (-), underscores (_), and dots (.).

Values must be non-empty strings of 127 characters or less.

Keys and values must not contain spaces or control characters, and are case-insensitive.

Example:{"team":"platform","owner":"kong"}

idstring(uuid)requiredread-only

Contains a unique identifier used for this resource.

Example:5f9fd312-a987-4628-b4c5-bb4f4fddd5f7

created_atstring(date-time)requiredread-only

An ISO-8601 timestamp representation of entity creation date.

Example:2022-11-04T20:10:06.927Z

updated_atstring(date-time)requiredread-only

An ISO-8601 timestamp representation of entity update date.

Example:2022-11-04T20:10:06.927Z

post/ai-gateways/{gatewayId}/policies

Body

{ "display_name": "My Cool AI PII Sanitizer Policy", "ref": "ai-pii-sanitizer-1234", "type": "ai-sanitizer", "enabled": true, "config": { "anonymize": [ "phone", "creditcard" ], "stop_on_error": true } }
 
application/json

Get an AI Gateway Policy

Returns the details of a specific AI Gateway policy.

get

Path Parameters

gatewayIdstring(uuid)requiredread-only

Contains a unique identifier used for this resource.

Example:bf138ba2-c9b1-4229-b268-04d9d8a6410b

policyIdstring(uuid)requiredread-only

Contains a unique identifier used for this resource.

Example:bf138ba2-c9b1-4229-b268-04d9d8a6410b

Response

application/json

A successful response returning the AI Gateway Policy.

AIGatewayPolicy

* Additional properties are NOT allowed.
display_namestringrequired

The display name for this policy instance.

Example:My Cool AI PII Sanitizer Policy

refstringrequired

A user-defined unique identifier for this policy instance, used as a stable human-readable reference.

Example:ai-pii-sanitizer-1234

typestringrequired

The type of the policy. Some examples are: ‘ai-sanitizer’, ‘ai-prompt-guard’,
and ‘openid-connect’.

Example:ai-sanitizer

enabledbooleanrequired

Whether the policy is enabled.

Example:true

configobjectrequired

Configuration for the policy. The structure varies depending on the policy type.

Example:{"anonymize":["phone","creditcard"],"stop_on_error":true}

* Additional properties are allowed.
labelsobject

Public labels store information about an entity that can be used for filtering a list of objects.

Public labels are intended to store PUBLIC metadata.

Keys must be of length 1-63 characters, and cannot start with “kong”, “konnect”, “mesh”, “kic”, or “_”.

Example:{"category":"finance"}

managed_byobject | null

Indicates the managing entities for a resource. A maximum of 5 keys is allowed.

Keys must be 63 characters or less, starting and ending with an alphanumeric character,
and may include dashes (-), underscores (_), and dots (.).

Values must be non-empty strings of 127 characters or less.

Keys and values must not contain spaces or control characters, and are case-insensitive.

Example:{"team":"platform","owner":"kong"}

idstring(uuid)requiredread-only

Contains a unique identifier used for this resource.

Example:5f9fd312-a987-4628-b4c5-bb4f4fddd5f7

created_atstring(date-time)requiredread-only

An ISO-8601 timestamp representation of entity creation date.

Example:2022-11-04T20:10:06.927Z

updated_atstring(date-time)requiredread-only

An ISO-8601 timestamp representation of entity update date.

Example:2022-11-04T20:10:06.927Z

get/ai-gateways/{gatewayId}/policies/{policyId}
 
application/json