Guardrails API Documentation
Guardrails APIs
- GETHealth Check
- GETStatus Check
- GETModels Loaded
- POSTGuardrails Detect
- POSTGuardrails Batch Detect
- POSTPII anonymization and de-anonymization
- POSTDetect Hallucination
- POSTGuardrails Adherence
- POSTGuardrails Relevancy
- POSTAdd Policy
- GETGet Policy
- PATCHModify Policy
- DELDelete Policy
- GETList Policies
- POSTDetect with Policy
Guardrails APIs
Detect Hallucination
POST
/
guardrails
/
hallucination
curl --request POST \
--url https://api.enkryptai.com/guardrails/hallucination \
--header 'Content-Type: application/json' \
--header 'apikey: <api-key>' \
--data '{
"request_text": "What is the capital of France?",
"response_text": "Tokyo is the capital of France.",
"context": ""
}'
{
"summary": {
"is_hallucination": 1
},
"details": {
"prompt_based": 1
}
}
Authorizations
Body
application/json
Response
200 - application/json
Successful Response
The response is of type object
.
curl --request POST \
--url https://api.enkryptai.com/guardrails/hallucination \
--header 'Content-Type: application/json' \
--header 'apikey: <api-key>' \
--data '{
"request_text": "What is the capital of France?",
"response_text": "Tokyo is the capital of France.",
"context": ""
}'
{
"summary": {
"is_hallucination": 1
},
"details": {
"prompt_based": 1
}
}
Assistant
Responses are generated using AI and may contain mistakes.