Guardrails APIs
Guardrails Relevancy
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
Guardrails Relevancy
POST
/
guardrails
/
relevancy
curl --request POST \
--url https://api.enkryptai.com/guardrails/relevancy \
--header 'Content-Type: application/json' \
--header 'apikey: <api-key>' \
--data '{
"question": "What is CV Raman known for?",
"llm_answer": "C.V. Raman won the Nobel Prize for Physics in 1930 for his work on light scattering"
}'
{
"relevancy_score": 1
}
Authorizations
Response
200 - application/json
Successful Response
Overall relevancy score between 0 and 1
Required range:
0 <= x <= 1
curl --request POST \
--url https://api.enkryptai.com/guardrails/relevancy \
--header 'Content-Type: application/json' \
--header 'apikey: <api-key>' \
--data '{
"question": "What is CV Raman known for?",
"llm_answer": "C.V. Raman won the Nobel Prize for Physics in 1930 for his work on light scattering"
}'
{
"relevancy_score": 1
}