Quickstart
Install the SDK, get an API key, and make your first trust evaluation in under five minutes.
Prerequisites
- Python 3.10+ (or any HTTP client for the REST API)
- A VeldrixAI account — sign up free (1,000 evaluations/month, no card required)
1. Install the SDK
PythonNode
pip install veldrixai
2. Get an API key
Create a key in the dashboard under Settings → API Keys. Keys are environment-scoped:
vx-live-...— production traffic, counts against your quota.vx-test-...— sandbox traffic for development.
Keys are shown only once at creation. Store them in a secret manager or environment variable — never commit them to source control.
3. Your first evaluation
Send a prompt and the model's response. VeldrixAI returns a TrustResult.
PythonNode
import veldrixai
client = veldrixai.Veldrix(api_key="vx-live-...")
result = client.evaluate_sync(
prompt="Summarize the patient's medical history.",
response="John Smith (DOB 1985-03-12) has stage 2 hypertension.",
)
print(result.overall) # 0.34 (0 = unsafe, 1 = safe)
print(result.verdict) # "BLOCK"
print(result.pillar_scores) # {"safety": 0.95, "compliance": 0.12, ...}
print(result.critical_flags) # ["pii_detected"]
4. Reading the result
The Python SDK normalises everything to a 0–1 scale where higher is safer.
| Field | Type | Description |
|---|---|---|
overall | float 0–1 | Weighted aggregate trust score. |
verdict | string | ALLOW · WARN · REVIEW · BLOCK |
pillar_scores | dict | Per-pillar score, e.g. {"safety": 0.95}. |
critical_flags | list | Flags that force a hard block (injection, PII, etc.). |
request_id | string | Stable id; use it to look up the audit record. |
latency_ms | int | End-to-end evaluation latency. |
5. Guard your LLM calls
For production, wrap your generation function with @guard. By default it evaluates in the background (zero added latency); set block_on_verdict to raise on dangerous output.
Python
from veldrixai import Veldrix, GuardConfig
veldrix = Veldrix(api_key="vx-live-...")
@veldrix.guard(config=GuardConfig(block_on_verdict=["BLOCK"]))
def answer(prompt: str) -> str:
return my_llm.complete(prompt) # raises VeldrixBlocked if the output is BLOCK
Next: learn how scores become verdicts in Core Concepts, or shape enforcement in the Policy Engine.
Was this page helpful?