TrustGate
TrustGate is an OpenAI-compatible API proxy that routes inference requests to the optimal LLM provider based on passport policies.How It Works
- Your app sends a standard OpenAI
POST /v1/chat/completionsrequest - TrustGate matches the request against passport policies (model, cost, latency, capabilities)
- The best-fit provider is selected and the request is forwarded
- A cryptographic receipt is generated for every inference
- Receipts are batched into epochs and anchored on Solana
OpenAI Compatibility
TrustGate implements the OpenAI Chat Completions API. Any OpenAI SDK works — just change the base URL:Passport Routing
Instead of hardcoding a model, you can specify passport requirements and let TrustGate find the best match:- Model capabilities — vision, function calling, code generation
- Cost constraints — max price per million tokens
- Latency requirements — time-to-first-token targets
- Provider preferences — specific providers or exclusions
Features
| Feature | Description |
|---|---|
| Multi-provider | OpenAI, Anthropic, Google, Mistral, open-source via LiteLLM |
| Streaming | SSE streaming with receipt generation |
| Quota enforcement | Per-org, per-key rate limits and token budgets |
| Metering | Real-time usage tracking via OpenMeter |
| Receipt signing | Ed25519 signatures on every inference |
| Epoch batching | Receipts batched and anchored on Solana |
Architecture
TrustGate is part oflucid-plateform-core, running as a Fastify service on port 4010. It depends on:
- LiteLLM — unified LLM provider interface
- @raijinlabs/passport — passport matching engine
- Supabase — receipt and quota storage
- OpenMeter — usage metering
.png?fit=max&auto=format&n=VsjUqn6fLqEhBiuI&q=85&s=8b4c7e6431e9a6af1ef23b77bb4ff5fd)
.png?fit=max&auto=format&n=VsjUqn6fLqEhBiuI&q=85&s=d5651a45e4bfbabc33f74e146af3f94a)