HomeGuidesAPI ReferenceRelease notes
Log In
Guides

Environment-variable instrumentation

Manually point provider base-URL variables at your Sentinel gateway

You can manually expose the provider base-URL variables in your current terminal session (or your application's runtime config). Assuming your local Sentinel gateway is running on http://localhost:8000:

# For OpenAI SDKs & compatible frameworks
export OPENAI_BASE_URL="http://localhost:8000/openai"

# For Anthropic SDKs & frameworks
export ANTHROPIC_BASE_URL="http://localhost:8000/anthropic"

# For Gemini/Google AI Studio SDKs
export GOOGLE_GEMINI_BASE_URL="http://localhost:8000/gemini"

Each provider is exposed under its own path on the gateway. For the full mapping of providers to environment variables and gateway paths, see the Reference.

Once these variables are set, any application that initializes a standard SDK client will stream through Sentinel automatically — no code changes required.

💡

Prefer not to manage these variables by hand across terminals? The Sentinel CLI proxy can inject and remove them globally with a single toggle.

Custom providers

If you are routing a self-hosted or alternative OpenAI-compatible model, point the standard OPENAI_BASE_URL variable at your custom provider's path on the gateway instead:

export OPENAI_BASE_URL="http://localhost:8000/my-custom-model"

See Custom providers for the full setup.