Skip to content
KeenKind.Docs
Console

Connect Claude Code

This guide covers gateway configuration for Claude Code CLI. Claude web chat and the desktop chat app use different connection methods.

Confirm that your account has a model suitable for Claude Code with tool calling. Anthropic’s gateway documentation covers Claude models; other models require separate compatibility checks even when they expose the same API.

1. Prepare a key and model

Jump to 1. Prepare a key and model

Create an API key and get a current model ID from the model catalog. Use KeenKind model IDs instead of another service’s aliases.

2. Configure the current terminal

Jump to 2. Configure the current terminal

Replace the placeholder with your KeenKind API key.

Bash or Zsh:

Terminal commands
export ANTHROPIC_BASE_URL='https://api.keenkind.ai'
export ANTHROPIC_AUTH_TOKEN='YOUR_KEENKIND_API_KEY'

This uses Bearer authentication. Set the base URL to the domain; the tool appends /v1/messages. Do not put the full request path in the variable.

3. Launch from the same terminal

Jump to 3. Launch from the same terminal

Run this in your project directory, replacing YOUR_MODEL_ID with a confirmed model ID:

Terminal commands
claude --model 'YOUR_MODEL_ID'

The variables apply only to this terminal and programs launched from it. Launching from a desktop icon or another terminal may not use them.

4. Verify the connection and usage

Jump to 4. Verify the connection and usage

Enter /status in Claude Code and confirm the API endpoint and authentication source. Ask it to read the project README and explain startup instructions, then verify that file reading succeeded.

Check the call in usage records. Requests using KeenKind credentials are charged to your KeenKind account. Claude subscription balance does not indicate the balance available for this connection.

Symptom Check first
Still using the old service Same terminal, organization-managed settings, and other environment variables.
401 / 403 Complete and valid key and account access to the model.
404 or missing model Model ID and endpoint; do not include the full /v1/messages path in the base URL.
Answers work, but tools or other features fail Model and gateway support for the feature and parameters; inspect the specific error.
Interrupted stream Check usage, then follow API troubleshooting.

Based on Claude Code gateway documentation and model configuration. Sources checked: 2026-10-18.