cURL
Python
JavaScript
PHP
Go
Java
curl --request POST \
--url https://api.naviml.com/v1/{ team_id} /verify \
--header 'Content-Type: application/json' \
--data '{
"messages": [
{
"role": "user",
"content": "<string>"
}
],
"verifiers": [
{
"id": "<string>",
"type": "policy-verifier",
"parameters": {
"threshold": 0.5
}
}
],
"explain": true
}'
{
"request_id" : "3c90c3cc-0d44-4b50-8888-8dd25736052a" ,
"action" : "allow" ,
"result" : {
"verifiers" : [
{
"id" : "<string>" ,
"result" : "<string>" ,
"explanation" : {
"text" : "<string>"
} ,
"action" : "allow" ,
"details" : { } ,
"usage" : {
"prompt_tokens" : 123 ,
"completion_tokens" : 123 ,
"total_tokens" : 123
}
}
] ,
"action" : "allow"
}
}
This endpoint allows to run multiple verifiers against a single LLM response. The response will contain the result of each verifier and the final action based on the verifiers’ results.
Team ID of the team owning the resources and under which the verifiers are executed
List of messages to run verifiers against
Available options:
user
,
assistant
List of verifiers to execute with configurations
ID of the policy verifier in the system
Available options:
policy-verifier
verifiers.parameters. threshold
Threshold for the policy verifier
Required range: 0 <= x <= 1
Includes explanation for the result in response
Unique identifier for the request
Suggested action based on the result
Available options:
allow
,
modify
,
deny
Plaintext result of the verifier
Suggested action based on the result
Available options:
allow
,
modify
,
deny
result.verifiers. explanation
Object encapsulating explanation of the result
result.verifiers.explanation. text
Explanation of the result in plain text
Verifier specific execution details
Usage of tokens by the request
result.verifiers.usage. prompt_tokens
Number of tokens used for the prompt
result.verifiers.usage. completion_tokens
Number of tokens used for the completion
result.verifiers.usage. total_tokens
Total number of tokens used
Suggested action based on the result
Available options:
allow
,
modify
,
deny