Claude Opus Integration in VS Code

0
Claude Opus Integration in VS Code (Complete Setup Guide)

If you’re looking for a simple way to use Claude Opus 4.8 inside VS Code and Claude Code, you’ve landed on the right page.

In this guide, I’ll walk you through the complete setup process—from installing Node.js and Claude Code to configuring everything so you can start coding with Claude Opus in just a few minutes.

The entire setup takes less than 10 minutes, and once it’s finished, you’ll be able to use Claude Opus directly from your terminal and Visual Studio Code without switching between multiple browser tabs.

Prerequisites

Before starting, make sure you have the following:

  • Visual Studio Code
  • Node.js (Latest LTS Version recommended)
  • Internet connection
  • An API key from your preferred Anthropic-compatible provider

Once these are ready, you can begin the setup.


Step 1 – Install Node.js

Claude Code requires Node.js to run.

Visit the official Node.js website and download the latest LTS (Long Term Support) version for your operating system.

After installation, verify everything is working by opening your terminal and running:

node -v

You should see the installed Node.js version.

Then verify npm:

npm -v

If both commands return version numbers, you’re ready for the next step.


Step 2 – Install Claude Code

Open your terminal and install Claude Code globally.

npm install -g @anthropic-ai/claude-code

After installation finishes, verify it by running:

claude --version

If a version number appears, Claude Code has been installed successfully.


Step 4 – Locate the settings.json File

Claude Code stores its configuration in a settings.json file.

Open the file and replace or update the environment configuration with the following:

{
  "env": {
    "ANTHROPIC_BASE_URL": "https://agentrouter.org",
    "ANTHROPIC_AUTH_TOKEN": "Your api key",
    "ANTHROPIC_API_KEY": "",
    "ANTHROPIC_MODEL": "claude-opus-4-8"
  },
  "model": "claude-opus-4-8"
}

Configuration Explained

ANTHROPIC_BASE_URL

This tells Claude Code which API endpoint to connect to. In this setup, requests are routed through AgentRouter.


ANTHROPIC_AUTH_TOKEN

Replace:

Your api key

with the API key from your account.

Without a valid API key, Claude Code won’t be able to authenticate.


ANTHROPIC_MODEL

This specifies which model Claude Code should use.

For this guide, set it to:

claude-opus-4-8

Step 5 – Save the Configuration

After editing the file:

  1. Save settings.json.
  2. Close Claude Code if it’s already running.
  3. Open it again.
  4. Log out from Claude Code

Restarting ensures the new configuration is loaded correctly.


Step 6 – Verify Everything Works

Run:

claude

Now try asking something simple like:

Create a responsive login page using HTML and CSS.

or

Explain this JavaScript function.

Referral Link.

Read OmniRoute with Claude Code Integration

Previous articleClaude Code with OmniRoute 1.6 Billion Free Tokens

LEAVE A REPLY

Please enter your comment!
Please enter your name here