在 VS Code / Cursor 中配置和使用 Claude Code
必须先禁用登录提示,然后配置第三方 API 端点才能使用本站服务
编辑 Claude Code 配置文件 ~/.claude/settings.json:
{
"env": {
"ANTHROPIC_AUTH_TOKEN": "替换成自己的KEY",
"ANTHROPIC_BASE_URL": "https://anapi.xn--vuq861bvij35ps8cv0uohm.com",
"API_TIMEOUT_MS": "600000",
"CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC": "1"
}
}
/help查看帮助/model切换模型/compact压缩历史/resume恢复对话> what does this project do?
> explain the folder structure
> where is the main entry point?
> add input validation to the form
> refactor to use async/await
> fix the bug where users can submit empty
> what files have I changed?
> commit with a descriptive message
> help me resolve merge conflicts
> write unit tests for calculator
> update README with instructions
> review my changes and suggest improvements
确保 VS Code 版本 ≥ 1.98.0,或尝试使用命令行安装方式。
检查 settings.json 配置是否正确,确保 API 端点和 Key 填写无误。
在对话中输入 /model 命令即可切换不同的 Claude 模型。
curl https://anapi.xn--vuq861bvij35ps8cv0uohm.com/v1/messages \
-H "Content-Type: application/json" \
-H "x-api-key: sk-your-api-key" \
-d '{
"model": "claude-sonnet-4-20250514",
"max_tokens": 1024,
"messages": [
{"role": "user", "content": "Hello!"}
]
}'
{
"model": "claude-sonnet-4-20250514",
"max_tokens": 1024,
"stream": true,
"messages": [...]
}
{
"model": "claude-sonnet-4-20250514",
"max_tokens": 16000,
"thinking": {
"type": "enabled",
"budget_tokens": 10000
},
"messages": [...]
}