Drop TrustGate into your stack in a minute.
TrustGate AI is a self-hosted AI security gateway that inspects and governs every surface your agents touch — prompts, RAG, tools, and egress — inside your own infrastructure. It's drop-in OpenAI-compatible, so you keep your existing code and simply route it through the gateway. These quickstarts show how.
Install, set your key, and you're governed.
No rewrites. Install the SDK for your language — or just swap the base URL — and your current OpenAI, Anthropic, LangChain, or Vercel AI code runs unchanged, now inspected, audited, and cost-governed.
import trustgate trustgate.patch_all() # your existing OpenAI / LangChain code is now governed
import { TrustGate } from '@trustgate/sdk'; new TrustGate({ apiKey: process.env.TRUSTGATE_API_KEY }); // Vercel AI SDK / OpenAI / Anthropic calls now route through TrustGate
# Any OpenAI-compatible client — just swap the base URL export OPENAI_BASE_URL=https://api.trustgate.io/v1 export OPENAI_API_KEY=$TRUSTGATE_API_KEY
curl https://api.trustgate.io/v1/chat/completions \ -H "Authorization: Bearer $TRUSTGATE_API_KEY" \ -d '{"model":"gpt-4o","messages":[{"role":"user","content":"Hello"}]}'
try (TrustGateClient client = TrustGateClient.builder() .apiKey(System.getenv("TRUSTGATE_API_KEY")) .build()) { var res = client.chat().completions().create( ChatCompletionRequest.builder().model("gpt-4o") .addMessage(ChatMessage.user("Hello")).build()); }
await using var client = new TrustGateClient(new TrustGateClientOptions { ApiKey = Environment.GetEnvironmentVariable("TRUSTGATE_API_KEY") }); var res = await client.Chat.Completions.CreateAsync(new ChatCompletionRequest { Model = "gpt-4o", Messages = new[] { new ChatMessage("user", "Hello") } });
Works with OpenAI, Anthropic, Vercel AI SDK, LangChain, and any OpenAI-compatible client. Self-hosted? Point the base URL at your own gateway instead.
Every stack, one gateway.
Python and Node are the fastest paths in; any OpenAI-compatible client works via a base-URL swap. Java and .NET clients are in alpha.
Python
Import and call patch_all() — your existing OpenAI, Anthropic, or LangChain code is governed with no rewrites.
pip install trustgateNode.js / TypeScript
Initialise the SDK once and your Vercel AI SDK, OpenAI, and Anthropic calls route through the gateway.
npm install @trustgate/sdkBase URL swap
Any OpenAI-compatible client works out of the box — point the base URL at the gateway and add your key.
OPENAI_BASE_URL → gatewayn8n / no-code
In your workflow tool, set the HTTP node's base URL to the gateway and add your key as a Bearer token.
HTTP node · Bearer tokenJava
First-class client with builder-style requests. In alpha today — request access to join the early cohort.
alpha · request access.NET
Async client for .NET services. In alpha today — request access to join the early cohort.
alpha · request accessSelf-host in your own VPC — or fully air-gapped.
TrustGate runs entirely inside your infrastructure, so your prompts, documents, and tool calls never leave your network. Deploy the control plane in three commands, then point any SDK at your gateway instead of the hosted endpoint.
Zero data egress. Runs in your VPC on AWS, GCP, or Azure — or fully air-gapped, with GPU options. See the self-hosted deployment guide for the full architecture, or read how it works.
Ready to route your first request?
Request an API key to start integrating, or book a walkthrough with our team.