Drop-in OpenAI endpoint
Point any OpenAI SDK at /v1/chat/completions. The model field picks an Aegis route; streaming uses standard SSE frames.
REST API
AEGIS
Put guardrails, human approvals and a tamper-evident audit trail between your apps and any LLM — behind an OpenAI-compatible endpoint, configured in one YAML file.
One config, one CLI. A prompt with an API key never reaches a model. A clean question to the loan-underwriting route — whose model runs in a US region — goes straight through; the same route with a Canadian SIN pauses for a named reviewer, who denies it. aegis explain shows why, and the exported ledger verifies offline.
Try it in your browser: the live demo runs the real guardrails against a mock model — paste a prompt with an email address or a SIN, switch to the underwriting route, and approve or deny the paused run. Nothing to install.
Or run it yourself from a clone with docker compose run --rm dev bash scripts/cli-tour.sh — the config is examples/cli-tour.yaml.
pip install aegis-gateway
aegis init # writes aegis.yaml: fake provider + PII masking
aegis serve --config aegis.yaml --no-auth # http://localhost:8000from openai import OpenAI
client = OpenAI(base_url="http://localhost:8000/v1", api_key="dev")
reply = client.chat.completions.create(
model="default", # an Aegis route name
messages=[{"role": "user", "content": "Email jane@example.com the summary"}],
)
print(reply.choices[0].message.content)curl -s http://localhost:8000/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{"model":"default","messages":[{"role":"user","content":"Hello"}]}'