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

FieldTypeRequiredDescription
promptstringYesThe input/prompt that produced the response.
responsestringYesThe model output to evaluate.
modelstringNoModel identifier, for reporting (e.g. gpt-4o).
contextstringNoGround-truth/source for hallucination checks.
metadataobjectNoArbitrary 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

EndpointPurpose
GET /api/audit-trailsList/filter audit records.
GET /api/audit-trails/{request_id}/detailFull record for one evaluation.
POST /api/audit-trails/{request_id}/intelligenceGenerate the AI Risk Thesis.
POST /api/reports/generate-pdfProduce a PDF compliance report.

Errors & rate limits

StatusMeaning
401Missing/invalid API key.
422Malformed request body.
429Quota exceeded or rate limited — back off and retry.
5xxTransient server error — retry with exponential backoff.
Was this page helpful?