Evaluate a retrieval
curl --request POST \
--url https://api.visiqlabs.com/recall/evaluate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"agent_id": "support-bot",
"operation": "retrieve",
"resource_type": "document",
"resource_metadata": {
"classification": "confidential"
},
"trust_tier": "tier2"
}
'import requests
url = "https://api.visiqlabs.com/recall/evaluate"
payload = {
"agent_id": "support-bot",
"operation": "retrieve",
"resource_type": "document",
"resource_metadata": { "classification": "confidential" },
"trust_tier": "tier2"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
agent_id: 'support-bot',
operation: 'retrieve',
resource_type: 'document',
resource_metadata: {classification: 'confidential'},
trust_tier: 'tier2'
})
};
fetch('https://api.visiqlabs.com/recall/evaluate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.visiqlabs.com/recall/evaluate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'agent_id' => 'support-bot',
'operation' => 'retrieve',
'resource_type' => 'document',
'resource_metadata' => [
'classification' => 'confidential'
],
'trust_tier' => 'tier2'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.visiqlabs.com/recall/evaluate"
payload := strings.NewReader("{\n \"agent_id\": \"support-bot\",\n \"operation\": \"retrieve\",\n \"resource_type\": \"document\",\n \"resource_metadata\": {\n \"classification\": \"confidential\"\n },\n \"trust_tier\": \"tier2\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.visiqlabs.com/recall/evaluate")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"agent_id\": \"support-bot\",\n \"operation\": \"retrieve\",\n \"resource_type\": \"document\",\n \"resource_metadata\": {\n \"classification\": \"confidential\"\n },\n \"trust_tier\": \"tier2\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.visiqlabs.com/recall/evaluate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"agent_id\": \"support-bot\",\n \"operation\": \"retrieve\",\n \"resource_type\": \"document\",\n \"resource_metadata\": {\n \"classification\": \"confidential\"\n },\n \"trust_tier\": \"tier2\"\n}"
response = http.request(request)
puts response.read_body{
"decision_id": "7c1f2a3b-4d5e-6f70-8192-a3b4c5d6e7f8",
"decision": "redact",
"reason_code": "SURFACE_RESTRICTION",
"reason": "Field-level masking applied",
"redaction_rules": [
{
"path": "ssn",
"strategy": "mask"
}
]
}{
"error": "Invalid request body",
"details": [
{
"path": [
"agent_id"
],
"message": "Required"
}
]
}{
"error": "Unauthorized"
}{
"error": "insufficient_scope",
"detail": "This API key is not authorized for the requested operation."
}Evaluation
Evaluate a retrieval
Evaluate a retrieval, tool call, or prompt render against your retrieval-governance rules and return the enforced decision (with mask directives when the decision is redact).
Requires scope rules:evaluate (or the legacy recall:write).
POST
/
recall
/
evaluate
Evaluate a retrieval
curl --request POST \
--url https://api.visiqlabs.com/recall/evaluate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"agent_id": "support-bot",
"operation": "retrieve",
"resource_type": "document",
"resource_metadata": {
"classification": "confidential"
},
"trust_tier": "tier2"
}
'import requests
url = "https://api.visiqlabs.com/recall/evaluate"
payload = {
"agent_id": "support-bot",
"operation": "retrieve",
"resource_type": "document",
"resource_metadata": { "classification": "confidential" },
"trust_tier": "tier2"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
agent_id: 'support-bot',
operation: 'retrieve',
resource_type: 'document',
resource_metadata: {classification: 'confidential'},
trust_tier: 'tier2'
})
};
fetch('https://api.visiqlabs.com/recall/evaluate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.visiqlabs.com/recall/evaluate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'agent_id' => 'support-bot',
'operation' => 'retrieve',
'resource_type' => 'document',
'resource_metadata' => [
'classification' => 'confidential'
],
'trust_tier' => 'tier2'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.visiqlabs.com/recall/evaluate"
payload := strings.NewReader("{\n \"agent_id\": \"support-bot\",\n \"operation\": \"retrieve\",\n \"resource_type\": \"document\",\n \"resource_metadata\": {\n \"classification\": \"confidential\"\n },\n \"trust_tier\": \"tier2\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.visiqlabs.com/recall/evaluate")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"agent_id\": \"support-bot\",\n \"operation\": \"retrieve\",\n \"resource_type\": \"document\",\n \"resource_metadata\": {\n \"classification\": \"confidential\"\n },\n \"trust_tier\": \"tier2\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.visiqlabs.com/recall/evaluate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"agent_id\": \"support-bot\",\n \"operation\": \"retrieve\",\n \"resource_type\": \"document\",\n \"resource_metadata\": {\n \"classification\": \"confidential\"\n },\n \"trust_tier\": \"tier2\"\n}"
response = http.request(request)
puts response.read_body{
"decision_id": "7c1f2a3b-4d5e-6f70-8192-a3b4c5d6e7f8",
"decision": "redact",
"reason_code": "SURFACE_RESTRICTION",
"reason": "Field-level masking applied",
"redaction_rules": [
{
"path": "ssn",
"strategy": "mask"
}
]
}{
"error": "Invalid request body",
"details": [
{
"path": [
"agent_id"
],
"message": "Required"
}
]
}{
"error": "Unauthorized"
}{
"error": "insufficient_scope",
"detail": "This API key is not authorized for the requested operation."
}Authorizations
A VisIQ API key presented as Authorization: Bearer vq_prod_.... Mint keys under Connectors -> API Keys in the dashboard.
Body
application/json
Required string length:
1 - 255Available options:
retrieve, tool_call, prompt_render Required string length:
1 - 255Maximum string length:
50Maximum string length:
100Maximum string length:
2000Required string length:
1 - 255Response
The enforced decision.
Monitor mode normalizes any non-allow engine outcome to allow.
Available options:
allow, deny, redact, escalate Present only when decision is redact — the mask directives to apply.
Present only when decision is escalate.
Available options:
mask ⌘I