egisai.init() call, no per-call wiring. There
are three ways your self-hosted traffic gets covered, depending on how
your code reaches the model.
1. Point an OpenAI-compatible client at your server
If you run a model behind an OpenAI-compatible server (vLLM, Ollama, TGI, SGLang, …), just point theopenai client’s base_url at it.
egisai.init() patches the client, so every call is governed in-process
before it leaves your process — regardless of the base URL:
2. Route through the Gateway to a registered custom model
If you’ve registered the model as a custom provider, address it ascustom-<slug>/<model> and let the Gateway handle the
provider key (from the encrypted vault) and the transport — including
reaching a private model through the Egis Connector:
init() → gateway.
3. Raw HTTP calls to a registered custom host — covered automatically
Code that calls a self-hosted model over plainhttpx or requests
(no OpenAI client) is still seen. When you register a custom model, its
host is published to the SDK, and a raw call to that host on an
inference-shaped path is attributed and audited automatically:
What’s next
Custom models
Register a self-hosted model on the Gateway.
Egis Connector
Reach a model with no inbound access.
HTTP clients
How the SDK covers raw httpx / requests calls.
Self-hosting
Run the whole control plane in your network.