{"slug": "a-private-enterprise-ai-gateway", "title": "A private enterprise AI gateway", "summary": "TokenHub, a private enterprise AI gateway developed by Asta Xie, provides role-based workspaces for users, team leaders, and administrators, separating model usage, team governance, and platform administration. The gateway supports OpenAI-compatible APIs, multiple provider channels including Azure OpenAI, Anthropic, and DeepSeek, and offers features such as project-scoped API keys, usage analytics, and OAuth/OIDC enterprise sign-in, with deployment via Docker Compose and an Apache 2.0 license.", "body_md": "TokenHub is a private enterprise AI gateway with role-based workspaces for users, team leaders, and administrators.\n\n| Login Console | Gateway Overview |\n|---|---|\n| API Documentation | Provider Channels |\n| Model Catalog | Routing Policies |\n| Usage Analytics | System Settings |\n\nTokenHub separates everyday model usage, team governance, and platform administration so enterprise users see the workflows that match their responsibility.\n\n| Role | Workspace Focus | Guide |\n|---|---|---|\n| User | Find available models, create project-scoped API keys, call the model API, and review personal usage |\n|\n\n[Team Leader Guide](/astaxie/TokenHub/blob/main/docs/team-leader-guide.md)[Administrator Guide](/astaxie/TokenHub/blob/main/docs/administrator-guide.md)- OpenAI-compatible model APIs:\n`/v1/chat/completions`\n\n,`/v1/responses`\n\n,`/v1/embeddings`\n\n. - Provider channels for OpenAI-compatible, Azure OpenAI, Anthropic, Gemini, DeepSeek, Qwen, local vLLM/Ollama, and custom upstreams.\n- Model catalog and routing policies with priority, weight, failover order, and route health diagnostics.\n- Project-scoped key management with team ownership, member permissions, quotas, and concurrency controls.\n- Usage analytics and request logs attributed to user, project, team, model, and cost center.\n- Identity source configuration for OAuth/OIDC enterprise sign-in, plus RBAC and audit trails.\n- Clean console with compact role-aware navigation, global search, light/dark mode, and split-view API documentation.\n- SQLite-first private deployment with Docker Compose support.\n- Console language switching for English, Chinese, and Japanese.\n\n```\ncp deploy/.env.example deploy/.env\ndocker compose --env-file deploy/.env -f deploy/docker-compose.yml up -d --build\n```\n\nOpen:\n\n- Admin console:\n`http://localhost:3000`\n\n- Backend API:\n`http://localhost:8080`\n\n- Health check:\n`http://localhost:8080/healthz`\n\nDefault admin login:\n\n- Username:\n`admin`\n\n- Password:\n`admin123456`\n\nChange the default password and secrets in `deploy/.env`\n\nbefore exposing TokenHub beyond a local machine.\n\nBackend:\n\n```\ncd backend\ngo run ./cmd/tokenhub\n```\n\nFrontend:\n\n```\ncd frontend\nnpm install\nnpm run dev\n```\n\nSmoke-test the model API with the included SDK example:\n\n```\ncd sdk\nnpm install\nnpm run test:deepseek\n```\n\nTokenHub is licensed under the [Apache License 2.0](/astaxie/TokenHub/blob/main/LICENSE).", "url": "https://wpnews.pro/news/a-private-enterprise-ai-gateway", "canonical_source": "https://github.com/astaxie/TokenHub", "published_at": "2026-07-21 17:03:07+00:00", "updated_at": "2026-07-21 17:12:56.816418+00:00", "lang": "en", "topics": ["ai-infrastructure", "ai-tools", "developer-tools"], "entities": ["TokenHub", "Asta Xie", "OpenAI", "Azure OpenAI", "Anthropic", "DeepSeek", "Docker Compose"], "alternates": {"html": "https://wpnews.pro/news/a-private-enterprise-ai-gateway", "markdown": "https://wpnews.pro/news/a-private-enterprise-ai-gateway.md", "text": "https://wpnews.pro/news/a-private-enterprise-ai-gateway.txt", "jsonld": "https://wpnews.pro/news/a-private-enterprise-ai-gateway.jsonld"}}