One API (36,211 Stars) LLM Gateway Setup 2026: One Key for OpenAI, Claude, Gemini and DeepSeek
one-api (36,211 stars) is the most-starred LLM API gateway: it unifies OpenAI, Azure, Claude, Gemini, DeepSeek and Doubao behind one key. Here is the full self-host setup.
💡 What You Will Learn
one-api (36,211 stars) is the most-starred LLM API gateway: it unifies OpenAI, Azure, Claude, Gemini, DeepSeek and Doubao behind one key. Here is the full self-host setup.
## The short answer
**songquanpeng/one-api** (36,211 stars, JavaScript) is an LLM API management and distribution system. It aggregates dozens of providers - OpenAI, Azure, Anthropic Claude, Google Gemini, DeepSeek, ByteDance Doubao, Zhipu, and more - behind a single OpenAI-compatible endpoint. You hand your team one key, and one-api routes, meters, and rate-limits every request.
## Why teams run it
- **One base URL** for all models: `http://your-server:3000/v1`
- **Per-user quotas and tokens**: create keys per member, cap spending per day
- **Cost tracking**: logs every request with model, token count and price
- **Model fallback**: if one provider fails, requests fail over to a backup
## Deploy in 10 minutes
1. Run the container (SQLite mode is fine for small teams):
```bash
docker run --name one-api -d --restart always \n -p 3000:3000 -v /data/one-api:/data \n ghcr.io/songquanpeng/one-api:latest
```
2. Open http://localhost:3000, default admin is `root` / `123456` (change it immediately).
3. Go to **Channels** - Add Channel: pick provider (e.g. OpenAI), paste the API key.
4. Go to **Tokens** - create a token; that is the single key your apps will use.
5. Point any OpenAI SDK at `http://localhost:3000/v1` with the new token.
## Practical notes
- Enable **Model Ratio** settings to control price multipliers per model.
- Use the **Logs** page to catch abuse - you can see each user token spend in real time.
- For production, back up `/data` (the SQLite DB or MySQL) daily.
## FAQ
**Is it compatible with the OpenAI SDK?** Yes - it exposes `/v1/chat/completions` exactly like OpenAI, so LangChain, Open WebUI and most tools work unchanged.
**Can it route to local models?** Yes, add a channel pointing at Ollama or vLLM and serve local and cloud models through the same key.
**Does it support Chinese providers?** Yes - DeepSeek, Doubao, Qwen, Zhipu and others are built-in presets.
Related Articles
2026-06-29
The Mainline Dragon Strategy โ Chasing the Leader Without Paying for Data
2026-06-29
The AI Hiding in Your Laptop
2026-07-14
Free AI Coding Assistant Setup 2026: 5-Min VS Code Guide (Continue, Copilot, Windsurf)
