GET
/
v1
/
rai
/
policies
curl --request GET \
  --url https://rai-prod.studio.lyzr.ai/v1/rai/policies \
  --header 'x-api-key: <api-key>'
{
  "policies": [
    {
      "_id": "<string>",
      "name": "<string>",
      "description": "<string>",
      "allowed_topics": {
        "enabled": true,
        "topics": [
          "<string>"
        ]
      },
      "banned_topics": {
        "enabled": true,
        "topics": [
          "<string>"
        ]
      },
      "keywords": {
        "enabled": true,
        "keywords": [
          "<string>"
        ]
      },
      "toxicity_check": {
        "enabled": true,
        "threshold": 123
      },
      "prompt_injection": {
        "enabled": true,
        "threshold": 123
      },
      "secrets_detection": {
        "enabled": true,
        "action": "<string>"
      },
      "pii_detection": {
        "enabled": true,
        "types": {},
        "custom_pii": [
          "<string>"
        ]
      },
      "user_id": "<string>",
      "created_at": "2023-11-07T05:31:56Z",
      "updated_at": "2023-11-07T05:31:56Z"
    }
  ]
}

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

curl -X GET "https://rai-prod.studio.lyzr.ai/v1/rai/policies" \
-H "accept: application/json" \
-H "x-api-key: sk-default-REDACTED"

Authorizations

x-api-key
string
header
required

Response

200
application/json

Successful Response

The response is of type object.