Skip to content

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 provider
from openai import AsyncOpenAI
client = AsyncOpenAI()
# After: governed via TruthVouch
from truthvouch import TruthVouchClient
client = TruthVouchClient(
gateway_url="https://gateway.truthvouch.com",
api_key="tv_live_..."
)
# Same API — zero code changes from here
response = await client.openai.chat.completions.create(
model="gpt-4o",
messages=[{"role": "user", "content": "What is TruthVouch?"}]
)

Available SDKs:

LanguagePackageRegistryInstall
PythontruthvouchPyPIpip install truthvouch
TypeScript@truthvouch/sdknpmnpm install @truthvouch/sdk
.NETTruthVouch.SdkNuGetdotnet 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

Terminal window
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 detected
  • alert.resolved — Alert manually resolved
  • correction.deployed — Correction published
  • certification.issued — Content certified
  • certification.revoked — Certification revoked
  • policy.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:

Terminal window
# One-line setup via CLI
truthvouch mcp setup --api-key vt_live_...
# Or direct npx
claude mcp add truthvouch -- npx -y @truthvouch/mcp-server

Claude Code Integration →

7. CLI Tool

Command-line interface for verification, MCP setup, and governance workflows.

Terminal window
# Install via npm
npm install -g @truthvouch/cli
# Or Homebrew (macOS/Linux)
brew install truthvouch/tap/truthvouch
# Or Chocolatey (Windows)
choco install truthvouch

CLI Documentation →


Authentication

TruthVouch supports three authentication methods:

API Keys

For programmatic access via SDKs and REST APIs.

  • Format: tv_live_... (production) or tv_test_... (sandbox)
  • Header: Authorization: Bearer tv_live_... or X-API-Key: tv_live_...
  • Manage: Settings → API Keys → Generate
  • Environment variable: TRUTHVOUCH_API_KEY

Learn more about API keys →

JWT Tokens

For browser-based and server-to-server authentication.

  • Obtain via: POST /api/v1/auth/login with email + password
  • Lifetime: 24 hours (access token), 30 days (refresh token)
  • Header: Authorization: Bearer <access_token>
  • Refresh: POST /api/v1/auth/refresh with 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:

TierRequests/MinConcurrentBurst
Sandbox605100
Professional1,000252,000
EnterpriseCustomCustomCustom

Handling Rate Limits:

  • SDKs automatically retry with exponential backoff
  • REST API returns 429 Too Many Requests with Retry-After header
  • Check remaining quota in response header: X-RateLimit-Remaining

Full rate limit details →


SDKs & Libraries

API Reference

Webhooks & Events

Deployment

Guides


Next Steps

  1. Choose your integration path: Start with SDKs for fastest time-to-value, or REST API for platform-agnostic access
  2. Get an API key: Settings → API Keys →
  3. Read the quickstart: Pick your language and follow the guide
  4. Check error handling: Review error codes to handle failures gracefully
  5. Enable webhooks: Set up event notifications for production workflows