Claude + GLM 5
I'm having trouble using the Claude Code CLI (@anthropic-ai/claude-code) and a custom Anthropic API endpoint (Z.ai). However, when I try to use the CLI and send a prompt to the API, I'm constantly getting the following error message:
Unable to connect to API (UNKNOWN_CERTIFICATE_VERIFICATION_ERROR)
OS: Windows
Node.js: Latest LTS version (Updated specifically to ensure root certificates are fresh)
What I have already tried (and failed):
Updated Node.js to the absolute latest version.
Used the following command before using the claude CLI:
$env:NODE_TLS_REJECT_UNAUTHORIZED="0"
Used the following to permanently set the variable:
NODE_TLS_REJECT_UNAUTHORIZED = 0, added to Windows System Environment Variables
Posted Mar 14, 2026, 3:30 AM UTC
312