Tools & IDE

Claude Code Configuration

How to look up and call a modelFind models by price group, read the input/output pricing table, then configure Claude Code or the OpenAI SDK to call them.

Endpoint: https://api.shopaikey.com

Claude Code is Anthropic's official command-line tool (CLI) for pair programming, code refactoring, and debugging right in your terminal.

macOS / Linux

code
curl -fsSL https://cdn.shopaikey.com/claude/setup.sh | bash

Windows (PowerShell)

code
irm https://cdn.shopaikey.com/claude/setup.ps1 | iex

The script automatically installs Claude CLI (if not already installed), backs up old settings, and configures your API key.


1. Requirements & Installation

System Requirements

  • Node.js: Version 18 or higher.
  • OS: macOS, Linux, or Windows (WSL/PowerShell).

Installation

Open a terminal and run the following command to install the Claude Code package globally:

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

2. Configuration (Important)

To point Claude Code to https://api.shopaikey.com instead of Anthropic's default server, you need to configure the Base URL. There are 2 ways to do this.

This method saves the configuration permanently and makes permission management easier.

Step 1: Create/Open the config file

  • macOS / Linux: ~/.claude/settings.json
  • Windows: %USERPROFILE%\.claude\settings.json (e.g., C:\Users\YourName\.claude\settings.json)

Step 2: Enter configuration content Copy the code below into the file. Replace sk-your-token-here with your API Key.

code
{
  "env": {
    "ANTHROPIC_BASE_URL": "https://api.shopaikey.com",
    "ANTHROPIC_AUTH_TOKEN": "sk-your-token-here"
  }
}

Method 2: Using Environment Variables

Use this method if you don't want to edit config files or want to test quickly.

Linux / macOS

code
export ANTHROPIC_BASE_URL="https://api.shopaikey.com"
export ANTHROPIC_AUTH_TOKEN="sk-your-token-here"

Windows (PowerShell)

code
$env:ANTHROPIC_BASE_URL = "https://api.shopaikey.com"
$env:ANTHROPIC_AUTH_TOKEN = "sk-your-token-here"

Windows (CMD)

code
set ANTHROPIC_BASE_URL=https://api.shopaikey.com
set ANTHROPIC_AUTH_TOKEN=sk-your-token-here

3. Usage Guide

After configuration, you can start using Claude Code.

Launch Interactive Mode

In your project directory, type:

code
claude

You'll enter the chat interface. You can ask:

"Explain this project's structure to me" "Create a test file for the login function in src/auth.js"

Run Commands Directly (Single Shot)

Send a quick request without entering chat mode:

code
claude "Refactor utils.js to make the code cleaner"