What is TokenHub?
TokenHub is an open-source enterprise AI gateway that places governance controls in front of model requests. TokenHub combines provider access, project keys, routing policies, usage attribution, budget control, and bill reconciliation. The project addresses organizations where multiple teams, applications, and workflows consume models and tokens, with separate workspaces for everyday users, team leaders, and platform administrators.
TokenHub treats provider connectivity as part of a broader operating workflow rather than only offering an endpoint for multiple upstream services. Administrators can change access, routing, and fallback policies without rewriting client code. Finance, platform, and business teams can compare bills and request histories against internal ownership to explain AI spending.
What TokenHub can do
TokenHub combines request routing with access management, operational visibility, and cost controls. TokenHub attributes usage to internal owners while keeping provider policies centralized across hosted APIs, subscription channels, local models, and custom upstreams. The available API capabilities extend beyond chat to retrieval and image workflows.
- TokenHub manages project-scoped keys with team ownership, member permissions, quotas, and concurrency controls.
- TokenHub routes requests using priorities, weights, failover order, scenario-aware selection, and health diagnostics.
- TokenHub records usage and requests by user, project, team, model, and cost center.
- TokenHub supports token budgets and provider spend comparison.
- TokenHub provides OAuth/OIDC identity configuration, RBAC, and audit trails.
- TokenHub supports embeddings, document reranking, image generation, and reference-image editing.
How TokenHub works
TokenHub connects upstream services through a Provider abstraction and exposes OpenAI-compatible and Anthropic Messages APIs. Native adapters cover OpenAI, Azure OpenAI, Anthropic, Gemini, DeepSeek, Qwen, Codex subscriptions, and local models. Provider templates use a matching native adapter where available and otherwise connect through an OpenAI-compatible endpoint.
TokenHub supports installation on a Linux systemd host or through Docker Compose from a repository checkout. The native installer verifies release checksums and installs a systemd service. Docker setup requires replacing example secrets. SQLite is the initial storage approach, while remote PostgreSQL supports shared state and horizontally scaled frontend and backend replicas.
Who TokenHub is for
TokenHub serves enterprise users who need model access, team leaders responsible for project governance, and administrators operating shared AI infrastructure. TokenHub also supports finance and business teams investigating AI costs. Role-specific workspaces separate personal usage, project membership, reporting, provider configuration, identity management, and platform operations.
- TokenHub lets users find available models, create project-scoped keys, and review personal usage.
- TokenHub lets team leaders manage project spaces, members, keys, reports, and cost attribution.
- TokenHub lets administrators configure providers, routing policies, identity sources, and audit controls.
- TokenHub supports comparing provider bills with internally attributed usage.
TokenHub licensing and access
TokenHub is available as an open-source project under the Apache License 2.0 through its public GitHub repository. TokenHub provides native installation and Docker Compose deployment paths, along with architecture documentation and guides for users, team leaders, and administrators. The repository does not state commercial TokenHub subscription plans or hosted-service prices.
TokenHub strengths and limitations
TokenHub brings routing, access control, attribution, and reconciliation into the same private gateway, with policies that administrators can adjust independently of client code. TokenHub also separates operational responsibilities through role-aware workspaces. Deployment and upstream dependencies remain important considerations, and the source distinguishes existing cost controls from future caching-driven savings.
- TokenHub requires host or container deployment and configuration of installation secrets.
- TokenHub model availability and capabilities vary by upstream service and account.
- TokenHub multi-instance Docker deployments retain operator-managed Compose updates.
- TokenHub lists caching-driven savings as a future capability.
TokenHub FAQ
What is TokenHub?
TokenHub is an open-source enterprise AI gateway for model access and token governance. TokenHub combines routing, project-scoped keys, permissions, usage attribution, budget controls, and provider reconciliation, with separate workspaces for users, team leaders, and administrators.
Is TokenHub free?
TokenHub is available as an open-source project under the Apache License 2.0, with source code and private deployment instructions on GitHub. TokenHub does not state commercial subscription prices in the supplied repository text.
Which AI providers does TokenHub support?
TokenHub includes native adapters for OpenAI, Azure OpenAI, Anthropic, Gemini, DeepSeek, Qwen, Codex subscriptions, and local models. TokenHub also supports custom OpenAI-compatible upstreams and provider templates, while model availability and capabilities depend on the upstream service and account.
Can TokenHub be self-hosted?
TokenHub supports private deployment on a Linux systemd host or through Docker Compose. TokenHub uses a SQLite-first deployment approach and supports remote PostgreSQL for multi-instance deployments with shared state, horizontally scaled frontend and backend replicas, and configurable connection pools.
What APIs does TokenHub provide?
TokenHub provides OpenAI-compatible chat completions, responses, embeddings, image generation, and image editing APIs, alongside Anthropic Messages and token-counting APIs. TokenHub also supports document reranking, asynchronous image jobs, and server-side image retention.
How does TokenHub help track AI costs?
TokenHub attributes usage analytics and request logs to users, projects, teams, models, and cost centers. TokenHub supports token budgets and provider spend comparison so finance, platform, and business teams can compare internal usage with provider bills.
From the community
No reviews yet
Be the first to review this tool. What you write helps the next person choose.




