LLM Gateway
Zilla's LLM Gateway sits between your applications and the LLM providers they call. Applications keep using the official OpenAI or Anthropic SDK and change only the base URL. Zilla routes each request by model to the right provider, translates between the OpenAI and Anthropic APIs when needed, checks prompts and replies against guardrails, and records token usage.
Features
Unified APIServe OpenAI and Anthropic clients from one gateway by changing only the base URL.
Dialect TranslationLet an OpenAI client reach a Claude model, or an Anthropic client reach a GPT model.
Model Routing & FallbackSend each request to the provider or deployment that serves its model, and fall back when that deployment can't be reached.
GuardrailsReject prompts and replies that contain secrets, personal data, or jailbreak attempts, per model, before they reach the provider or the caller.
ProvidersConnect to OpenAI, Anthropic, and AWS Bedrock, one client binding per provider.
Secure LLM AccessCheck credentials at the gateway and control which keys reach which provider.
Token UsageSee tokens, latency, time to first token, and interactions for every provider, as reported by the provider.
Architecture


| Binding | Role |
|---|---|
llm · server | Accepts LLM API requests from an http · server, resolves which API each request uses, and optionally authorizes its API key with a guard |
llm · proxy | Routes each request by its API and model, applies guardrails, and falls back to another model when a deployment can't be reached |
llm · client | Sends the request to one provider in that provider's API, translating the request and reply when the client's API differs |
See How It Works for how a request flows through these bindings.
Editions
| Component | Zilla | Zilla Plus |
|---|---|---|
openai and anthropic dialects | ✓ | ✓ |
aws-bedrock dialect: call Amazon Bedrock, and accept the Bedrock Converse API | — | ✓ |
| Model routing, fallback, and guardrails | ✓ | ✓ |
llm.* metrics | ✓ | ✓ |
Get Started
This configuration accepts OpenAI Chat Completions requests on port 7161, routes gpt-* models to OpenAI and claude-* models to Anthropic, and forwards the caller's own API key to whichever provider serves the request.
zilla.yaml
guards:
api_key:
type: inline
bindings:
north_tcp_server:
type: tcp
kind: server
options:
host: 0.0.0.0
port: 7161
exit: north_http_server
north_http_server:
type: http
kind: server
exit: north_llm_server
north_llm_server:
type: llm
kind: server
options:
dialect: openai
authorization:
api_key:
credentials: "Bearer {credentials}"
telemetry:
metrics:
- llm.*
exit: north_llm_proxy
north_llm_proxy:
type: llm
kind: proxy
routes:
- when:
- model:
- gpt-*
exit: openai_llm_client
- when:
- model:
- claude-*
exit: anthropic_llm_client
openai_llm_client:
type: llm
kind: client
options:
dialect: openai
server: https://api.openai.com
authorization:
api_key:
credentials: "Bearer {credentials}"
exit: sys:http_client
anthropic_llm_client:
type: llm
kind: client
options:
dialect: anthropic
server: https://api.anthropic.com
authorization:
api_key:
credentials: "{credentials}"
exit: sys:http_client
telemetry:
metrics:
- llm.active.requests
- llm.duration
- llm.tokens.input
- llm.tokens.output
exporters:
prometheus_exporter:
type: prometheus
options:
endpoints:
- scheme: http
port: 7190
path: /metricsPoint the OpenAI SDK at the gateway by changing only its base URL:
from openai import OpenAI
client = OpenAI(base_url="http://localhost:7161/v1", api_key="<your-openai-api-key>")
resp = client.chat.completions.create(
model="gpt-4o-mini",
messages=[{"role": "user", "content": "Hello"}])
print(resp.choices[0].message.content)Try the demo
The LLM Gateway demo runs OpenAI and Anthropic behind one gateway with translation, guardrails, fallback, and a Grafana dashboard of token usage.

