REST API
The language-agnostic HTTP interface to the Trust Engine.
Base URL & auth
Base URL: https://api.veldrixai.ca. Authenticate with a bearer token:
HTTP
Authorization: Bearer vx-live-...
Content-Type: application/json
x-veldrix-sla-tier: STANDARD # optional: REALTIME | STANDARD | BACKGROUND
POST /trust/evaluate
| Field | Type | Required | Description |
|---|---|---|---|
prompt | string | Yes | The input/prompt that produced the response. |
response | string | Yes | The model output to evaluate. |
model | string | No | Model identifier, for reporting (e.g. gpt-4o). |
context | string | No | Ground-truth/source for hallucination checks. |
metadata | object | No | Arbitrary tags stored with the audit record. |
cURL
curl https://api.veldrixai.ca/trust/evaluate \
-H "Authorization: Bearer vx-live-..." \
-H "Content-Type: application/json" \
-d '{
"prompt": "Summarize the patient record.",
"response": "John Smith, DOB 1985-03-12, has hypertension.",
"model": "gpt-4o"
}'
Response shape
JSON
{
"success": true,
"data": {
"request_id": "req_a1b2c3d4",
"final_score": { "value": 34.0, "confidence": 0.92, "risk_level": "high_risk" },
"pillar_results": {
"compliance": { "score": { "value": 12.0 }, "flags": ["pii_detected"] },
"safety": { "score": { "value": 95.0 }, "flags": [] }
},
"execution_time_ms": 312
}
}
REST scores are 0–100 (
final_score.value); the Python SDK normalizes to 0–1 (overall). risk_level corresponds to the verdict band.Audit & reports endpoints
| Endpoint | Purpose |
|---|---|
GET /api/audit-trails | List/filter audit records. |
GET /api/audit-trails/{request_id}/detail | Full record for one evaluation. |
POST /api/audit-trails/{request_id}/intelligence | Generate the AI Risk Thesis. |
POST /api/reports/generate-pdf | Produce a PDF compliance report. |
Errors & rate limits
| Status | Meaning |
|---|---|
401 | Missing/invalid API key. |
422 | Malformed request body. |
429 | Quota exceeded or rate limited — back off and retry. |
5xx | Transient server error — retry with exponential backoff. |
Was this page helpful?