This project is maintained by an individual. The author makes no warranties and assumes no liability for risks arising from its use. Please evaluate carefully.
The core scope of this project does not include 2api (subscription-to-API conversion). If you need that, consider other open-source projects focused on 2api.
π Project Introduction
All-in-one AI Development Platform
AxonHub is the AI gateway that lets you switch between model providers without changing a single line of code.
Whether you're using OpenAI SDK, Anthropic SDK, or any AI SDK, AxonHub transparently translates your requests to work with any supported model provider. No refactoring, no SDK swapsβjust change a configuration and you're done.
What it solves:
π Vendor lock-in - Switch from GPT-4 to Claude or Gemini instantly
π§ Integration complexity - One API format for 10+ providers
π Observability gap - Complete request tracing out of the box
πΈ Cost control - Real-time usage tracking and budget management
# Download and extract (macOS ARM64 example)
curl -sSL https://github.com/looplj/axonhub/releases/latest/download/axonhub_darwin_arm64.tar.gz | tar xz
cd axonhub_*# Run with SQLite (default)
./axonhub
# Open http://localhost:8090# First run: Follow the setup wizard to initialize the system (create admin account, password must be at least 6 characters)
That's it! Now configure your first AI channel and start calling models through AxonHub.
Zero-Code Migration Example
Your existing code works without any changes. Just point your SDK to AxonHub:
fromopenaiimportOpenAIclient=OpenAI(
base_url="http://localhost:8090/v1", # Point to AxonHubapi_key="your-axonhub-api-key"# Use AxonHub API key
)
# Call Claude using OpenAI SDK!response=client.chat.completions.create(
model="claude-3-5-sonnet", # Or gpt-4, gemini-pro, deepseek-chat...messages=[{"role": "user", "content": "Hello!"}]
)
Switch models by changing one line: model="gpt-4" β model="claude-3-5-sonnet". No SDK changes needed.
# Extract and run
unzip axonhub_*.zip
cd axonhub_*# Set environment variablesexport AXONHUB_DB_DIALECT="tidb"export AXONHUB_DB_DSN="<USER>.root:<PASSWORD>@tcp(gateway01.us-west-2.prod.aws.tidbcloud.com:4000)/axonhub?tls=true&parseTime=true&multiStatements=true&charset=utf8mb4"
sudo ./install.sh
# Configuration file check
axonhub config check
# Start service# For simplicity, we recommend managing AxonHub with the helper scripts:# Start
./start.sh
# Stop
./stop.sh
π Usage Guide
Unified API Overview
AxonHub provides a unified API gateway that supports both OpenAI Chat Completions and Anthropic Messages APIs. This means you can:
Use OpenAI API to call Anthropic models - Keep using your OpenAI SDK while accessing Claude models
Use Anthropic API to call OpenAI models - Use Anthropic's native API format with GPT models
Use Gemini API to call OpenAI models - Use Gemini's native API format with GPT models
Automatic API translation - AxonHub handles format conversion automatically
Zero code changes - Your existing OpenAI or Anthropic client code continues to work
1. Initial Setup
Access Management Interface
http://localhost:8090
Configure AI Providers
Add API keys in the management interface
Test connections to ensure correct configuration
Create Users and Roles
Set up permission management
Assign appropriate access permissions
2. Channel Configuration
Configure AI provider channels in the management interface. For detailed information on channel configuration, including model mappings, parameter overrides, and troubleshooting, see the Channel Configuration Guide.
3. Model Management
AxonHub provides a flexible model management system that supports mapping abstract models to specific channels and model implementations through Model Associations. This enables:
Unified Model Interface - Use abstract model IDs (e.g., gpt-4, claude-3-opus) instead of channel-specific names
Intelligent Channel Selection - Automatically route requests to optimal channels based on association rules and load balancing
Flexible Mapping Strategies - Support for precise channel-model matching, regex patterns, and tag-based selection
Priority-based Fallback - Configure multiple associations with priorities for automatic failover
For comprehensive information on model management, including association types, configuration examples, and best practices, see the Model Management Guide.
4. Create API Keys
Create API keys to authenticate your applications with AxonHub. Each API key can be configured with multiple profiles that define:
Model Mappings - Transform user-requested models to actual available models using exact match or regex patterns
Channel Restrictions - Limit which channels an API key can use by channel IDs or tags
Model Access Control - Control which models are accessible through a specific profile
Profile Switching - Change behavior on-the-fly by activating different profiles
For detailed information on API key profiles, including configuration examples, validation rules, and best practices, see the API Key Profile Guide.
5. AI Coding Tools Integration
See the dedicated guides for detailed setup steps, troubleshooting, and tips on combining these tools with AxonHub model profiles:
## What's Changed * chore: sync model developers data by @github-actions[bot] in https://github.com/looplj/axonhub/pull/1416 * Revert "fix(channels): bulk weight adjustment not populating on drag β¦ by @looplj in https://github.com/looplj/axonhub/pull/1420 * doc: fix broken doc link by @looplj in https://github.com/looplj/axonhub/pull/1422 * chore: sync model developers data by @github-actions[bot] in https://github.com/looplj/axonhub/pull/1423 * docs: rename model mapping to model alias by
High
4/21/2026
v0.9.34
## What's Changed * opt: change save data to not return value by @looplj in https://github.com/looplj/axonhub/pull/1405 * opt: generate stable device id and account uuid for claude code by @looplj in https://github.com/looplj/axonhub/pull/1406 * fix(channels): bulk weight adjustment not populating on drag reorder by @djdembeck in https://github.com/looplj/axonhub/pull/1401 * chore(i18n): θ‘₯ε StepFun εΌεθ εη§°ηΏ»θ― by @llc1123 in https://github.com/looplj/axonhub/pull/1407 * fix(anthropic): accept x
High
4/17/2026
v0.9.33
## What's Changed * feat: gemini/doubao embedding, close #1093 by @looplj in https://github.com/looplj/axonhub/pull/1388 * opt: try to fix channel/model cache not refreshed by @looplj in https://github.com/looplj/axonhub/pull/1390 * opt: align codex trace header with latest codex cli by @yoke233 in https://github.com/looplj/axonhub/pull/1387 * feat: realtime chunks preview and response preview by @LazuliKao in https://github.com/looplj/axonhub/pull/1342 * feat: add cache diagnostics tool by
High
4/16/2026
v0.9.32
## What's Changed * feat: channel rpm settings, close #746 by @looplj in https://github.com/looplj/axonhub/pull/1320 * feat: channel concurrency settings, close #1130 by @looplj in https://github.com/looplj/axonhub/pull/1322 * chore(deps): upgrade aws eventstream by @looplj in https://github.com/looplj/axonhub/pull/1332 * feat: add kwaipilot developer catalog support by @llc1123 in https://github.com/looplj/axonhub/pull/1328 * feat: repsect channel response with retry after, close #858 by @
High
4/13/2026
v0.9.31
## What's Changed * fix: allow nil project profiles, close #1316 by @looplj in https://github.com/looplj/axonhub/pull/1317 **Full Changelog**: https://github.com/looplj/axonhub/compare/v0.9.30...v0.9.31
High
4/7/2026
Dependencies & License Audit
Loading dependencies...
Similar Packages
cc-relayβ‘οΈ Blazing fast LLMs API Gateway written in Gov0.0.16
claude-containerπ³ Run Claude Code safely in isolated Docker containers with persistent projects and easy setup on macOS using Justfile automation.master@2026-04-21
structured-prompt-skillβοΈ Write effective AI prompts with this structured prompt engineering library and Claude Code skill, featuring 300+ curated examples for high-quality results.main@2026-04-21
AetherArtifical Ecology For Thought and Emergent Reasoning. The Colony That Builds With You.v1.0.17
crab-codeπ¦ Open-source alternative to Claude Code, built from scratch in Rust. Agentic coding CLI β thinks, plans, and executes with any LLM. Compatible with Claude Code workflows.main@2026-04-21