Route supported OpenAI-compatible traffic through a controlled gateway for DLP, scoped keys, provider routing and audit context.
AIGuard implements the OpenAI REST API spec exactly. Applications using the OpenAI SDK, LangChain, or any OpenAI-compatible library route through AIGuard with a single configuration change.
from openai import OpenAI client = OpenAI( api_key="sk-..." )
from openai import OpenAI client = OpenAI( api_key="ag-app-key-...", # AIGuard key base_url="https://gw.aiguard.io/v1" )
GPT-4o, GPT-4o-mini, o1, o3
Claude 3.5, 3.7, 4 Sonnet/Opus
Gemini 1.5, 2.0, 2.5 Pro/Flash
All deployments, all regions
The same seven on-premises ML engines that power SaaS AI DLP scan every API prompt before it reaches the LLM provider — and every response before it reaches the application.
| App Key | Model | Tokens | DLP | Status |
|---|---|---|---|---|
| finance-app | gpt-4o | 1,240 | Clean | ✓ 201 |
| hr-assist | claude-4-sonnet | 890 | SSN | ⊘ 403 |
| code-review | gpt-4o-mini | 412 | Clean | ✓ 201 |
| data-pipeline | gemini-2.5-pro | 3,100 | M&A topic | ! 200 |
| legal-summarize | gpt-4o | 4,820 | Redacted | ↻ 200 |
AIGuard's key management layer gives every application a scoped gateway key with its own model allowlist, rate limit, and DLP policy — while keeping underlying provider keys locked in an encrypted vault that no application can access.
Gateway keys are stored as SHA-256 hashes — the plaintext key is shown once on creation and never again. Even a full database compromise exposes no usable keys.
Each key can be locked to a specific model or set of models. An application key scoped to gpt-4o-mini cannot call gpt-4o — preventing cost overruns and unauthorized capability access.
Per-key request-per-minute limits enforced via Redis. When a key exceeds its rate limit, the gateway returns 429. Burst allowances configurable per key.
Optional cryptographic binding of a key to a deployment identity (host fingerprint). A stolen key used from the wrong host returns 401 — preventing replay attacks.
The application sends a standard OpenAI API request to the AIGuard gateway endpoint with its scoped gateway key. The gateway authenticates the key (SHA-256 hash comparison + optional PoP check), identifies the application, and looks up its policy configuration.
The prompt text (and any image attachments via OCR) is run through the full DLP pipeline on-premises. The regex engine returns in under 1ms; ML engines average ~35ms. If a violation is found matching an active rule, the gateway returns an error immediately — the prompt never reaches the LLM provider.
After DLP clearance, the gateway replaces the application's gateway key with the encrypted provider key (decrypted from the vault at runtime) and forwards the request to the configured LLM provider. Model allow/block lists are enforced — requests for disallowed models are rejected with a 403.
The LLM response is scanned by the DLP pipeline before being returned to the application. Sensitive content in responses (hallucinated PII, model-retrieved secrets) is blocked or redacted. The full event — request, response, token counts, latency, and policy decision — is written to the audit log.
| Capability | AIGuard Gateway | LiteLLM | AWS Bedrock Gateway | Custom Proxy |
|---|---|---|---|---|
| OpenAI API compatibility | ✓ Full spec | ✓ | Partial | Manual |
| On-premises ML DLP (7 engines) | ✓ | — | — | — |
| Bidirectional scanning (prompt + response) | ✓ | — | Guardrails only | — |
| Per-key model allowlists | ✓ | ✓ | — | Manual |
| Encrypted provider key vault | ✓ | Plaintext env | ✓ IAM | Manual |
| Proof of Possession (Ed25519) | ✓ | — | — | — |
| Circuit breaker (fail-open/closed) | ✓ Configurable | Limited | — | Manual |
| Full LLM audit log (tokens, latency) | ✓ | ✓ | CloudWatch only | Manual |
| Multi-provider routing with fallback | ✓ | ✓ | AWS only | Manual |
See AIGuard Gateway in a live demo — we'll integrate with your existing OpenAI SDK setup and run DLP against real traffic in under 15 minutes.