modelbus/one-api-pro
one-api-pro is an enterprise-grade AI API Gateway built on one-api(oneapi). It has undergone a full architectural redesign, adding support for subscription plans, active-active clusters, precise billing. one-api-pro是基于one-api(oneapi)的企业级AI API Gateway网关,进行了架构级别的重构,全新支持套餐订阅、多活集群、精确计费、渠道成本管控等功能,适合企业级多员工、多模型统一管理与私有化部署
OneAPI Pro – Enterprise‑grade AI API Gateway (Go + Vue 3)
What it is – A self‑hosted gateway that sits in front of many large‑language‑model providers (OpenAI, Anthropic, Gemini, DeepSeek, etc.) and exposes a single OpenAI‑compatible HTTP API. It adds a full‑featured admin console, token‑based access control, subscription/plan billing, usage dashboards and optional decentralized multi‑node clustering.
Key components
- Backend – Written in Go, built on the Gin web framework. Uses GORM for relational DB access (SQLite, MySQL or PostgreSQL) and optional Redis for caching. Integrates with AWS Bedrock, Google Gemini, and dozens of other LLM providers via a plug‑in registry.
- Frontend – Vue 3 + Vite UI built with Arco Design. Provides a visual dashboard (model usage charts, token limits, plan management, cluster node status, etc.).
- Deployment – Distributed as a single static binary (Linux/macOS/Windows) or as a Docker image (
ghcr.io/modelbus/one-api-pro). Supports manual, Docker, docker‑compose, multi‑machine, and fully decentralized multi‑active cluster setups.
Why it matters
- Unified access – Teams can call many different LLM services through one consistent
/v1/...endpoint, simplifying client code. - Enterprise controls – Fine‑grained token policies (model whitelist, IP subnet limits, quota caps, expiration), role‑based permissions (guest, user, admin, root), and audit logs.
- Monetisation – Built‑in subscription plans, per‑token or per‑request pricing, automatic cost accounting, and integration with WeChat Pay and Alipay for real‑time balance top‑ups.
- Scalability – Load‑balancing across providers, automatic fail‑over, and a “decentralized multi‑active cluster” mode where each node runs its own MySQL/Redis and synchronises changes via application‑level events—no shared database required.
Getting started
- Download a pre‑compiled binary (or run
./release.shto build for all platforms). - Build the Vue admin UI (
cd web && sh build.sh). - Run
./one-api-pro --port 3000 --log-dir ./logs. - Log in with the default
root / 123456account and configure providers, tokens, and plans via the web UI.
Configuration – All settings are supplied via environment variables or a .env file (e.g., SQL_DSN for the database, REDIS_CONN_STRING for caching, THEME to pick a UI theme, and a suite of CLUSTER_* variables to enable the decentralized cluster mode).
Documentation – Full API reference (OpenAI‑compatible endpoints, admin CRUD, cluster sync APIs) lives in docs/API.md. The project also ships a multilingual README (English, Chinese, Japanese, Russian, Korean, Arabic, German, etc.).
OneAPI Pro is a genuine, actively maintained open‑source project that provides an enterprise‑ready AI API gateway and management platform.
Related
- Project
- Project
- Project
- Project
- Project