Skip to content

Claude Code

Developers who want to use Claude Code with a GlideflowAI model through the Anthropic-compatible protocol.

  • Claude Code installed
  • A GlideflowAI API key

Open the GlideflowAI dashboard, create a key, and keep it private.

Use https://api.glideflowai.com without /v1.

Start with glm-5.2. Copy other exact IDs from the model catalog.

Terminal window
export ANTHROPIC_BASE_URL="https://api.glideflowai.com"
export ANTHROPIC_AUTH_TOKEN="sk-your-key"
export ANTHROPIC_MODEL="glm-5.2"
claude

You can also persist the same values in ~/.claude/settings.json:

{
"env": {
"ANTHROPIC_BASE_URL": "https://api.glideflowai.com",
"ANTHROPIC_AUTH_TOKEN": "sk-your-key",
"ANTHROPIC_MODEL": "glm-5.2"
}
}

Run claude, then ask it to answer with OK. You can also test the same key and model directly:

Terminal window
curl https://api.glideflowai.com/v1/chat/completions \
-H "Authorization: Bearer sk-your-key" \
-H "Content-Type: application/json" \
-d '{"model":"glm-5.2","messages":[{"role":"user","content":"Say OK"}],"max_tokens":512}'
  • Do not append /v1 to ANTHROPIC_BASE_URL.
  • If the response has no visible text, give the reasoning model at least 512 output tokens.
  • HTTP 503 with 无可用渠道 means the model ID is wrong or is not enabled for your key. Copy the exact ID from /models.

The Anthropic-compatible path accepts x-api-key; Claude Code uses the auth-token environment variable shown above. Model behavior differs by provider even though the tool connection works.