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:

  • Python (truthvouch on PyPI)
  • TypeScript/Node.js (@truthvouch/sdk on npm)
  • .NET (TruthVouch.Sdk on 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

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 — 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) 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: 1 hour (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