> ## Documentation Index
> Fetch the complete documentation index at: https://docs.lyzr.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Get RAI Policies

> Get all RAI policies for the authenticated user.

### Endpoint

**GET** `/v1/rai/policies`

### Description

Fetches all RAI policies for the authenticated user.

### Base URL

`https://rai-prod.studio.lyzr.ai`

### Authentication

API Key (`x-api-key`) must be included in the header.

### Curl Request

```bash theme={null}
curl -X GET "https://rai-prod.studio.lyzr.ai/v1/rai/policies" \
-H "accept: application/json" \
-H "x-api-key: sk-default-REDACTED"

```


## OpenAPI

````yaml get /v1/rai/policies
openapi: 3.0.3
info:
  title: RAI Policy API
  version: 1.0.0
  description: Retrieve all RAI policies for the authenticated user.
servers:
  - url: https://rai-prod.studio.lyzr.ai
security: []
paths:
  /v1/rai/policies:
    get:
      tags:
        - RAI
      summary: Get Policies By User
      description: Get all RAI policies for the authenticated user.
      operationId: getPolicies
      parameters: []
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  policies:
                    type: array
                    items:
                      type: object
                      properties:
                        _id:
                          type: string
                        name:
                          type: string
                        description:
                          type: string
                        allowed_topics:
                          type: object
                          properties:
                            enabled:
                              type: boolean
                            topics:
                              type: array
                              items:
                                type: string
                        banned_topics:
                          type: object
                          properties:
                            enabled:
                              type: boolean
                            topics:
                              type: array
                              items:
                                type: string
                        keywords:
                          type: object
                          properties:
                            enabled:
                              type: boolean
                            keywords:
                              type: array
                              items:
                                type: string
                        toxicity_check:
                          type: object
                          properties:
                            enabled:
                              type: boolean
                            threshold:
                              type: number
                        prompt_injection:
                          type: object
                          properties:
                            enabled:
                              type: boolean
                            threshold:
                              type: number
                        secrets_detection:
                          type: object
                          properties:
                            enabled:
                              type: boolean
                            action:
                              type: string
                        pii_detection:
                          type: object
                          properties:
                            enabled:
                              type: boolean
                            types:
                              type: object
                              additionalProperties:
                                type: string
                            custom_pii:
                              type: array
                              items:
                                type: string
                        user_id:
                          type: string
                        created_at:
                          type: string
                          format: date-time
                        updated_at:
                          type: string
                          format: date-time
        '401':
          description: Unauthorized
        '500':
          description: Internal Server Error
      security:
        - ApiKeyAuth: []
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

````