Skip to main content
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."
}
'
{
  "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
}

Authorizations

Authorization
string
header
required

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)
input
string
required

User prompt/query (max 2000 chars)

Maximum string length: 2000
output
string
required

AI response to analyze (max 5000 chars)

Maximum string length: 5000
context
string | null

Retrieved documents or system prompt (max 5000 chars)

Maximum string length: 5000
tool_calls
Tool Calls · object[] | null

Tool invocations with outputs (max 5)

Maximum array length: 5

Response

Successful Response

Response from playground analysis - simplified for dashboard UI.

run_id
string
required
summary
FailureSummary · object
required

Summary of failure analysis results.

failure_tags
FailureTagResponse · object[]
required
checks_passed
integer
required

Number of checks that passed (for showing thoroughness)

duration_ms
integer
required
security_flags
Security Flags · object
playground_runs_today
integer
default:0

Number of playground runs used today

playground_limit_per_day
integer
default:10

Daily playground run limit