Turn your existing AI subscriptions into standard API endpoints.
A local gateway that enables your Claude Pro, GitHub Copilot, and Google Gemini subscriptions to work with any AI tool.
Universal Compatibility: Supports OpenAI, Anthropic (Claude), Google (Gemini), and Ollama API formats. Zero Overhead: No separate API billing. No per-token charges. Runs locally.
No dependencies required. These scripts download the pre-compiled binary for your architecture.
curl -fsSL https://raw.githubusercontent.com/nghyane/llm-mux/main/install.sh | bashirm https://raw.githubusercontent.com/nghyane/llm-mux/main/install.ps1 | iexRun this once to set up the configuration directory:
llm-mux --initLogin to the services you have subscriptions for. This opens your browser to cache OAuth tokens locally.
# For Google Gemini (Free Tier or Advanced)
llm-mux --antigravity-login
# For Claude Pro / Max
llm-mux --claude-login
# For GitHub Copilot
llm-mux --copilot-loginView other login commands (OpenAI Codex, Qwen, Amazon Q)
| Provider | Command | Description |
|---|---|---|
| OpenAI Codex | llm-mux --codex-login |
Access GPT-5 series (if eligible) |
| Qwen | llm-mux --qwen-login |
Alibaba Cloud Qwen models |
| Amazon Q | llm-mux --kiro-login |
AWS/Amazon Q Developer |
| Cline | llm-mux --cline-login |
Cline API integration |
| iFlow | llm-mux --iflow-login |
iFlow integration |
Check if the server is running and models are available:
curl http://localhost:8317/v1/modelsPoint your tools to the local proxy.
Base URL: http://localhost:8317/v1
API Key: any-string (unused, but required by some clients)
- Go to Settings > Models.
- Toggle "OpenAI API Base URL" to ON.
- Enter:
http://localhost:8317/v1
- API Provider: OpenAI Compatible
- Base URL:
http://localhost:8317/v1 - Model ID:
claude-sonnet-4-20250514(or any available model)
# Using Claude Sonnet via llm-mux
aider --openai-api-base http://localhost:8317/v1 --model claude-sonnet-4-20250514from openai import OpenAI
client = OpenAI(
base_url="http://localhost:8317/v1",
api_key="unused"
)
response = client.chat.completions.create(
model="gemini-2.5-pro",
messages=[{"role": "user", "content": "Hello!"}]
)
print(response.choices[0].message.content)llm-mux automatically maps your subscription access to these model identifiers.
| Provider | Top Models |
|---|---|
gemini-2.5-pro, gemini-2.5-flash, gemini-3-pro-preview |
|
| Anthropic | claude-sonnet-4-20250514, claude-opus-4-5-20251101, claude-3-5-sonnet |
| GitHub | gpt-4.1, gpt-4o, gpt-5, gpt-5-mini, gpt-5.1, gpt-5.2 |
Note: Run
curl http://localhost:8317/v1/modelsto see the exact list available to your account.
llm-mux acts as a universal adapter, accepting requests in multiple formats (OpenAI, Claude, Gemini, Ollama) and routing them to your active subscriptions.
graph LR
subgraph "Inbound Protocols"
OpenAI[OpenAI / Compatible]
Anthropic[Anthropic SDK]
Google[Google AI SDK]
Ollama[Ollama Clients]
end
Mux[llm-mux :8317]
subgraph "Outbound Subscriptions"
Gemini[Google Gemini]
Claude[Claude Pro]
Copilot[GitHub Copilot]
end
OpenAI --> Mux
Anthropic --> Mux
Google --> Mux
Ollama --> Mux
Mux -->|Translation Layer| Gemini
Mux -->|Translation Layer| Claude
Mux -->|Translation Layer| Copilot
You can use llm-mux as a drop-in replacement for these providers without changing your client code structure.
| Protocol | Endpoint | Use Case |
|---|---|---|
| OpenAI | POST /v1/chat/completions |
Cursor, VS Code, LangChain |
| Anthropic | POST /v1/messages |
Native Anthropic SDKs, Claude-native tools |
| Gemini | POST /v1beta/models/... |
Google AI Studio tools, Vertex AI SDKs |
| Ollama | POST /api/chat |
WebUIs built for Ollama |
Load Balancing & Multiple Accounts
You can login multiple times with different accounts to distribute load and increase quotas.
llm-mux --login # Account 1
llm-mux --login # Account 2The system will automatically rotate requests and handle failovers.
Docker Usage
If you prefer containerization:
docker run -p 8317:8317 -v ~/.config/llm-mux:/root/.config/llm-mux nghyane/llm-muxCustom Proxies
Edit ~/.config/llm-mux/config.yaml to add upstream proxies:
proxy-url: "socks5://user:pass@proxy.example.com:1080"MIT License — see LICENSE