r/ZaiGLM•
nosirjonov

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

https://preview.redd.it/zutuu246kxog1.png?width=1093&format=png&auto=webp&s=fb2c0387d1bf46c23dc4b52998da5d5c11e67b9d

Posted Mar 14, 2026, 3:30 AM UTC

312
Loading comments…