Deploy Guardrails API¶
This API deploys predefined guardrails to enhance security, compliance, and content moderation in AI interactions. These guardrails act as filters or constraints to ensure safe and appropriate AI responses.
Users can deploy a specific guardrail from a predefined set of options, including:
- Anonymization
- Ban Topics
- Prompt Injection Prevention
- Toxicity Detection
- Bias Detection
- Relevance Filtering
Once deployed, the selected guardrail becomes active, regulating interactions within the environment.
The API response includes the model ID and the guardrail deployment status. After receiving the response, use the dockStatusId
to call the Get Dock Status API and verify the successful deployment of the guardrail.
Method | POST |
Endpoint | https://{host}/api/public/guardrails/deploy
|
Content Type | application/json |
Authorization | X-api-key - The API key used for authentication.
|
Where can I find the API key? Learn more.
Path Parameters¶
PARAMETER | DESCRIPTION | TYPE | REQUIRED/OPTIONAL | ENUM VALUES |
host | The environment URL. For example, https://gale.kore.ai .
|
String | Required |
The allowed guardrails include:
|
Sample Request¶
curl --location 'https://dev-axxxxt-plxxxxxxm.kore.ai/api/public/guardrails/deploy' \
--header 'x-api-key: kg-axxxxxxx-5xx3-5xx8-bxxxxxx-5xxb-4xxb-9xx5-cxxxxxxxxx3' \
--header 'Content-Type: application/json' \
--data '{"name": "Ban topics"}'
Body Parameters¶
PARAMETER | DESCRIPTION | TYPE | REQUIRED/OPTIONAL |
name | The name of the guardrail you want to deploy. | Enum | Required |
Sample Response¶
{
"dock-statusId": "ds-d0xxxxxd-bxx9-5xx0-8xx5-5bxxxxxxxxx1",
"modelId": "cm-77xxxxxb-exx9-5xxc-8xx6-5xxxxxxxxxx1",
"jobType": "GUARDRAILS",
"action": "DEPLOY",
"status": "SUCCESS"
}
Response Parameters¶
PARAMETER | DESCRIPTION | TYPE |
dockStatusId | The unique identifier to track the status of model deployment. | String |
modelId | The unique identifier for the model. | String |
jobType | Type of job being performed (e.g: "GUARDRAIL"). | String |
action | The action performed on the model, i.e. "DEPLOY". | String |
status | The current status of the job ("SUCCESS", "IN_PROGRESS", or "FAILED"). | String |