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:
| Language | Package | Registry | Install |
|---|---|---|---|
| Python | truthvouch | PyPI | pip install truthvouch |
| TypeScript | @truthvouch/sdk | npm | npm install @truthvouch/sdk |
| .NET | TruthVouch.Sdk | NuGet | dotnet add package TruthVouch.Sdk |
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 — Guard, Retriever, Callback handler (
pip install langchain-truthvouch) - LlamaIndex — Node postprocessor, Response evaluator, Query engine (
pip install llama-index-truthvouch) - Semantic Kernel — Function filter, Prompt filter, Plugin (
dotnet add package TruthVouch.SemanticKernel)
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
6. MCP Server (Claude Code, Cursor, etc.)
22 governance tools accessible from any MCP-compatible AI client. Verify claims, check compliance, search knowledge, and take governance actions from your terminal.
Setup:
# One-line setup via CLItruthvouch mcp setup --api-key vt_live_...
# Or direct npxclaude mcp add truthvouch -- npx -y @truthvouch/mcp-server7. CLI Tool
Command-line interface for verification, MCP setup, and governance workflows.
# Install via npmnpm install -g @truthvouch/cli
# Or Homebrew (macOS/Linux)brew install truthvouch/tap/truthvouch
# Or Chocolatey (Windows)choco install truthvouchAuthentication
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: 24 hours (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 →
- CLI Documentation →
- MCP / Claude Code →
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