One local gateway. Four AI protocols. Any model.
Route OpenAI, Anthropic, Gemini, and compatible model APIs through one local endpoint.
macOS or Linux:
curl -fsSL https://raw.githubusercontent.com/soooooollee/ai-router/main/install.sh | shnpm on macOS, Linux, or Windows:
npm install --global https://github.com/soooooollee/ai-router/releases/latest/download/airoute-cli.tgzHomebrew on macOS or Linux:
brew install soooooollee/ai-router/airouteOr build from source with Go 1.24+:
git clone https://github.com/soooooollee/ai-router.git
cd ai-router
make build
export PATH="$PWD/bin:$PATH"Create the configuration and start AI Router:
air init
air startThe default configuration is stored in the operating system's user configuration directory, not the current working directory: %AppData%\airoute\airoute.yaml on Windows, ~/Library/Application Support/airoute/airoute.yaml on macOS, and usually ~/.config/airoute/airoute.yaml on Linux. Use --config PATH or AIROUTE_CONFIG to override it.
Web console: http://127.0.0.1:12667.
Model gateway: http://127.0.0.1:12666.
Useful commands:
air init Create airoute.yaml in the user configuration directory
air start Start in the background
air stop Stop the background instance
air restart Restart the background instance
air logs -f Follow background logs
air serve Run in the foreground for debugging
air status Show runtime status
air ui Open the Web console
air check Validate airoute.yaml
air doctor Run configuration diagnostics
air client-state backup Back up managed clients, usage, audit data, and the local credential master key
air client-state verify --backup Verify a client-state backup before restore
air client-state restore --backup Restore a verified backup while AI Router is stopped
air --help Show all commands
AI Router is licensed under the MIT License.