# AxonHub

> Use any SDK to call any LLM, with failover, cost tracking, and request tracing built in

- Category: Evaluation & Production Ops / Gateways & Routing
- Language: Go
- Licence: Apache-2.0
- Repository: https://github.com/looplj/axonhub
- Canonical page: https://ai-tldr.dev/tools/axonhub/

## In short

AxonHub is an open-source AI gateway that sits between your application and the LLM providers you use. You point your existing OpenAI or Anthropic SDK at AxonHub, and it translates each request so the same code can reach Claude, GPT, Gemini, and other supported models. It sits in the Gateways & Routing category of the Evaluation & Production Ops tools and is open-source, written in Go and licensed Apache-2.0.

## Overview

AxonHub is an open-source AI gateway that sits between your application and the LLM providers you use. You point your existing OpenAI or Anthropic SDK at AxonHub, and it translates each request so the same code can reach Claude, GPT, Gemini, and other supported models. Switching providers becomes a configuration change instead of a code rewrite.

It is aimed at teams that already call LLM APIs directly and want a single point of control. As an LLM gateway, it adds the operational layer that raw SDKs lack: automatic failover between channels, load balancing, per-request cost tracking, role-based access control, and end-to-end request tracing for debugging.

AxonHub is written in Go with a TypeScript and React frontend, and runs as a self-hosted service. You can start it from a release binary, Docker Compose, or a Helm chart, then send requests to its OpenAI-compatible endpoint at http://localhost:8090/v1.

## What it does

- Use the OpenAI SDK to call Claude, or the Anthropic SDK to call GPT, with no code changes
- Smart load balancing with automatic failover to the healthiest channel
- Full request tracing with thread-aware timelines for faster debugging
- Real-time cost tracking with per-request breakdown of input, output, and cache tokens
- Role-based access control with usage quotas and data isolation
- Self-hosted deployment via release binary, Docker Compose, or Helm

## Getting started

Run AxonHub locally from a release binary, then call it with the standard OpenAI SDK pointed at its endpoint.

1. Download and run the binary

   Grab the latest release for your platform, extract it, and start the service. It listens on port 8090.

```bash
curl -sSL https://github.com/looplj/axonhub/releases/latest/download/axonhub_darwin_arm64.tar.gz | tar xz
cd axonhub_*
./axonhub
```

2. Open the dashboard

   Once running, open http://localhost:8090 to configure providers and create an API key.

3. Send a request through the gateway

   Point the OpenAI SDK at the AxonHub base URL and use your AxonHub API key. The same client can target models from different providers.

```python
from openai import OpenAI

client = OpenAI(
    base_url="http://localhost:8090/v1",
    api_key="your-axonhub-api-key"
)

response = client.chat.completions.create(
    model="claude-3-5-sonnet",
    messages=[{"role": "user", "content": "Hello!"}]
)
```

4. Deploy with Docker Compose (optional)

   For a server deployment, clone the repo and bring it up with Docker Compose.

```bash
git clone https://github.com/looplj/axonhub.git
cd axonhub
docker-compose up -d
```

## When to use it

- Switch an app from one LLM provider to another without touching SDK code
- Add failover and load balancing across multiple model channels for reliability
- Track and control LLM spend with per-request cost breakdowns
- Trace and debug LLM requests across a team with shared access control
