Python SDK
The official VeldrixAI Python SDK for synchronous and async evaluation.
Installation
pip install veldrixai
# Or with all extras:
pip install "veldrixai[langchain,crewai]"Initialize client
import veldrixai
# Uses VELDRIX_API_KEY env var if api_key not provided
client = veldrixai.Client(api_key="vx_live_...")Evaluate
result = client.evaluate(
prompt="What is the patient's diagnosis?",
response="Based on the records, Jane has Type 2 diabetes.",
pillars=["compliance", "safety"],
policy="hipaa-strict",
)
print(result.trust_score) # 0.41
print(result.action) # "mask"Async usage
import asyncio
import veldrixai
async def main():
client = veldrixai.AsyncClient(api_key="vx_live_...")
result = await client.evaluate(prompt="...", response="...")
return result
asyncio.run(main())Was this page helpful?