Deep Dive
Build Paths
- Studio (No-code Interface)
- Lyzr Developer API (Programmatic Access)
Tools
- Studio
- API Endpoints
Responsible & Safe AI
RAG
- Overview
- API Endpoints
Orchestration
Manager Agent
API Endpoints
Get RAI Policies
Get all RAI policies for the authenticated user.
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
Response
200
application/json
Successful Response
The response is of type object
.
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"
}
]
}
Assistant
Responses are generated using AI and may contain mistakes.