Key Takeaways
- Claude Code connects to Nara Router by setting two environment variables: ANTHROPIC_BASE_URL and ANTHROPIC_AUTH_TOKEN
- 5-minute setup: Install native Claude Code, edit settings.json, restart, and verify
- Critical detail: Use
https://router.bynara.idas base URL — do NOT add /v1 suffix - 35+ models available including Claude Opus 4.8, DeepSeek V4, GPT-5.5, GLM-5.2, Qwen 3.7 Max, and Kimi K3
- Single configuration file at
~/.claude/settings.jsonmanages everything
What is Nara Router?
Nara Router is an LLM (Large Language Model) gateway that provides a unified API interface to multiple AI models. Instead of maintaining separate API keys and endpoints for Claude, GPT, DeepSeek, GLM, Qwen, Kimi, and others, you route all requests through Nara Router’s single endpoint. Claude Code is designed to work with Anthropic’s API, but its configurable base URL makes it compatible with API gateways like Nara Router. This means you can use the same Claude Code interface you already know to access models from different providers.
Prerequisites
Before starting, ensure you have the following:
- Windows 11 — any recent version with PowerShell
- Claude Code — native Windows installer (not the npm version)
- A Nara Router account — sign up at router.bynara.id
- A valid Nara Router API key — generated from your account dashboard
- PowerShell — comes built into Windows 11
Step-by-Step Configuration
Step 1 — Install Claude Code
Download and install the latest native Claude Code release from the official documentation. After installation, verify it works:
claude --version
You should see output like:
2.1.218 (Claude Code)
Check that the correct executable is being used:
where.exe claude
Expected path:
C:\Users\<username>\.local\bin\claude.exe
Important: If you have an old npm installation of Claude Code, remove it to avoid conflicts:
npm uninstall -g @anthropic-ai/claude-code
Then verify again with where.exe claude that only the native version appears.
Step 2 — Configure Claude Code for Nara Router
Open the Claude Code configuration file at:
C:\Users\<username>\.claude\settings.json
If the file does not exist, create it. Add the following configuration:
{
"env": {
"ANTHROPIC_BASE_URL": "https://router.bynara.id",
"ANTHROPIC_AUTH_TOKEN": "YOUR_NARA_API_KEY"
}
}
Critical: Base URL Format
Use exactly:
https://router.bynara.id
Do NOT use:
https://router.bynara.id/v1
Claude Code automatically appends the required API paths to the base URL. Adding /v1 yourself results in a double path (/v1/v1/...) which prevents model initialization. This is the single most common cause of setup failure.
Step 3 — Restart Claude Code
Close all open Claude Code sessions. Open a fresh PowerShell window and launch:
claude
Claude Code reads the configuration from settings.json at startup. No additional environment variables are needed.
Step 4 — Verify Available Models
Check which models your Nara Router API key can access:
curl.exe https://router.bynara.id/v1/models `
-H "Authorization: Bearer YOUR_API_KEY"
You should receive a JSON response listing available models, for example:
- claude-opus-4-8
- claude-sonnet-5
- glm-5.2-free
- deepseek-v4-pro
- kimi-k3
- qwen3.7-max
- gpt-5.5
- nemotron-3-ultra
Step 5 — Test the API
Run a direct API test using PowerShell to confirm everything is working:
$headers = @{
Authorization = "Bearer YOUR_API_KEY"
}
$body = @{
model = "claude-opus-4-8"
messages = @(
@{
role = "user"
content = "Hello"
}
)
} | ConvertTo-Json -Depth 5
Invoke-RestMethod `
-Uri "https://router.bynara.id/v1/chat/completions" `
-Method POST `
-Headers $headers `
-Body $body `
-ContentType "application/json"
If a response comes back, the API is working correctly.
Troubleshooting Common Problems
“There’s an issue with the selected model” Error
This is the most common error. Possible causes:
- Wrong Base URL: Make sure ANTHROPIC_BASE_URL is set to
https://router.bynara.idwithout/v1 - Invalid API key: Verify your key works with the curl test above
- Model not accessible: The model you selected may not be included in your Nara Router plan
- Old Claude Code installation: An old npm version may be overriding the native installation
- Outdated configuration: Stale cached config from a previous setup
Wrong Base URL
Incorrect:
https://router.bynara.id/v1
Correct:
https://router.bynara.id
Multiple Claude Code Installations
Check with where.exe claude. If you see multiple paths, uninstall the npm version:
npm uninstall -g @anthropic-ai/claude-code
Verify Active Installation
Use this PowerShell command to confirm the active installation:
Get-Command claude | Format-List Source,Path,CommandType
Expected:
Source : C:\Users\<username>\.local\bin\claude.exe
Verify Environment Variables
Check that the configuration is being picked up:
Get-ChildItem Env:ANTHROPIC*
If no variables are listed, Claude Code will use the values from settings.json. This is the normal and expected behavior.
Check Installed Models
curl.exe https://router.bynara.id/v1/models `
-H "Authorization: Bearer YOUR_API_KEY"
If the desired model appears here but Claude Code cannot use it, review your base URL and authentication settings.
Recommended Configuration
Keep the configuration minimal until everything is working:
{
"env": {
"ANTHROPIC_BASE_URL": "https://router.bynara.id",
"ANTHROPIC_AUTH_TOKEN": "YOUR_API_KEY"
}
}
Add advanced options only after confirming the basic setup works. Once the base configuration is confirmed working, you can explore Nara Router’s features like model fallback, cost tracking, and usage analytics through their dashboard.
Security Tips
- Never publish your API key. Treat it like a password
- Rotate the key immediately if it is accidentally exposed
- Store credentials securely — settings.json is local to your machine
- Keep Claude Code updated to the latest version
- Remove old or unused Claude Code installations to prevent configuration conflicts
- Use environment variables only if you need to share config across multiple tools
Frequently Asked Questions
Does Nara Router support all Claude Code features?
Nara Router provides an Anthropic-compatible API endpoint, so core Claude Code features including agent mode, file editing, bash commands, and MCP tools work as expected. Some advanced model-specific features may behave differently depending on the model you route to.
Can I switch between models without changing configuration?
Yes. Within a Claude Code session you can use the model selection interface to switch between any models available through your Nara Router API key. No restart or config change is needed.
Is there a free tier on Nara Router?
Nara Router offers a free tier with limited monthly credits and access to select models including GLM-5.2-Free. Paid plans unlock the full model catalog starting from Claude Opus 4.8 through DeepSeek V4 Pro and GPT-5.5.
Does this work with Claude Code on macOS or Linux?
Yes. The same settings.json configuration works on all platforms. The base URL and API key configuration is identical. The Windows-specific steps in this guide (PowerShell commands, where.exe) have equivalent commands on other platforms.
Related Reading
- OPC UA vs MQTT in 2026: Choosing the Right Industrial IoT Protocol for Your Factory
- Edge Computing vs Cloud Computing in Manufacturing 2026
Sources
Disclosure: This article is for educational purposes. Feature availability depends on your Nara Router plan and API key permissions.
