Run your AI coding tools on any model, from any provider.
One gateway. All protocols. No code changes.
Nyro is a local AI gateway that sits between your AI tools and model providers. It translates protocol formats on the fly — so Claude Code, Codex CLI, Gemini CLI, OpenCode, and any client using OpenAI / Anthropic / Gemini SDKs can all route through any backend model you choose, without changing a single line of code.
Point your clients at http://localhost:19530. Nyro handles the rest.
Claude Code · Codex CLI · Gemini CLI · OpenCode
OpenAI SDK · Anthropic SDK · Gemini SDK
Any HTTP API Client
↓
Nyro AI Gateway
(localhost:19530)
↓
OpenAI · Anthropic · Google · DeepSeek
MiniMax · xAI · Zhipu · Ollama · ...
Nyro ships as a desktop app (macOS / Windows / Linux) and a standalone server binary for headless and self-hosted deployments.
Use any model with any tool. Claude Code expects Anthropic protocol. Codex CLI uses OpenAI Responses API. Gemini CLI speaks Gemini. Nyro translates between all three so one model can serve all your tools simultaneously.
Switch providers without touching your tools. Change the target model or provider from Nyro's UI. Your tools never need reconfiguring.
Keep everything local. API keys are stored locally. Requests stay on your machine. No cloud relay, no shared infrastructure.
One UI for everything. Manage providers, routes, API keys, logs, and usage stats from a single interface — desktop app or browser.
Provider Management |
Route Configuration |
API Key Management |
Connect — Code & CLI Integration |
- Ingress: OpenAI (Chat Completions + Responses API), Anthropic Messages, Gemini GenerateContent
- Egress: route to any OpenAI-compatible, Anthropic, or Gemini upstream
- Streaming: full SSE passthrough and cross-protocol format conversion
- Reasoning:
<think>tag parsing and conversion across protocol boundaries - Tool calls: cross-protocol tool call and result format normalization
- Route types: chat and embedding routes with type-aware handling
- Exact match routing on
virtual_model - Virtual model names decouple client requests from actual backend models
- Multi-target routing with strategy selection: weighted load balancing or priority-based failover
- Health-aware failover: 3 consecutive failures mark a target unhealthy, auto-recovery after 30s
- Per-route access control with API key authorization
- Exact cache: identical requests return cached responses instantly
- Semantic cache: embedding-based similarity matching reuses results for similar queries
- Per-route TTL and threshold overrides
- Stream replay for cached streaming responses
- Auto-detect model capabilities (tool call, reasoning, context window, modalities, costs)
ai://models.devbuilt-in data source for offline capability lookup- HTTP model list endpoints for dynamic model discovery
- Capability tags shown in route configuration UI
- Independent proxy and admin bearer token controls
- Default-deny route authorization — keys must be explicitly bound to routes
- Per-key quotas: RPM / RPD / TPM / TPD
- Full CRUD for providers, routes, and API keys
- Request logs with provider, model, token, and latency detail
- Usage charts by model and provider
- Provider connectivity testing with live feedback
- Configuration import / export
Code Integration — select a route and copy ready-to-use examples for:
| Protocol | Languages |
|---|---|
| OpenAI | Python · TypeScript · cURL |
| Anthropic | Python · TypeScript · cURL |
| Gemini | Python · TypeScript · cURL |
CLI Integration — one-click config sync for AI coding tools:
| Tool | Protocol |
|---|---|
| Claude Code | Anthropic |
| Codex CLI | OpenAI Responses API |
| Gemini CLI | Gemini |
| OpenCode | OpenAI |
Nyro detects installed tools, generates the correct configuration for the selected route, and writes it with one click. Original configs are backed up automatically.
Desktop App
| Platform | Architecture |
|---|---|
| macOS | Apple Silicon (aarch64) · Intel (x64) |
| Windows | x64 · ARM64 |
| Linux | x86_64 · aarch64 |
Server Binary — three run modes for everything from single-host to distributed deployments
| Mode | Flag | Purpose |
|---|---|---|
all (default) |
--mode all |
Proxy + Admin API + embedded WebUI in a single process |
proxy |
--mode proxy |
Data-plane only — no Admin API, no WebUI |
admin |
--mode admin |
Control-plane only — Admin API (+ optional WebUI), no proxy |
| Standalone | --config config.yaml |
YAML config, no DB, no Admin — minimal / edge deployments |
| Platform | Architecture | Access |
|---|---|---|
| macOS | x86_64 · aarch64 | Proxy :19530 · WebUI http://localhost:19531 |
| Linux | x86_64 · aarch64 | Proxy :19530 · WebUI http://localhost:19531 |
| Windows | x64 · ARM64 | Proxy :19530 · WebUI http://localhost:19531 |
Homebrew (macOS / Linux)
brew tap nyroway/nyro
brew install --cask nyroShell Script
# macOS / Linux
curl -fsSL https://raw.githubusercontent.com/nyroway/nyro/master/scripts/install/install.sh | bash
# Windows (PowerShell)
irm https://raw.githubusercontent.com/nyroway/nyro/master/scripts/install/install.ps1 | iexManual Download
Download the latest installer for your platform from GitHub Releases.
macOS: After manual install run
sudo xattr -rd com.apple.quarantine /Applications/Nyro.app, or use the install script which handles this automatically.Windows: SmartScreen may show "Unknown publisher" — click More info → Run anyway.
# Download
curl -LO https://github.com/nyroway/nyro/releases/latest/download/nyro-server-linux-x86_64
chmod +x nyro-server-linux-x86_64
# Start (localhost only, no auth required) — default all mode
./nyro-server-linux-x86_64
# Start (network-exposed, auth required)
./nyro-server-linux-x86_64 \
--proxy-host 0.0.0.0 \
--admin-host 0.0.0.0 \
--admin-token YOUR_ADMIN_TOKEN
# Proxy-only mode — binds :19530 only, no Admin API, no WebUI
./nyro-server-linux-x86_64 --mode proxy
# Admin-only mode — binds :19531 only (for internal systems to consume the control plane)
./nyro-server-linux-x86_64 \
--mode admin \
--admin-host 0.0.0.0 \
--admin-token YOUR_ADMIN_TOKEN
# Standalone mode (YAML config, no DB/Admin/WebUI; --mode is ignored)
./nyro-server-linux-x86_64 --config config.yamlAvailable server binaries: linux-x86_64, linux-aarch64, macos-x86_64, macos-aarch64, windows-x86_64.exe, windows-arm64.exe
Open http://localhost:19531 for the management UI. See Server docs and Standalone docs for full configuration reference.
Default behavior: local SQLite under --data-dir. To use PostgreSQL or MySQL:
# PostgreSQL
./nyro-server-linux-x86_64 \
--storage-backend postgres \
--postgres-dsn "postgres://user:pass@host:5432/db"
# MySQL
./nyro-server-linux-x86_64 \
--storage-backend mysql \
--mysql-dsn "mysql://user:pass@host:3306/db"Or via environment variable:
export NYRO_POSTGRES_DSN="postgres://user:pass@host:5432/db"
./nyro-server-linux-x86_64 --storage-backend postgres
# or
export NYRO_MYSQL_DSN="mysql://user:pass@host:3306/db"
./nyro-server-linux-x86_64 --storage-backend mysqlWhen running multiple nyro-server replicas behind a load balancer, all replicas must share the same database and the same admin token:
| Requirement | Detail |
|---|---|
| Shared DB | Use --storage-backend postgres or mysql pointing to the same DSN across all replicas. SQLite cannot be shared. |
| Unified admin token | Set the same --admin-token / NYRO_ADMIN_TOKEN on every replica. |
| Config sync | Replicas poll the shared DB for config changes every --config-poll-interval seconds (default: 3 s). Route/model/provider changes propagate within one poll interval. |
| OAuth interactive flows | The OAuth authorization callback must reach the same replica that initiated the session. Configure sticky sessions (session affinity) on your load balancer for the admin port (19531). |
Health probes:
| Endpoint | Port | Use |
|---|---|---|
GET /healthz |
proxy + admin | Liveness — always 200 |
GET /readyz |
proxy + admin | Readiness — 200 if DB reachable, 503 otherwise |
Key environment variables:
NYRO_MODE=all # all (default) | proxy | admin
NYRO_ADMIN_TOKEN=<secret> # Required when admin host is not loopback
NYRO_STORAGE_BACKEND=postgres # postgres | mysql | sqlite (default)
NYRO_POSTGRES_DSN=postgres://... # Required when backend=postgres
NYRO_MYSQL_DSN=mysql://... # Required when backend=mysql
NYRO_CONFIG_POLL_INTERVAL=3 # Seconds between config epoch polls (default: 3, 0=disabled)
NYRO_WEBUI_DIR=/path/to/dist # Serve WebUI from external directory instead of embedded assets (admin/all modes only)Pre-built server images are distributed via the separate nyroway/docker-nyro repository and published to Docker Hub as nyroway/nyro.
Quick start:
docker run --rm \
-e NYRO_ADMIN_TOKEN=change-me \
-p 19530:19530 \
-p 19531:19531 \
-v nyro-data:/var/lib/nyro \
nyroway/nyro:latestOpen http://127.0.0.1:19531 for the management UI. Use the same NYRO_ADMIN_TOKEN value as the Bearer token for admin API requests.
For Postgres- or MySQL-backed deployments and docker compose usage, see the docker-nyro README.
1. Add a Provider
Go to Providers → New. Enter your provider's Base URL and API key. Nyro auto-detects the protocol from the URL.
2. Create a Route
Go to Routes → New. Set a virtual model name (e.g. gpt-4o), select your provider and target model. Enable access control if needed.
3. Point your client at Nyro
from openai import OpenAI
client = OpenAI(
base_url="http://127.0.0.1:19530/v1",
api_key="your-proxy-key" # or "no-auth" if access control is off
)
response = client.chat.completions.create(
model="gpt-4o", # matches your virtual model name
messages=[{"role": "user", "content": "Hello"}]
)4. Sync your AI tools (optional)
Go to Connect, select a route, and click Sync next to Claude Code, Codex, Gemini CLI, or OpenCode. Nyro writes the correct config automatically.
Copyright 2026 The Nyro Authors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
See the full license text in LICENSE.