Universal AI API Proxy Router with Multi-Format Support
๐ฐ This tool is valued at $100 USD - developed with equivalent cost of Claude Opus 4.5 AI assistance
AnyProxyAi is a universal AI API proxy router that supports multiple API formats (OpenAI, Claude, Gemini) with automatic format conversion, load balancing, and intelligent routing. It provides a unified local endpoint for all your AI API needs.
- Multi-Format Support: Seamlessly convert between OpenAI, Claude (Anthropic), and Gemini API formats
- Unified Endpoint: Single local API endpoint for all AI services
- Load Balancing: Automatic routing across multiple API endpoints
- Usage Statistics: Real-time monitoring of requests, tokens, and success rates
- Cross-Platform: Native desktop app for Windows, macOS, and Linux
- Multi-Language: Supports Chinese and English, follows system language by default
Usage Statistics - Heatmap & Charts
Claude Code Interface โ OpenAI Format Conversion
| Feature | Description |
|---|---|
| ๐ API Format Conversion | Automatic conversion between OpenAI, Claude, and Gemini formats |
| ๐ Smart Routing | Route requests to different backends based on model name |
| ๐ Proxy Redirect | Use proxy_auto keyword to redirect to any configured model |
| ๐ Real-time Stats | Monitor requests, errors, and token usage |
| ๐ Historical Data | SQLite-based statistics with heatmap visualization |
| ๐ฏ Model Ranking | Track most used models and their performance |
| ๐ Multi-Language | Chinese/English support, follows system language, switchable from top-right corner (persistent) |
| Format | Input | Output | Streaming | Stream Conversion |
|---|---|---|---|---|
| OpenAI | โ | โ | โ | โ |
| Claude (Anthropic) | โ | โ | โ | โ |
| Gemini | โ | โ | โ | โ |
| Claude Code | โ | โ | โ | โ |
| Cursor IDE | โ | โ | โ | โ |
| Feature | Description |
|---|---|
| ๐ฅ๏ธ Cross-platform Desktop App | Windows, macOS, Linux support |
| ๐จ Dark/Light Theme | Toggle between themes |
| ๐ Language Switch | Switch language from top-right corner popup (persistent) |
| ๐ System Tray | Minimize to system tray |
| ๐ Route Management | Add, edit, delete, import/export routes |
| ๐ Usage Dashboard | Heatmap, charts, and statistics |
Available Builds:
anyproxyai-windows-amd64.exe- Windows x64anyproxyai-windows-arm64.exe- Windows ARM64anyproxyai-linux-amd64- Linux x64anyproxyai-linux-arm64- Linux ARM64anyproxyai-darwin-amd64.zip- macOS Intelanyproxyai-darwin-arm64.zip- macOS Apple Silicon
- Download
anyproxyai-windows-amd64.exe - Run the executable
- Allow firewall access if prompted
- Download
anyproxyai-darwin-arm64.zip(Apple Silicon) oranyproxyai-darwin-amd64.zip(Intel) - Extract and move
anyproxyai.appto Applications - First run: Right-click โ Open (bypass Gatekeeper)
chmod +x anyproxyai-linux-amd64
./anyproxyai-linux-amd64Click "ๆทปๅ ่ทฏ็ฑ" (Add Route) and configure:
| Field | Description | Example |
|---|---|---|
| Name | Friendly name | GPT-4 Turbo |
| Model | Model identifier | gpt-4-turbo |
| API URL | Backend API URL | https://api.openai.com |
| API Key | Your API key | sk-xxx... |
| Group | Optional grouping | OpenAI |
| Format | API format type | openai / claude / gemini |
Use the local proxy endpoint in your application:
OpenAI Compatible:
API Base URL: http://localhost:5642/api
API Key: (use the key shown on home page, or any value if auth is disabled)
Claude/Anthropic:
API Base URL: http://localhost:5642/api/anthropic
API Key: (use the key shown on home page, or any value if auth is disabled)
Claude Code:
API Base URL: http://localhost:5642/api/claudecode
API Key: (use the key shown on home page, or any value if auth is disabled)
Gemini:
API Base URL: http://localhost:5642/api/gemini
API Key: (use the key shown on home page, or any value if auth is disabled)
Cursor IDE:
API Base URL: http://localhost:5642/api/cursor/v1
API Key: (use the key shown on home page, or any value if auth is disabled)
Note about Cursor IDE: Cursor uses OpenAI-compatible endpoints but with Anthropic/Claude-style tool definitions and message formats. AnyProxyAi automatically detects and converts Cursor's format to standard OpenAI format, so you can use any OpenAI-compatible backend with Cursor.
Note: The API Key shown on the home page is used for authentication. If you want to disable authentication, set
local_api_keyto empty string inconfig.json.
Enable redirect and set proxy_auto as your model name to automatically route to your configured target model.
โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Your App โโโโโโถโ AnyProxyAi โ
โ (Any SDK) โ โ localhost:5642 โ
โโโโโโโโโโโโโโโโโโโ โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ API Router โ โ
โ โ /api/v1/* โ OpenAI format โ โ
โ โ /api/cursor/* โ Cursor IDE format โ โ
โ โ /api/anthropic/* โ Claude format โ โ
โ โ /api/claudecode/*โ Claude Code format โ โ
โ โ /api/gemini/* โ Gemini format โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ Format Adapters โ โ
โ โ โโโโโโโโโโโโ โโโโโโโโโโโโ โโโโโโโโโโโโ โ โ
โ โ โ OpenAI โ โ Claude โ โ Gemini โ โ โ
โ โ โ Adapter โ โ Adapter โ โ Adapter โ โ โ
โ โ โโโโโโโโโโโโ โโโโโโโโโโโโ โโโโโโโโโโโโ โ โ
โ โ โโโโโโโโโโโโ โ โ
โ โ โ Cursor โ (Auto-detect & convert) โ โ
โ โ โ Adapter โ โ โ
โ โ โโโโโโโโโโโโ โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ Backend Routes (Cloud) โ โ
โ โ โโโโโโโโโโโโ โโโโโโโโโโโโ โโโโโโโโโโโโ โ โ
โ โ โ OpenAI โ โ Claude โ โ Gemini โ โ โ
โ โ โ Cloud โ โ Cloud โ โ Cloud โ โ โ
โ โ โโโโโโโโโโโโ โโโโโโโโโโโโ โโโโโโโโโโโโ โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
- Receive Request: Local proxy receives API request
- Route Matching: Find matching route by model name
- Format Detection: Detect source format from request path
- Adapter Selection: Choose appropriate adapter based on route format
- Request Transformation: Convert request to target format
- Backend Call: Forward to actual API endpoint
- Response Transformation: Convert response back to source format
- Statistics: Log request metrics
| Source โ Target | OpenAI | Claude | Gemini |
|---|---|---|---|
| OpenAI | Pass-through | claude-to-openai | gemini-to-openai |
| Claude | openai-to-claude | Pass-through | gemini-to-claude |
| Gemini | openai-to-gemini | claude-to-gemini | Pass-through |
{
"host": "localhost",
"port": 5642,
"database_path": "routes.db",
"local_api_key": "sk-local-default-key",
"redirect_enabled": true,
"redirect_keyword": "proxy_auto",
"redirect_target_model": "gpt-4-turbo",
"minimize_to_tray": true,
"auto_start": false
}Routes are stored in SQLite database (routes.db) with the following schema:
| Field | Type | Description |
|---|---|---|
name |
TEXT | Display name |
model |
TEXT | Model identifier (used for routing) |
api_url |
TEXT | Backend API base URL |
api_key |
TEXT | API authentication key |
group |
TEXT | Optional grouping |
format |
TEXT | API format: openai, claude, gemini |
enabled |
INTEGER | 1=enabled, 0=disabled |
- Go 1.22+
- Node.js 18+
# Install frontend dependencies
cd frontend && npm install && cd ..
# Run directly with Go
go run .# Build for current platform
go build -o anyproxyai .
# Or use the build script
./build.sh # Linux/macOS
build.bat # Windowsanyproxyai/
โโโ main.go # Application entry, Wails bindings
โโโ wails.json # Wails configuration
โโโ config.json # Runtime configuration
โ
โโโ internal/ # Go backend modules
โ โโโ adapters/ # API format converters
โ โ โโโ adapter.go # Adapter interface
โ โ โโโ anthropic.go # Claude adapter
โ โ โโโ gemini.go # Gemini adapter
โ โ โโโ openai_to_claude.go
โ โ โโโ claude_to_openai.go
โ โ โโโ ...
โ โโโ config/ # Configuration management
โ โโโ database/ # SQLite database
โ โโโ router/ # HTTP router (Gin)
โ โโโ service/ # Business logic
โ โ โโโ proxy_service.go # Proxy & streaming
โ โ โโโ route_service.go # Route management
โ โโโ system/ # System tray, autostart
โ
โโโ frontend/ # Vue 3 frontend
โโโ src/
โ โโโ App.vue # Main application
โ โโโ i18n/ # Internationalization
โ โโโ components/ # UI components
โโโ wailsjs/ # Wails bindings
This project uses GitHub Actions for automated multi-platform builds.
Builds are triggered in the following ways:
| Trigger | Build | Release | Example |
|---|---|---|---|
package(...) commit |
โ | โ | git commit -m "package(build): fix issue" |
tag(vX.X.X): message commit |
โ | โ | git commit -m "tag(v1.0.0): Initial release" |
Push tag v* |
โ | โ | git tag v1.0.0 && git push origin v1.0.0 |
| Pull Request | โ | โ | PR to main/master |
| Manual trigger | โ | โ | workflow_dispatch |
Use tag(version): description format in your commit message to automatically build, create tag, and publish release:
# This will: build all platforms โ create tag v1.0.0 โ publish release with description
git commit -m "tag(v1.0.0): Initial release with multi-format API support"
git push origin mainThe release description will be automatically filled with the text after the colon.
Use package(...) prefix for build-only commits:
git commit -m "package(build): fix linux arm64 build"
git push origin main- Go to Actions tab in GitHub repository
- Click on the completed workflow run
- Download individual artifacts:
anyproxyai-windows-amd64anyproxyai-windows-arm64anyproxyai-linux-amd64anyproxyai-linux-arm64anyproxyai-darwin-amd64anyproxyai-darwin-arm64
Q: Windows shows security warning? A: Click "More info" โ "Run anyway". The app is not code-signed.
Q: macOS shows "cannot be opened" error? A: Right-click โ Open โ Open. Or allow in System Preferences โ Security & Privacy.
Q: Port 5642 is already in use?
A: Edit config.json and change the port value, or change it in Settings page.
Q: How does format conversion work?
A: The proxy detects the incoming request format from the URL path and converts it to the target format based on the route's format setting.
Q: What is proxy_auto?
A: A special keyword that redirects to your configured target model, allowing you to use a single model name across different applications.
Q: Are token counts accurate? A: Token counts are estimates based on response data. Actual billing may differ.
Q: How to switch language? A: Click the language icon in the top-right corner to open the language switch popup. The setting is persistent.
Q: How to add a new adapter?
A: Implement the Adapter interface in internal/adapters/ and register it in adapter.go.
This project was inspired by and references the following projects:
- ccNexus - Claude Code Nexus
- LLM-API-Transform-Proxy - LLM API Transform Proxy
This project is open source under the MIT License.




