Crazyrouter API Document
🇺🇸 English
  • 中文
  • 🇺🇸 English
🇺🇸 English
  • 中文
  • 🇺🇸 English
🇺🇸 English
  • 中文
  • 🇺🇸 English
API 参考快速开始接入教程
官网模型与价格控制台
API 参考快速开始接入教程
官网模型与价格控制台
  1. 接入教程
  • Codex
  • N8N
  • Gemini CLI
  • Claude Code Installation and Usage Guide
  • CherryStudio Configuration Guide
  • dify Configuration Guide
  • cline
  • aider
  • Cursor
  • lobechat
  • ChatBox
  • gpt_academic
  • nextchat
  • zotero gpt
  • CLAUDE DEV
  • ChatGPT Sidebar
  • chatgpt-on-wechat
  • chatgpt GPT Academic
  • RikkaHub
  • Coze Workflow Configuration Guide
  1. 接入教程

Claude Code Installation and Usage Guide

Claude Code is a powerful AI programming assistant that allows you to collaborate with AI directly in your terminal. This guide will walk you through the installation and configuration process.

📋 System Requirements#

Node.js version ≥ 18.0
Supported operating systems: macOS, Linux, Windows (WSL)

🚀 Quick Start#

1. Install Node.js#

💡 Tip: If you already have Node.js 18.0 or higher installed, you can skip this step.

Ubuntu / Debian Users#

macOS Users#

2. Install Claude Code#

Install Claude Code globally using npm:

3. Configure and Start Using#

Obtain Required Configuration Information#

You need to prepare two important configuration items:
ConfigurationDescriptionHow to Obtain
ANTHROPIC_AUTH_TOKENAPI authentication tokenAfter registration, click Add Token on the API Tokens page (starts with sk-)
ANTHROPIC_BASE_URLAPI service addressUse https://crazyrouter.com/ (same as the main site address)
📝 Recommended settings when creating a token:
Name: Any name you prefer
Quota: Set to unlimited
Group: Select Claude Code dedicated or Official Claude 3 and above
Other options: Keep default settings

Launch Claude Code#

Run in your project directory:

First Run Configuration#

After launching, you will see the following configuration steps:
1.
Select Theme → Choose your preferred theme + Press Enter
2.
Safety Notice → Confirm safety notice + Press Enter
3.
Terminal Configuration → Use default configuration + Press Enter
4.
Working Directory Trust → Trust current directory + Press Enter
✨ Congratulations! Now you can start coding with your AI programming partner!

❓ FAQ#

Q: Getting "Invalid API Key · Please run /login" error?#

A: This indicates Claude Code didn't detect the environment variables. Please check:
Whether ANTHROPIC_AUTH_TOKEN and ANTHROPIC_BASE_URL are set correctly
Whether environment variable values are correct (token starts with sk-)
If using permanent configuration, whether you restarted the terminal

Q: Why does it show "offline" status?#

A: Claude Code checks network status by connecting to Google. Showing "offline" doesn't affect normal usage; it just indicates inability to connect to Google.

Q: Why does web page Fetch fail?#

A: Claude Code needs to call Claude service for security checks before accessing web pages. You need to:
Maintain a stable international internet connection
Use a global proxy if necessary

Q: Requests always show "fetch failed"?#

A: This may be caused by network environment issues. Solution:
1.
Try using a proxy tool

Q: How to handle API errors?#

A: This may be caused by unstable forwarding proxy. Recommendations:
Exit Claude Code (Ctrl+C)
Re-run the claude command
If the problem persists, try again later

Q: Web login error?#

A: Try clearing the site's cookies, then log in again.

📌 Notes#

This site directly connects to the official Claude Code forwarding service
Only supports Claude Code API traffic, not other API calls
Please keep your API token secure and avoid leakage

🔗 Related Links#

Claude Code Official Documentation
Node.js Official Website

💡 Tip: If you encounter other issues, please check the official documentation or contact technical support.
Modified at 2026-09-28 09:50:55
Previous
Gemini CLI
Next
CherryStudio Configuration Guide
Built with