Loading...
Loading...
OmegaEngine · Gateway
The AI Gateway acts as a policy-enforced proxy between your agents and LLM providers. Every request passes through OmegaEngine for real-time policy enforcement, cost tracking, and audit logging — with zero code changes.
Your agent sends a single JSON request to POST /api/gateway — provider, model, and messages — instead of calling the provider directly.
OmegaEngine evaluates the request against your tenant policies — checking cost limits, content rules, and rate quotas.
Approved requests are forwarded to the target model. The full decision is logged with 60+ audit signals.
Eight providers — including the OpenRouter aggregator, so one of your keys reaches its whole catalog — through a single, unified API. Switch models without changing client code.
GPT-5.4, GPT-5.4 Mini, o3, gpt-5.4-pro
Claude Opus 4.6, Sonnet, Haiku
Gemini 3.1 Pro, Gemini 3 Flash
Llama 4 Scout and other Groq-hosted models
Mistral Small 4, Devstral 2
Open-source models (Llama 4 family)
Grok 4.3
Aggregator row — your OpenRouter key reaches its whole catalog, model ids pass through verbatim
Not currently supported: AWS Bedrock and Azure OpenAI. Provider availability varies by plan — see pricing & limits.
Send your LLM calls to POST /api/gateway with your OmegaEngine API key and your own provider key (BYOK). Every call routes through safety checks, rate limits, and audit logging.
// One endpoint, any supported provider — safety-checked before the provider is called.
const res = await fetch("https://omegaengine.ai/api/gateway", {
method: "POST",
headers: {
"Content-Type": "application/json",
"x-api-key": process.env.OMEGA_API_KEY, // your OmegaEngine key
"x-openai-api-key": process.env.OPENAI_API_KEY, // BYOK: your provider key
},
body: JSON.stringify({
provider: "openai", // openai | anthropic | groq | gemini | mistral | together | xai | openrouter
model: "gpt-5.4",
messages: [{ role: "user", content: "Recommend an investment strategy" }],
}),
});
// Envelope: { ok, requestId, provider, model, keySource, response, durationMs }
const { ok, response } = await res.json();Every request is evaluated against your tenant policies before reaching the model. Block, allow, or escalate to human review.
Provider-reported token counts captured on every proxied call, with per-request cost ceilings and plan quotas. Tenant and per-agent budgets are roadmap, not shipped — we say so rather than pretend.
Per-key, per-tenant, and per-model rate limits. Smooth traffic spikes without provider throttling.
Every proxied request is logged with 60+ signals — input hash, risk score, policy outcome, latency, cost.
Provider errors pass through with the provider's own status code and error body. The Gateway never silently substitutes a different provider or model — the response always names exactly what was called.
BYOK-only: your provider key travels with each request via a per-provider header (e.g. x-openai-api-key) and is never stored. OmegaEngine never injects or manages provider credentials for you.
Every response carries an x-request-id header for tracing, and the JSON envelope includes OmegaEngine metadata:
| Field | Description | Example |
|---|---|---|
| ok | Whether the gateway call succeeded | true | false |
| requestId | Trace ID (also in the x-request-id header) | 8f14e45f-… |
| provider | Provider the request was routed to | openai |
| model | Model requested | gpt-5.4 |
| keySource | Which credential paid for inference | byok |
| response | Raw provider response payload | { … } |
| durationMs | End-to-end latency in milliseconds | 480 |