---
title: AI Security
---

[Skip to content](#%5Ftop) 

[API Reference](https://developers.cloudflare.com/api/typescript)

Copy Markdown

Open in **Claude**

Open in **ChatGPT**

Open in **Cursor**

---

**Copy Markdown**

**View as Markdown**

# AI Security

##### [Get the AI Security for Apps status for a zone.](https://developers.cloudflare.com/api/typescript/resources/ai%5Fsecurity/methods/get)

client.aiSecurity.get(AISecurityGetParams { zone\_id } params, RequestOptionsoptions?): [AISecurityGetResponse](https://developers.cloudflare.com/api/typescript/resources/ai%5Fsecurity#%28resource%29%20ai%5Fsecurity%20%3E%20%28model%29%20ai%5Fsecurity%5Fget%5Fresponse%20%3E%20%28schema%29) { enabled } 

GET/zones/{zone\_id}/ai-security/settings

##### [Update the AI Security for Apps status for a zone.](https://developers.cloudflare.com/api/typescript/resources/ai%5Fsecurity/methods/update)

client.aiSecurity.update(AISecurityUpdateParams { zone\_id, enabled } params, RequestOptionsoptions?): [AISecurityUpdateResponse](https://developers.cloudflare.com/api/typescript/resources/ai%5Fsecurity#%28resource%29%20ai%5Fsecurity%20%3E%20%28model%29%20ai%5Fsecurity%5Fupdate%5Fresponse%20%3E%20%28schema%29) { enabled } 

PUT/zones/{zone\_id}/ai-security/settings

##### ModelsExpand Collapse 

AISecurityGetResponse { enabled } 

AI Security for Apps enablement status for a zone.

enabled?: boolean

Whether AI Security for Apps is enabled on the zone.

AISecurityUpdateResponse { enabled } 

AI Security for Apps enablement status for a zone.

enabled?: boolean

Whether AI Security for Apps is enabled on the zone.

#### AI SecurityCustom Topics

##### [Get the AI Security for Apps custom topics of a zone.](https://developers.cloudflare.com/api/typescript/resources/ai%5Fsecurity/subresources/custom%5Ftopics/methods/get)

client.aiSecurity.customTopics.get(CustomTopicGetParams { zone\_id } params, RequestOptionsoptions?): [CustomTopicGetResponse](https://developers.cloudflare.com/api/typescript/resources/ai%5Fsecurity#%28resource%29%20ai%5Fsecurity.custom%5Ftopics%20%3E%20%28model%29%20custom%5Ftopic%5Fget%5Fresponse%20%3E%20%28schema%29) { topics } 

GET/zones/{zone\_id}/ai-security/custom-topics

##### [Update the AI Security for Apps custom topics of a zone.](https://developers.cloudflare.com/api/typescript/resources/ai%5Fsecurity/subresources/custom%5Ftopics/methods/update)

client.aiSecurity.customTopics.update(CustomTopicUpdateParams { zone\_id, topics } params, RequestOptionsoptions?): [CustomTopicUpdateResponse](https://developers.cloudflare.com/api/typescript/resources/ai%5Fsecurity#%28resource%29%20ai%5Fsecurity.custom%5Ftopics%20%3E%20%28model%29%20custom%5Ftopic%5Fupdate%5Fresponse%20%3E%20%28schema%29) { topics } 

PUT/zones/{zone\_id}/ai-security/custom-topics

##### ModelsExpand Collapse 

CustomTopicGetResponse { topics } 

topics?: Array<Topic\>

Custom topic categories for AI Security for Apps content detection.

label: string

Unique label identifier. Must contain only lowercase letters (a–z), digits (0–9), and hyphens.

maxLength20

minLength2

topic: string

Description of the topic category. Must contain only printable ASCII characters.

maxLength50

minLength2

CustomTopicUpdateResponse { topics } 

topics?: Array<Topic\>

Custom topic categories for AI Security for Apps content detection.

label: string

Unique label identifier. Must contain only lowercase letters (a–z), digits (0–9), and hyphens.

maxLength20

minLength2

topic: string

Description of the topic category. Must contain only printable ASCII characters.

maxLength50

minLength2