Model or dataset
looplj/axonhub avatar
looplj/axonhub

AxonHub: an AI gateway that swaps providers behind your SDK

⚡️ Open-source AI Gateway — Use any SDK to call 100+ LLMs. Built-in failover, load balancing, cost control & end-to-end tracing.

5,323 stars721 forksGoApache-2.0

At a glance

What is it?
AxonHub is an Apache-2.0 licensed open-source AI gateway written in Go: any AI SDK's requests are translated transparently to any supported provider, so switching from one model vendor to another is a configuration change with zero code edits. It layers failover under 100 milliseconds, role-based access control, per-request cost tracking and full request tracing on top, and is shipping weekly betas toward 1.0.
Who is it for?
Use AxonHub when applications must stay SDK-stable while the model vendors underneath change, and when routing needs failover, quotas, cost ceilings and traceable requests rather than a plain proxy. Prefer a managed AI gateway when operating another service is worse than per-request fees, and one of the older self-hosted relay projects when you need breadth of community plugins more than tracing and RBAC.
Can I use it commercially?
Yes. Apache-2.0 is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
Is it still maintained?
Yes. The repository last received commits 2 days ago.
What is it written in?
Mainly Go, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on September 29, 2026, and from our analysis. They are not legal advice.

Editorial analysis

Translation as the answer to lock-in

AxonHub's one-line thesis is that switching model providers should require zero code changes: whether an application uses the OpenAI SDK, the Anthropic SDK or any AI SDK, the gateway transparently converts requests into the format of whichever supported provider is configured, with no refactoring and no SDK replacement, only configuration. The problems it names are the ones every multi-vendor team recognizes, vendor lock-in, switching from GPT-4 to Claude or Gemini instantly, integration complexity, one API format fronting ten or more providers, the observability gap, filled by out-of-the-box request tracing, and cost control, served by real-time usage tracking and budget management. Positioning itself as an all-in-one AI development platform, it puts the translation layer at the center and builds the operational features around it, which is the correct dependency order: governance and observability only work once the wire format problem is solved.

Five features with numbers attached

The core feature table is specific where competitors are vague. Any SDK to any model means using the OpenAI SDK to call Claude or the Anthropic SDK to call GPT, zero code changes, with per-protocol API references for the OpenAI, Anthropic and Gemini shapes. Full request tracing provides thread-level observability, a complete timeline of each request, aimed at locating problems faster than log spelunking. Enterprise RBAC delivers fine-grained access control, usage quotas and data isolation, the properties that make a shared gateway survivable inside a company. Smart load balancing carries the table's one number, automatic failover in under 100 milliseconds, always routing to the healthiest channel. And real-time cost tracking shows a per-request cost breakdown covering input, output and cached tokens, the granularity a budget alert actually needs. Numbers and scope claims like these are checkable in a trial, which is how feature tables should be written.

Four API families done, realtime pending

The API surface is tracked as a status table rather than asserted. Text generation is complete, with separate API references for the OpenAI, Anthropic and Gemini request formats, the three dialects most applications actually speak. Image generation is complete. Rerank, the result reordering endpoint retrieval pipelines depend on, is complete, as is embedding generation. The one entry marked todo is realtime conversation, the streaming voice-and-text API family, an honest gap in a landscape where realtime interfaces are newly widespread. The provider table follows the same discipline, OpenAI covering GPT-4, GPT-4o and GPT-5 era models, Anthropic covering the Claude line, each row naming which compatible APIs expose that provider's models. For an adopter, the tables convert evaluation from a discovery process into a checklist, and the todo marker is the kind of disclosure that builds more trust than a marketing blanket.

A demo with published credentials

Trying the product requires no deployment: a demo instance runs at axonhub.onrender.com, hosted on Render per the render.yaml in the repository, configured with free models from Zhipu and OpenRouter, and the README publishes the demo account, [email protected] with password 12345678. Publishing credentials is unusual and deliberate, it removes the signup barrier from evaluation at the cost of the instance being a shared sandbox, and the choice of free-model providers means the demo costs its maintainer roughly nothing to keep alive. The documentation surrounds this with a full index page for navigation and machine-generated deep documentation on DeepWiki and zread, so a reader can move from clicking the demo to reading the architecture without an install step in between. Screenshots of the dashboard, channel management, model pricing, model list, trace viewer and request monitor are committed under docs for the same purpose.

