Personal AI API Management & Forwarding Hub
Manage multiple AI API providers through a single endpoint with automatic failover — never go down.
| Feature | Description |
|---|---|
| Multi-Provider Routing | One endpoint for multiple AI providers, auto-match or manually specify models |
| Never Goes Down | Set model to auto for optimal channel matching; auto-cooldown on failure and switch to next available |
| One-Click Speed Test | Test all channels & models sequentially — green response time for success, red ✗ for failure |
| Smart Circuit Breaker | Auto-disable unrecoverable models (401/403/410), cooldown skips failed models, auto-recover on success |
| Auto Channel Calibration | One-click model fetch with auto API type detection, Base URL correction, relay station model discovery |
| Smart Model Pre-selection | Auto-select models released within 6 months + existing models; new entries enabled by default |
| System Tray | Right-click tray icon to reprioritize top AUTO-group entries without opening the main window |
| Bilingual | UI and user guide support Chinese/English |
| Portable | Single EXE file, data stored alongside the executable, copy and run anywhere |
- Download from Releases
- Run — database is auto-created in the same directory
- Go to Channels to add API providers, fetch and select models
- Go to API Management to view and enable models
- Point your client's API base URL to
http://127.0.0.1:9090, set model toautoor any specific name
API Base URL: http://127.0.0.1:9090
API Key: anything (enforce validation in Settings if needed)
Model: auto (smart match) or any specific model name
| Mode | Behavior |
|---|---|
model: auto |
Automatically select from enabled, non-cooled AUTO-group entries by priority |
model: coding |
First try case-insensitive group exact match, then model-name fuzzy match, then fall back to the AUTO group |
| Tray right-click | Reprioritize existing AUTO-group entries only; it does not switch groups |
| Platform | File |
|---|---|
| Windows x64 | api-switch-*-windows-x64.exe |
| macOS Intel | api-switch-*-macos-x64 |
| macOS Apple Silicon | api-switch-*-macos-arm64 |
| Linux x64 | api-switch-*-linux-x64 |
Visit Releases for the latest version.
| Type | Auth Method | Description |
|---|---|---|
| OpenAI | Bearer Token | Standard OpenAI API |
| Anthropic | x-api-key | Claude series models, full format conversion |
| Google Gemini | Query Parameter | OpenAI-compatible endpoint |
| Azure OpenAI | api-key Header | Deployment name routing |
| Custom | Bearer Token | Any OpenAI-compatible third-party service (CODING PLAN, SiliconFlow, etc.) |
Relay stations (like CODING PLAN) often don't expose a standard /models endpoint. API Switch supports these via:
- Set API type to Custom, enter the base URL and API key
- Click Fetch Models — auto-detection tries multiple protocols and paths as fallback
- If the model list API is unavailable, go to API Management → Add Model to manually enter model names
- Built-in model catalog (
models.json) auto-displays release date, capabilities, context length for any model name
- Model Cooldown — Any upstream failure triggers 300s cooldown; cooled models are skipped in routing
- Auto Recovery — Successful request automatically clears cooldown state
- Auto Disable — Auto-disable entries on 401/403/410 status codes (configurable in Settings)
- Failover — Automatically try the next available channel; returns 502 if all fail
- User Controls Are Sacred —
enabledtoggle is only controlled by the user; the system never auto-enables
Proxy listens on port 9090 by default, configurable in Settings → Proxy.
Cooldown recovery time defaults to 600s (adjustable via slider in Settings → Circuit Breaker, range 300-1800s).
| Layer | Technology |
|---|---|
| Desktop | Tauri v2 (Rust + Web) |
| Backend | Rust + Axum + SQLite (WAL mode) |
| Frontend | React 19 + TypeScript + Tailwind CSS v4 |
| Protocol Adapters | 5 independent adapter modules, isolated from each other |
api-switch.exe # Main program (portable)
api-switch.db # Database (auto-created on first run)
All data is stored alongside the executable. Delete both files to completely remove.
If you find it useful, consider giving it a Star on GitHub!