OpenAI-compatible LLM gateway for NVIDIA NIM — API key pool, proxy rotation, streaming chat UI & coder IDE agent.
NVIDIA Hub turns a pile of free NVIDIA NIM API keys into one reliable, self-hosted OpenAI-compatible gateway. Drop in your keys, point any OpenAI client (Codex CLI, Continue, LangChain, your own scripts) at http://localhost:8400/v1 — and the hub load-balances requests across the whole key pool, rotates HTTP/SOCKS5 proxies, retries failures and cools down rate-limited keys automatically. On top of that you get a slick dark chat UI with streaming and a built-in coder IDE agent that reads/writes files and runs shell commands via function calling.
No .env files, no YAML — everything is configured from the web interface.
- 🔑 API key pool — add keys one by one or bulk-import a list; round-robin or least-used strategy; automatic cooldown on
401/429; per-key stats (requests, errors, tokens, avg latency). - 🌐 Proxy rotation — attach multiple
http/socks5proxies to each key; per-request rotation; dead proxies are evicted automatically. - 🔌 OpenAI-compatible endpoint —
POST /v1/chat/completions(streaming + non-streaming) andGET /v1/models. Any API key string works on the client side — the hub substitutes real keys from the pool. - 💬 Chat UI — token streaming, markdown with code highlighting, generation controls (temperature, top_p, max tokens), system prompt, multiple chats, export, stop generation at any moment.
- 🧑💻 Coder IDE agent — workspace file manager + code editor + agent with function calling (read/write files, run commands) and live tool-call visualization.
- 📊 Live statistics — per-key usage, recent requests log with model/latency/status, uptime, auto-refresh.
- 🖥️ One-file config —
data/config.jsonis created automatically; change everything from the UI.
Grab the ready-made standalone build from Releases:
- Windows:
nvidia-hub-windows.exe— double-click, done - Linux:
nvidia-hub-linux—chmod +x nvidia-hub-linux && ./nvidia-hub-linux
Then open http://localhost:8400. Keys and settings are stored in data/ next to the binary. Set PORT env var to change the port.
Requirements: Python 3.10+
git clone https://github.com/Ax1zz/nvidia-hub.git
cd nvidia-hub
python3 -m venv venv
venv/bin/pip install -r requirements.txt
venv/bin/python -m app.mainOpen http://localhost:8400 → Ключи / Keys → add your NVIDIA API keys (get one free at build.nvidia.com) → start chatting.
Custom port: PORT=9000 venv/bin/python -m app.main
Base URL: http://<host>:8400/v1 — API key: any string (the hub injects real keys from the pool).
curl http://localhost:8400/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{"model": "meta/llama-3.1-8b-instruct", "messages": [{"role":"user","content":"hi"}], "stream": true}'Works out of the box with Codex CLI, Continue.dev, OpenAI Python SDK, LangChain, and any tool that accepts a custom OpenAI base URL:
from openai import OpenAI
client = OpenAI(base_url="http://localhost:8400/v1", api_key="anything")
print(client.chat.completions.create(
model="meta/llama-3.1-8b-instruct",
messages=[{"role": "user", "content": "hello"}],
).choices[0].message.content)- Key selection —
round-robin(по кругу) orleast-used; keys that return401/429go into a configurable cooldown (cooldown_s, default 60s) while remaining keys absorb the traffic; up tomax_retriestransparent retries per request. - Proxy pool — each key can carry several proxies; every request takes the next proxy in line, dead ones are marked and skipped. Direct connection is used when no proxies are attached.
- Storage — keys, proxies and settings live in
data/config.json(created on first run;chmod 600on a shared host). Chats persist indata/chats.json.
nvidia-hub/
├── app/ # FastAPI backend
│ ├── main.py # HTTP endpoints
│ ├── pool.py # key & proxy pools, rotation, cooldowns
│ ├── upstream.py # NVIDIA NIM upstream client
│ ├── agent.py # coder agent (function calling)
│ ├── chats.py # chat persistence
│ └── config.py # config store
├── static/ # frontend SPA (vanilla JS, no build step)
├── docs/screenshots/ # UI screenshots
├── CONTRACT.md # API contract
└── requirements.txt # fastapi, uvicorn, httpx[socks]
- The hub has no authentication — bind it to localhost or put it behind your own reverse proxy/VPN.
data/config.jsoncontains your API keys — never commit it (it is already in.gitignore).
Issues and pull requests are welcome. If this project saved you time — give it a ⭐, it helps a lot.
MIT © Ax1zz
NVIDIA Hub превращает пачку бесплатных API-ключей NVIDIA NIM в один надёжный OpenAI-совместимый шлюз на вашей машине. Добавьте ключи, направьте любой OpenAI-клиент (Codex CLI, Continue, LangChain, свои скрипты) на http://localhost:8400/v1 — хаб сам распределит запросы по всему пулу ключей, будет ротировать HTTP/SOCKS5-прокси, повторять неудачные запросы и отправлять «отдохнуть» ключи, словившие rate-limit. Сверху — стильный тёмный чат со стримингом и встроенный coder-агент с IDE, который читает и правит файлы и запускает команды через function calling.
Никаких .env и YAML — всё настраивается через веб-интерфейс.
- 🔑 Пул ключей — добавление по одному или массовым импортом; стратегии round-robin / least-used; автоматический cooldown при
401/429; статистика по каждому ключу (запросы, ошибки, токены, средняя задержка). - 🌐 Ротация прокси — к каждому ключу привязывается несколько прокси (
http/socks5); ротация по кругу при каждом запросе; мёртвые прокси отбраковываются автоматически. - 🔌 OpenAI-совместимый эндпоинт —
POST /v1/chat/completions(стриминг и обычный) иGET /v1/models. На клиенте подойдёт любая строка как API-ключ — хаб подставит настоящие ключи из пула. - 💬 Чат — стриминг ответов, markdown с подсветкой кода, настройки генерации (temperature, top_p, max tokens), системный промпт, несколько чатов, экспорт, остановка генерации в любой момент.
- 🧑💻 Coder IDE — файловый менеджер workspace + редактор + агент с function calling (читает/пишет файлы, запускает команды) с живым отображением вызовов инструментов.
- 📊 Живая статистика — использование по ключам, лог последних запросов с моделью/задержкой/статусом, аптайм, автообновление.
- 🖥️ Конфиг без ручной возни —
data/config.jsonсоздаётся автоматически, всё меняется из интерфейса.
Скачайте standalone-сборку из раздела Releases:
- Windows:
nvidia-hub-windows.exe— двойной клик, и готово - Linux:
nvidia-hub-linux—chmod +x nvidia-hub-linux && ./nvidia-hub-linux
Откройте http://localhost:8400. Ключи и настройки хранятся в папке data/ рядом с бинарником. Порт меняется переменной окружения PORT.
Требуется Python 3.10+
git clone https://github.com/Ax1zz/nvidia-hub.git
cd nvidia-hub
python3 -m venv venv
venv/bin/pip install -r requirements.txt
venv/bin/python -m app.mainОткройте http://localhost:8400 → Ключи → добавьте свои NVIDIA API-ключи (бесплатно на build.nvidia.com) → общайтесь.
Другой порт: PORT=9000 venv/bin/python -m app.main
Base URL: http://<host>:8400/v1, API key — любая строка (авторизация не требуется, сервер подставляет ключи из пула).
curl http://localhost:8400/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{"model": "meta/llama-3.1-8b-instruct", "messages": [{"role":"user","content":"hi"}], "stream": true}'Работает из коробки с Codex CLI, Continue.dev, OpenAI Python SDK, LangChain и любым инструментом, где можно указать свой OpenAI base URL.
- Выбор ключа —
round-robin(по кругу) илиleast-used; ключи, ответившие401/429, уходят в настраиваемый cooldown (cooldown_s, по умолчанию 60 с), трафик подхватывают остальные; доmax_retriesпрозрачных ретраев на запрос. - Пул прокси — к каждому ключу можно привязать несколько прокси; каждый запрос берёт следующий по кругу, мёртвые помечаются и пропускаются. Без прокси — прямое соединение.
- Хранилище — ключи, прокси и настройки лежат в
data/config.json(создаётся при первом запуске; на общем хосте сделайтеchmod 600). Чаты — вdata/chats.json.
- У хаба нет авторизации — вешайте на localhost или прячьте за свой reverse proxy/VPN.
data/config.jsonсодержит ваши ключи — не коммитьте его (он уже в.gitignore).
Issues и pull request'ы приветствуются. Если проект сэкономил вам время — поставьте ⭐, это очень помогает.
MIT © Ax1zz



