Playground analysis
curl --request POST \
--url https://api.valiqor.com/v2/failure-analysis/playground \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"context": "France is a country in Western Europe. Its capital is Paris.",
"input": "What is the capital of France?",
"output": "The capital of France is Berlin."
}
'import requests
url = "https://api.valiqor.com/v2/failure-analysis/playground"
payload = {
"context": "France is a country in Western Europe. Its capital is Paris.",
"input": "What is the capital of France?",
"output": "The capital of France is Berlin."
}
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({
context: 'France is a country in Western Europe. Its capital is Paris.',
input: 'What is the capital of France?',
output: 'The capital of France is Berlin.'
})
};
fetch('https://api.valiqor.com/v2/failure-analysis/playground', 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.valiqor.com/v2/failure-analysis/playground",
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([
'context' => 'France is a country in Western Europe. Its capital is Paris.',
'input' => 'What is the capital of France?',
'output' => 'The capital of France is Berlin.'
]),
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.valiqor.com/v2/failure-analysis/playground"
payload := strings.NewReader("{\n \"context\": \"France is a country in Western Europe. Its capital is Paris.\",\n \"input\": \"What is the capital of France?\",\n \"output\": \"The capital of France is Berlin.\"\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.valiqor.com/v2/failure-analysis/playground")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"context\": \"France is a country in Western Europe. Its capital is Paris.\",\n \"input\": \"What is the capital of France?\",\n \"output\": \"The capital of France is Berlin.\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.valiqor.com/v2/failure-analysis/playground")
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 \"context\": \"France is a country in Western Europe. Its capital is Paris.\",\n \"input\": \"What is the capital of France?\",\n \"output\": \"The capital of France is Berlin.\"\n}"
response = http.request(request)
puts response.read_body{
"run_id": "<string>",
"summary": {
"primary_failure": "<string>",
"primary_failure_name": "<string>",
"overall_severity": 0,
"overall_confidence": 0,
"total_failures_detected": 0,
"total_passes": 0,
"total_uncertain": 0,
"total_items": 0,
"items_with_failures": 0,
"items_all_passed": 0,
"buckets_affected": [
"<string>"
],
"should_alert": false,
"should_gate_ci": false,
"needs_human_review": false
},
"failure_tags": [
{
"tag_id": "<string>",
"bucket_id": "<string>",
"bucket_name": "<string>",
"subcategory_id": "<string>",
"subcategory_name": "<string>",
"decision": "<string>",
"severity": 2.5,
"confidence": 0.5,
"detector_type_used": "<string>",
"scoring_breakdown": {
"impact": 123,
"risk": 123,
"final_severity": 123,
"final_confidence": 123,
"frequency_weight": 1,
"security_override": "<string>",
"deterministic_weight": 0,
"judge_weight": 0,
"security_weight": 0,
"metric_agreement_bonus": 0,
"disagreement_penalty": 0
},
"item_index": 123,
"judge_rationale": "<string>",
"eval_metric_values": {},
"evidence_items": [
{
"item_id": "<string>",
"evidence_type": "<string>",
"description": "<string>",
"source": "<string>",
"content_snippet": "<string>",
"confidence": 1,
"metadata": {}
}
]
}
],
"checks_passed": 123,
"duration_ms": 123,
"security_flags": {},
"playground_runs_today": 0,
"playground_limit_per_day": 10
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Failure Analysis
Playground analysis
Lightweight single-item failure analysis for dashboard playground
POST
/
v2
/
failure-analysis
/
playground
Playground analysis
curl --request POST \
--url https://api.valiqor.com/v2/failure-analysis/playground \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"context": "France is a country in Western Europe. Its capital is Paris.",
"input": "What is the capital of France?",
"output": "The capital of France is Berlin."
}
'import requests
url = "https://api.valiqor.com/v2/failure-analysis/playground"
payload = {
"context": "France is a country in Western Europe. Its capital is Paris.",
"input": "What is the capital of France?",
"output": "The capital of France is Berlin."
}
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({
context: 'France is a country in Western Europe. Its capital is Paris.',
input: 'What is the capital of France?',
output: 'The capital of France is Berlin.'
})
};
fetch('https://api.valiqor.com/v2/failure-analysis/playground', 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.valiqor.com/v2/failure-analysis/playground",
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([
'context' => 'France is a country in Western Europe. Its capital is Paris.',
'input' => 'What is the capital of France?',
'output' => 'The capital of France is Berlin.'
]),
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.valiqor.com/v2/failure-analysis/playground"
payload := strings.NewReader("{\n \"context\": \"France is a country in Western Europe. Its capital is Paris.\",\n \"input\": \"What is the capital of France?\",\n \"output\": \"The capital of France is Berlin.\"\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.valiqor.com/v2/failure-analysis/playground")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"context\": \"France is a country in Western Europe. Its capital is Paris.\",\n \"input\": \"What is the capital of France?\",\n \"output\": \"The capital of France is Berlin.\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.valiqor.com/v2/failure-analysis/playground")
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 \"context\": \"France is a country in Western Europe. Its capital is Paris.\",\n \"input\": \"What is the capital of France?\",\n \"output\": \"The capital of France is Berlin.\"\n}"
response = http.request(request)
puts response.read_body{
"run_id": "<string>",
"summary": {
"primary_failure": "<string>",
"primary_failure_name": "<string>",
"overall_severity": 0,
"overall_confidence": 0,
"total_failures_detected": 0,
"total_passes": 0,
"total_uncertain": 0,
"total_items": 0,
"items_with_failures": 0,
"items_all_passed": 0,
"buckets_affected": [
"<string>"
],
"should_alert": false,
"should_gate_ci": false,
"needs_human_review": false
},
"failure_tags": [
{
"tag_id": "<string>",
"bucket_id": "<string>",
"bucket_name": "<string>",
"subcategory_id": "<string>",
"subcategory_name": "<string>",
"decision": "<string>",
"severity": 2.5,
"confidence": 0.5,
"detector_type_used": "<string>",
"scoring_breakdown": {
"impact": 123,
"risk": 123,
"final_severity": 123,
"final_confidence": 123,
"frequency_weight": 1,
"security_override": "<string>",
"deterministic_weight": 0,
"judge_weight": 0,
"security_weight": 0,
"metric_agreement_bonus": 0,
"disagreement_penalty": 0
},
"item_index": 123,
"judge_rationale": "<string>",
"eval_metric_values": {},
"evidence_items": [
{
"item_id": "<string>",
"evidence_type": "<string>",
"description": "<string>",
"source": "<string>",
"content_snippet": "<string>",
"confidence": 1,
"metadata": {}
}
]
}
],
"checks_passed": 123,
"duration_ms": 123,
"security_flags": {},
"playground_runs_today": 0,
"playground_limit_per_day": 10
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Valiqor API key. Pass as Bearer token: Authorization: Bearer vq-xxxxxxxxxxxxxxxxxxxx
Body
application/json
Request for lightweight single-item failure analysis from dashboard playground.
Security limits:
- input: 2000 chars max (typical user prompts are <500)
- output: 5000 chars max (enough for most responses)
- context: 5000 chars max (sufficient for RAG demo)
- Combined token budget: 4000 tokens max (checked at runtime)
User prompt/query (max 2000 chars)
Maximum string length:
2000AI response to analyze (max 5000 chars)
Maximum string length:
5000Retrieved documents or system prompt (max 5000 chars)
Maximum string length:
5000Tool invocations with outputs (max 5)
Maximum array length:
5Response
Successful Response
Response from playground analysis - simplified for dashboard UI.
Summary of failure analysis results.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Number of checks that passed (for showing thoroughness)
Show child attributes
Show child attributes
Number of playground runs used today
Daily playground run limit
⌘I