POST /analyze Analyze an existing OTel trace
Input Raw OTel trace JSON as the request body
Output { output, prescription_count, prescriptions[] }
curl
curl -X POST https://api.usewhisker.dev/analyze \
  -H "Content-Type: application/json" \
  --data-binary @your-trace.json
POST /generate Generate a trace from a prompt and analyze it
Input { "prompt": "research best EVs under $40k" }
Output { output, prescription_count, prescriptions[], trace_json, agent_response }
curl
curl -X POST https://api.usewhisker.dev/generate \
  -H "Content-Type: application/json" \
  -d '{"prompt": "research best EVs under $40k"}'
GET /health Health check
Output { "status": "ok" }

/analyze and /generate

output string
Full plain-text prescription report, formatted for display.
prescription_count integer
Number of prescriptions found. Zero means no issues detected.
prescriptions array
Structured list of prescription objects. See shape below.
trace_json object  ·  /generate only
The OTel trace that was generated by the agent run. Useful for inspection or re-analysis.
agent_response string  ·  /generate only
The final text output produced by the agent for the given prompt.

Prescription

JSON
{
  "id":           1,
  "type":         "context_bloat",
  "title":        "Context Bloat Detected",
  "source":       "rule",
  "description":  "LLM call #3 received 4.2x more input tokens than call #2.",
  "fix":          "Trim or summarize tool output before injecting into the next prompt.",
  "likely_cause": "A tool result was injected into the prompt unfiltered."
}
id integer
Sequential index starting at 1.
type string
Snake_case identifier, e.g. context_bloat, cascade_failure, ai_finding.
title string
Human-readable prescription name.
source string
"rule" for deterministic detectors, "llm" for AI-powered findings.
description string
Specific detail about what was detected in the trace.
fix string
Actionable recommendation — what to change and how.
likely_cause string  ·  optional
Root cause explanation. Omitted from the response when empty.