How to integrate RouterLink in Claude Code
This documentation is provided for informational purposes only and demonstrates how to configure and use our API with third-party AI chat interfaces. Any third-party software, websites, or services mentioned are not operated, controlled, or endorsed by us.
Overview
This tutorial guides you through integrating RouterLink—WORLD3's decentralized AI model routing infrastructure—with Claude Code, an intelligent coding tool.
Purpose
RouterLink provides a unified API endpoint that routes requests to multiple AI model providers through a decentralized network. By integrating RouterLink with Claude Code, you gain access to a diverse range of large language models (LLMs) without managing multiple API keys or provider-specific configurations.
What You Will Learn
By completing this tutorial, you will:
Configure Claude Code to connect with RouterLink's API endpoint
Authenticate using your RouterLink API credentials with custom headers
Add and manage AI models available through the RouterLink network
Execute inference requests through Claude Code's conversational interface
Prerequisites
Before proceeding, ensure you have:
A RouterLink API key (obtain one from the Quick Start Guide)
A web browser with internet access
Basic familiarity with API configuration concepts
Introduction to Claude Code

Claude Code is an agentic coding tool that lives in your terminal, understands your codebase, and helps you code faster by executing routine tasks, explaining complex code, and handling git workflows - all through natural language commands.Claude Code Key Features:
Autonomous Action: Reads/writes files, runs terminal commands, and fixes bugs directly.
Full Context: Automatically understands the entire codebase without manual copy-pasting.
Safety & Control: Supports one-click rollbacks and requires manual approval for key actions.
Tool Integration: Supports custom complex workflows via SKILL.md.
Step 1: Install Claude Code
If you only use it within VS Code, you can just install Claude Code extension —there’s no need to install the Claude Code CLI tool separately. The VS Code extension provides inline diffs, @-mentions, plan review, and conversation history directly in your editor.
Open the settings of Claude Code for VS Code.

Click “Edit in settings.json” under Environment Variables.

Add the following content. Make sure to replace ${API_KEY} with the API Key obtained from Quick Start Guide
Click the Claude icon on the left, then select “New session” to start using Claude Code for VS Code.

If you need to install the Claude Code CLI tool separately, Anthropic officially recommends the Native Install method, which requires your terminal to be able to access the Claude Code official installation source.
macOS, Linux, WSL:
Windows PowerShell:
Windows CMD:
Windows requires Git for Windows. Install it first if you don’t have it.
Native installations automatically update in the background to keep you on the latest version.
If you cannot install the Claude Code CLI tool using the Native Install method, please install the newest LTS version of Node.js, and then use npm or pnpm to install it globally.
Run the following command to check the installation result.
Step 2: Configure Claude Code
Claude Code officially supports managing persistent configuration through the settings system. For daily use, it is recommended to prioritize writing configurations into settings.json. Shell or system environment variables are better suited for temporary switching, CI scenarios, or as a fallback when encountering known issues in the current version.
Edit or create the settings.json file On macOS & Linux: ~/.claude/settings.json On Windows: C:\Users<USERNAME>.claude\settings.json Make sure to replace ${API_KEY} with the API Key obtained from Quick Start Guide
Step 3: Start using Claude Code
Navigate to your code working directory and run the claude command in the terminal to start using Claude Code (If you are using the VS Code extension, please open it directly in VS Code.).
When using Claude Code for the first time, you may be forced to log in to an Anthropic account. Please follow the steps below to skip this process:

Open or create the
.claude.jsonfile in the user’s home directory. The specific paths are as follows: macOS / Linux:~/.claude.jsonWindows:C:\Users\<USERNAME>\.claude.jsonSet the value of the
hasCompletedOnboardingfield totrue.Save the file, then run
claudeagain in the terminal.After launching, choose to trust Claude Code to access the files in the folder, as shown below:

Done! You can now use Claude Code normally.
Troubleshooting
No response after entering a prompt / “You don’t have enough $WAI” error
Make sure your API input is correct. Due to the high token consumption of Anthropic models, the daily free quota may not support this model. Please top up your balance.
How can I switch to another model?
1. Go to https://world3.ai/routerlink and select the Anthropic Channel on the right. Click on the model, set the API Format to “Anthropic,” and locate the model field in the code block.
Copy the model name from the model field and replace it in the settings.json file above.

Open a new terminal window. Run claude to start Claude Code. Then type /status to verify the model status.

Manual configuration changes not taking effect
If you have manually edited the ~/.claude/settings.json file but the changes are not applied, please try the following:
Close all Claude Code windows. Open a new terminal window and run
claudeagain to restart.If the issue persists, try deleting the
~/.claude/settings.jsonfile and reconfigure the environment variables. Claude Code will automatically generate a new configuration file.Make sure the JSON format of the configuration file is correct. Check for issues such as incorrect variable names, missing commas, or extra commas. You can use an online JSON validator to verify the file.
How can I upgrade Claude Code?
Enter the following command in the terminal:
Need more help?
Please check the official documentation. https://support.claude.com/en/articles/12386420-claude-code-faq
Last updated
