Internal AI gateway

Authenticated access to AI providers for Upsun staff.

Install

This downloads the CLI, authenticates via Okta, installs a background service, and configures your shell and AI tools:

curl -fsSL https://ai-gateway.plat.farm/install.sh | bash

This installer avoids SentinelOne antivirus conflicts:

curl -fsSL https://ai-gateway.plat.farm/download.sh | bash

Then run the printed command to complete setup:

~/.local/bin/ai-gateway setup

Run this inside your WSL terminal. It downloads the CLI, authenticates via Okta, and configures your shell and AI tools:

curl -fsSL https://ai-gateway.plat.farm/install.sh | bash

Usage

After installation, AI tools work automatically. Restart your terminal (or source your shell config), then run your preferred tool in a project:

Your shell also gets the gateway's provider variables, including OPENAI_BASE_URL and the Google/Vertex ones, so your own scripts and anything using the OpenAI or Google SDKs work too — for example make eval. You do not need an API key: the local proxy holds the real credential. For a script built on the Anthropic SDK, run it through ai-gateway run (see the command reference).

On macOS, use ai-gateway run to start the proxy and launch your tool:

Any command works, not just the tools above, and you do not need an API key — the local proxy holds the real credential:

For a whole shell session instead, keep the proxy running with ai-gateway serve in a dedicated terminal, then set the variables with eval "$(ai-gateway env)" (or ai-gateway env | source under fish) in the terminals you work in. On these platforms nothing starts the proxy in the background, so ai-gateway env on its own leaves the variables pointing at a port with nothing listening. It also leaves out ANTHROPIC_BASE_URL, which only run sets — see the command reference.

WSL typically lacks systemd, so use ai-gateway run to start the proxy and launch your tool:

Any command works, not just the tools above, and you do not need an API key — the local proxy holds the real credential:

For a whole shell session instead, keep the proxy running with ai-gateway serve in a dedicated terminal, then set the variables with eval "$(ai-gateway env)" (or ai-gateway env | source under fish) in the terminals you work in. On these platforms nothing starts the proxy in the background, so ai-gateway env on its own leaves the variables pointing at a port with nothing listening. It also leaves out ANTHROPIC_BASE_URL, which only run sets — see the command reference.

Commands

Commonly used commands:

Reference