Go, GraphQL, Ent and an isolated llm/ module

The implementation reads as modern Go server craft. HTTP runs on gin with SSE support for streaming, the API layer is GraphQL through gqlgen with code generation, persistence uses the Ent ORM over PostgreSQL via pgx, with a MySQL driver also in the dependency list, and wiring goes through uber's fx with zap logging. Authentication includes JWT and OpenID Connect, single sign-on for the enterprise posture, caching through gocache, and storage abstraction reaches S3 and WebDAV backends through afero adapters. Two structural choices stand out: the llm/ directory is its own Go module, isolating the provider abstraction from the main binary's dependency churn, and the frontend builds separately with pnpm and Vite, its dist embedded into the Go binary's static directory so the deployment artifact is one executable carrying its interface. The Dockerfile even verifies its SSE dependencies with dedicated scripts during the build.

A compose file hardened by default

The docker-compose configuration deserves reading as a security document. The PostgreSQL service runs read-only with tmpfs mounts, no-new-privileges, a dedicated healthcheck and bounded logging. Environment variable handling refuses to proceed without DB_PASSWORD, explicitly declining to provide a weak default, and requires AXONHUB_IMAGE and POSTGRES_IMAGE to be set, recommending immutable digests over floating tags. The service binds to the loopback address by default, so exposing it publicly is an explicit decision rather than an accident, and the comments lay out the three configuration tiers, environment variables for secrets, a config file for complexity, and plain defaults for simple deployments. This is container hygiene of a standard most production software still ships without, and it matches the project's enterprise RBAC claims rather than contradicting them.

Beta cadence on an unstable branch, with affiliate economics

The development posture is transparent to the point of naming the default branch unstable, and releases are weekly betas, v1.0.0-beta8 on 2026-09-02, beta9 the next day and beta10 on 2026-09-06, with the repository pushed as recently as today. The Makefile reveals the quality machinery, Playwright end-to-end tests with dedicated database cleanup, migration tests across all supported databases, a lint-privacy target, FAQ and model catalog synchronization, and schema generation. Multiple AI-assistant configuration directories, .trae, .windsurf, .agent alongside AGENTS.md and CLAUDE.md, mark the development style. Funding runs through a sponsor table of Chinese API relay services with affiliate discount codes plus Bloome for hosted trials, an honest monetization shape for an Apache-2.0 infrastructure project whose NOTICE file keeps attribution clean.

Editorial conclusion

Use AxonHub when applications must stay SDK-stable while the model vendors underneath change, and when routing needs failover, quotas, cost ceilings and traceable requests rather than a plain proxy. Prefer a managed AI gateway when operating another service is worse than per-request fees, and one of the older self-hosted relay projects when you need breadth of community plugins more than tracing and RBAC. Verify first that every provider and API family you depend on is in the supported table, note that realtime APIs are still marked todo, pin an immutable image digest as the compose file itself instructs, and treat the beta versioning accordingly before production reliance.

Frequently asked questions

What is AxonHub?

AxonHub is an Apache-2.0 licensed open-source AI gateway written in Go that lets any AI SDK call more than 100 models by transparently translating requests between provider formats. It adds sub-100ms failover, load balancing, per-request cost tracking, full request tracing and enterprise role-based access control.

How do you use AxonHub?

Point your existing OpenAI, Anthropic or other AI SDK at an AxonHub deployment and change configuration rather than code; the gateway translates requests to the configured provider. A public demo runs at axonhub.onrender.com with free models from Zhipu and OpenRouter.

Does AxonHub support image generation and embeddings?

Yes. Text generation, image generation, rerank and embedding APIs are all implemented, documented across the OpenAI, Anthropic and Gemini request formats, while a realtime conversation API is listed as still to do.

Official sources

  1. Issues
  2. looplj/axonhub on GitHub
  3. Project website
  4. README
  5. Releases
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/looplj-axonhub.svg)](https://hysenlabs.com/projects/looplj-axonhub)