Skip to main content
POST
Create Policy
POST /v1/rai/policies
Create a new Responsible AI (RAI) policy.

Description

This endpoint allows creating a new RAI policy including configuration for topics, keywords, toxicity checks, prompt injection protection, and PII/secrets detection.

Request

Headers
  • x-api-key: API key for authentication (required)
  • Content-Type: application/json
Request Body

Response

200 OK

422 Unprocessable Entity

Curl Example

Authorizations

x-api-key
string
header
required

Body

application/json
name
string
description
string
allowed_topics
object
banned_topics
object
keywords
object
toxicity_check
object
prompt_injection
object
secrets_detection
object
pii_detection
object
user_id
string
created_at
string<date-time>
updated_at
string<date-time>

Response

Successful Response

_id
string
name
string
description
string
allowed_topics
object
banned_topics
object
keywords
object
toxicity_check
object
prompt_injection
object
secrets_detection
object
pii_detection
object
user_id
string
created_at
string<date-time>
updated_at
string<date-time>