Skip to content
/ llm-mux Public
forked from nghyane/llm-mux

Turn your AI subscriptions into API endpoints. Convert Claude Pro/Max, GitHub Copilot, and Google Antigravity subscriptions into OpenAI-compatible APIs. No extra API billing required.

License

Notifications You must be signed in to change notification settings

ndlm46/llm-mux

 
 

Repository files navigation

llm-mux

AI Gateway for Subscription-Based LLMs

GitHub release GitHub stars License: MIT Docker

Turn your Claude Pro, GitHub Copilot, and Gemini subscriptions into standard LLM APIs. No API keys needed.

Features

  • Multi-Provider — Claude, Copilot, Gemini, Codex, Qwen, Kiro, and more
  • Multi-Format — OpenAI, Anthropic, Gemini, Ollama compatible endpoints
  • Multi-Account — Load balance across accounts, auto-retry on quota limits
  • Zero Config — OAuth login, no API keys required
  • Protocol Translation — IR-based translator converts between all formats

Quick Install

# macOS / Linux
curl -fsSL https://raw.githubusercontent.com/nghyane/llm-mux/main/install.sh | bash

# Windows (PowerShell)
irm https://raw.githubusercontent.com/nghyane/llm-mux/main/install.ps1 | iex

Quick Start

# 1. Login to a provider
llm-mux --antigravity-login   # Google Gemini
llm-mux --claude-login        # Claude Pro/Max
llm-mux --copilot-login       # GitHub Copilot

# 2. Start the server (runs as background service after install)
llm-mux

# 3. Verify
curl http://localhost:8317/v1/models

API Formats

Format Endpoint Use With
OpenAI /v1/chat/completions Cursor, Aider, LangChain
Anthropic /v1/messages Claude Code, Cline
Gemini /v1beta/models/{model}:generateContent Gemini CLI
Ollama /api/chat Open WebUI
Base URL: http://localhost:8317
API Key:  unused

OpenAI format:

curl http://localhost:8317/v1/chat/completions \
  -H "Content-Type: application/json" \
  -d '{"model": "gemini-2.5-pro", "messages": [{"role": "user", "content": "Hello!"}]}'

Anthropic format:

curl http://localhost:8317/v1/messages \
  -H "Content-Type: application/json" \
  -H "anthropic-version: 2023-06-01" \
  -d '{"model": "claude-sonnet-4", "max_tokens": 1024, "messages": [{"role": "user", "content": "Hello!"}]}'

See API Reference for all endpoints.

Documentation

Guide Description
Installation Install options, update, uninstall
Providers All supported providers and login commands
Configuration Config file reference
API Reference Supported API formats and endpoints
Integrations Cursor, VS Code, Aider, LangChain, etc.
Docker Container deployment
Service Management Background service on macOS/Linux/Windows
Troubleshooting Common issues and solutions

Supported Providers

Provider Login Command Models
Google Gemini --antigravity-login gemini-2.5-pro, gemini-2.5-flash
Claude --claude-login claude-sonnet-4, claude-opus-4
GitHub Copilot --copilot-login gpt-4.1, gpt-4o, gpt-5
OpenAI Codex --codex-login gpt-5 series
Qwen --qwen-login qwen-coder
Kiro --kiro-login Amazon Q models
Cline --cline-login Cline API
iFlow --iflow-login iFlow models

See all providers for details and model lists.

Integrations

Works with any OpenAI/Anthropic/Gemini-compatible tool:

Editors: Cursor, VS Code (Cline, Continue), Zed
CLI: OpenCode, Claude Code, Codex CLI, Gemini CLI
Frameworks: LangChain, LlamaIndex, Vercel AI SDK
Web UIs: Open WebUI, LibreChat

See integration guides for setup instructions.

Architecture

flowchart LR
    subgraph Input["API Formats"]
        A[OpenAI]
        B[Anthropic]
        C[Gemini]
        D[Ollama]
    end

    subgraph Core["llm-mux"]
        E[IR Translator]
    end

    subgraph Output["Providers"]
        F[Gemini]
        G[Claude]
        H[Copilot]
        I[Codex]
        J[...]
    end

    A --> E
    B --> E
    C --> E
    D --> E
    E --> F
    E --> G
    E --> H
    E --> I
    E --> J
Loading

License

MIT License — see LICENSE

About

Turn your AI subscriptions into API endpoints. Convert Claude Pro/Max, GitHub Copilot, and Google Antigravity subscriptions into OpenAI-compatible APIs. No extra API billing required.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 97.1%
  • Shell 1.2%
  • Other 1.7%