Skip to content

Claude Code Router (using non-Anthropic Models)

You can follow these instructions to use your AI-VERDE API Key after installing Claude Code and Claude Code Router. More information on installing and using Claude Code Router can be found here, https://github.com/musistudio/claude-code-router.

Prerequisites

  1. Obtain your AI-VERDE API Key. See Obtaining your AI-VERDE API Key.
  2. Note the model(s) you want to configure for Claude Code. See Getting a List of Models.
  3. Install Claude Code. Instructions can be found here, https://code.claude.com/docs/en/setup.
  4. Install Claude Code Router. Instructions can be found here, https://github.com/musistudio/claude-code-router.
  5. The remaining instructions assume a terminal on macOS or Linux with bash, Claude Code, and Claude Code Router installed.

1. Configuring Claude Code Router

This step is only needed the first time you use Claude Code Router.

In a terminal, enter the command ccr start:

ccr start

Because no configuration exists yet, you will be prompted to enter the minimum configuration to start Claude Code Router. Use the following table for guidance on the values:

Field Value or Instructions Notes
Provider Name ai-verde any string works
Provider API KEY enter your AI-VERDE API key
Provider URL https://llm-api.cyverse.ai/v1/chat/completions
MODEL Name <verde model name> replace <verde model name> with the model you'd like to use

Note

Unlike most OpenAI-compatible clients, Claude Code Router needs the full chat completions endpoint (https://llm-api.cyverse.ai/v1/chat/completions), not the base URL ending in /v1.

After entering the MODEL name, you should see text similar to the following:

Loaded JSON config from: /home/<user>/.claude-code-router/config.json
register transformer: Anthropic (endpoint: /v1/messages)
register transformer: gemini (endpoint: /v1beta/models/:modelAndAction)
register transformer: deepseek (no endpoint)
register transformer: tooluse (no endpoint)
register transformer: openrouter (no endpoint)
register transformer: maxtoken (no endpoint)
providerConfig:  ai-verde undefined
ai-verde provider registered
🚀 LLMs API server listening on http://127.0.0.1:3456
Your configuration is now saved to ~/.claude-code-router/config.json. Press ctrl-c to stop this server; ccr code in the next step starts it again in the background.

2. Running Claude Code Router

Run Claude Code with Claude Code Router using the following command:

ccr code

If you are successful entering Claude Code, congratulations! To use Claude Code with the same settings, you will need to run ccr code every time.

Updating Claude Code Router configuration

At some point, you may want to add other models or add or update configuration options. To do so, you can edit the configuration file found in ~/.claude-code-router/config.json. This file holds your API key, so don't commit or share it.