https://vietrouter.com.vn

← All applications · Connect apps section on /docs

Anthropicconfigure claude

Claude Code

Also known as: Claude CLI · claude

Tác tử lập trình Anthropic trên terminal (và extension IDE). Đây là app phổ biến nhất với Vietrouter.

Base URL to paste

Paste exactly one of two formats — wrong URL yields 404 (not 401).

https://vietrouter.com.vn

Prerequisites

  1. Đã cài lệnh `claude` (Claude Code)
  2. API key sk-mtm-…
  3. Nếu từng login Anthropic: chạy `/logout` trong Claude Code trước

Recommended model: claude-fable-5

Quick way — command / config

npm install -g API CLI@latest
api-cli configure claude -k 'sk-mtm-...' -m claude-fable-5
api-cli doctor

Where to place file / fill Settings

Filemacos
~/.claude/settings.json
Tạo/sửa file JSON như tab settings.json. Backup trước khi sửa tay. Ưu tiên `api-cli configure claude` (có backup timestamp).
Filelinux
~/.claude/settings.json
Giống macOS. Kiểm tra: `cat ~/.claude/settings.json | head`.
Filewindows
%USERPROFILE%\.claude\settings.json
PowerShell: `notepad $env:USERPROFILE\.claude\settings.json`. Dùng ANTHROPIC_AUTH_TOKEN (không phải ANTHROPIC_API_KEY).
Fileany
.claude/settings.local.json (trong repo)
Chỉ áp dụng một dự án. Đưa vào .gitignore nếu chứa key.

Verify connection

  1. `claude` mở được; gửi “ping”.
  2. `echo $ANTHROPIC_BASE_URL` (Unix) phải là https://vietrouter.com.vn
  3. Dashboard → Sử dụng có request mới.

Troubleshooting

SymptomReasonHow to handle
Cứ đòi đăng nhập AnthropicCòn session OAuth cũ.Trong Claude Code chạy `/logout`, đặt lại ANTHROPIC_AUTH_TOKEN, mở terminal mới.
404BASE_URL có thừa /v1.Phải là https://vietrouter.com.vn (không /v1).
401Dùng nhầm ANTHROPIC_API_KEY hoặc key sai.Dùng ANTHROPIC_AUTH_TOKEN=sk-mtm-…

Notes

  • Khuyến nghị một key riêng cho máy Claude Code.
  • API CLI merge env an toàn hơn sửa tay cả file.

Related

Claude Desktop · OpenClaw · API CLI · Hermes Agent

Zalo groupWhatsApp