Quick Start
Get SentinelAI running in under 60 seconds
Quick Start
Get SentinelAI running in under 60 seconds.
1. Install
pip install sentinelai-risk2. Verify a response
from sentinelai import SentinelAIClient
client = SentinelAIClient(api_key="sk_...")
prompt = "What was Q3 revenue?"
llm_output = "Revenue grew 45% year over year."
result = client.verify(prompt=prompt, response=llm_output)
if result["status"] == "hallucinated":
print(result["corrected"]) # serve the fix, not the flaw
else:
print(result["score"], result["claims"])That's it. Every response is now scored, explained, and protected.
3. What you get back
verify() returns a dict with:
score— a number from 0 (safe) to 100 (critical risk)status—trusted(0–24),needs_review(25–59), orhallucinated(60–100)claims— detector-level findings with severity and notecorrected— the cleaned response, present when correction appliesdecision/action_taken— what the policy engine decided and did
Built-in retries, timeouts, and error handling are included. If the API is
unreachable, the SDK returns a safe allow fallback instead of crashing your
request path.