Developer Overview
TruthVouch provides multiple integration paths for developers to add AI governance, hallucination detection, and fact-checking to applications.
Integration Paths
1. Drop-In SDK Replacement
The fastest way to get started. Install an SDK, initialize the client with your API key, and replace your LLM provider imports. All AI calls are automatically governed.
# Before: direct providerfrom openai import AsyncOpenAIclient = AsyncOpenAI()
# After: governed via TruthVouchfrom truthvouch import TruthVouchClientclient = TruthVouchClient( gateway_url="https://gateway.truthvouch.com", api_key="tv_live_...")
# Same API — zero code changes from hereresponse = await client.openai.chat.completions.create( model="gpt-4o", messages=[{"role": "user", "content": "What is TruthVouch?"}])Available SDKs:
- Python (
truthvouchon PyPI) - TypeScript/Node.js (
@truthvouch/sdkon npm) - .NET (
TruthVouch.Sdkon NuGet) - Go (Coming Soon)
- Java (Coming Soon)
2. REST API
Direct HTTP integration for any platform or language. Call our REST API endpoints to scan content, retrieve governance reports, and manage certifications.
Base URL: https://api.truthvouch.com/api/v1/
Authentication: Bearer token or API key in Authorization header
Response Format: JSON with standardized meta and error envelopes
curl -X POST https://api.truthvouch.com/api/v1/governance/scan \ -H "Authorization: Bearer tv_live_..." \ -H "Content-Type: application/json" \ -d '{"prompt":"...","response":"..."}'3. Webhooks
Real-time event notifications when alerts are created, corrections deployed, policies enforced, or certifications issued.
Supported events:
alert.created— Hallucination or PII detectedalert.resolved— Alert manually resolvedcorrection.deployed— Correction publishedcertification.issued— Content certifiedcertification.revoked— Certification revokedpolicy.violated— Governance policy enforced
4. Framework Integrations
Pre-built integrations for popular AI orchestration frameworks:
- LangChain — Callback handler, retriever, guard
- LlamaIndex — Response evaluator, node postprocessor
- Semantic Kernel (.NET) — Chat completion service
- Spring AI (Java) — Chat client interface
- Vercel AI SDK (TypeScript) — Provider plugin
5. Self-Hosted Deployment
Run TruthVouch entirely within your infrastructure using Docker or Kubernetes.
Components:
- Governance Firewall — AI call gateway with governance pipeline
- Sentinel Agent — Deploy on your systems for real-time fact-checking
- Trust API — Self-hosted claim verification service
Authentication
TruthVouch supports three authentication methods:
API Keys
For programmatic access via SDKs and REST APIs.
- Format:
tv_live_...(production) ortv_test_...(sandbox) - Header:
Authorization: Bearer tv_live_...orX-API-Key: tv_live_... - Manage: Settings → API Keys → Generate
- Environment variable:
TRUTHVOUCH_API_KEY
JWT Tokens
For browser-based and server-to-server authentication.
- Obtain via: POST
/api/v1/auth/loginwith email + password - Lifetime: 1 hour (access token), 30 days (refresh token)
- Header:
Authorization: Bearer <access_token> - Refresh: POST
/api/v1/auth/refreshwith refresh token
Learn more about JWT authentication →
OAuth 2.0 / SSO
Enterprise integration with identity providers.
- Supported providers: Okta, Azure AD, Google Workspace, OneLogin
- Configuration: Settings → Security → SSO
- Flow: Redirect to provider, callback to TruthVouch
Learn more about OAuth / SSO →
Rate Limits
TruthVouch applies rate limits based on your subscription tier:
| Tier | Requests/Min | Concurrent | Burst |
|---|---|---|---|
| Sandbox | 60 | 5 | 100 |
| Professional | 1,000 | 25 | 2,000 |
| Enterprise | Custom | Custom | Custom |
Handling Rate Limits:
- SDKs automatically retry with exponential backoff
- REST API returns
429 Too Many RequestswithRetry-Afterheader - Check remaining quota in response header:
X-RateLimit-Remaining
Quick Links
SDKs & Libraries
- SDK Overview & Installation →
- Python Quick Start →
- TypeScript Quick Start →
- .NET Quick Start →
- Framework Integrations →
API Reference
Webhooks & Events
Deployment
Guides
Next Steps
- Choose your integration path: Start with SDKs for fastest time-to-value, or REST API for platform-agnostic access
- Get an API key: Settings → API Keys →
- Read the quickstart: Pick your language and follow the guide
- Check error handling: Review error codes to handle failures gracefully
- Enable webhooks: Set up event notifications for production workflows