Back to Guides
Beginner 5 min

How to Run Claude Code with Multiple AI Providers

Set up two or more provider instances and switch between them in seconds. One tool, multiple backends, zero config editing.

Prerequisites

  • Node.js 18 or later installed
  • At least one API key (GLM, DeepSeek, MiniMax, or any supported provider)
GLM DeepSeek MiniMax

claude-multi lets you run Claude Code against any OpenAI-compatible provider. Each provider gets its own isolated instance with its own config, its own API key, and its own terminal command. This guide walks through setting up two providers and switching between them.

Install claude-multi

Terminal window
npm install -g claude-multi

That gives you the claude-multi command, which opens the TUI where you manage all your instances.

Add your first provider

Open the TUI:

Terminal window
claude-multi

Select Add new instance. The wizard asks for:

  1. Instance name — something short, like glm or deepseek
  2. Template — pick from the list of supported providers
  3. API key — paste it when prompted (masked input)

The template pre-configures the base URL, model name, environment variables, and output limits. You do not need to edit any config files by hand.

Terminal window
# Example: adding GLM
claude-multi
# Add new instance
# Name: glm
# Template: glm
# Paste API key: sk-...

After setup finishes, you get a claude-glm command in your shell.

Add a second provider

Run the TUI again and add another instance:

Terminal window
claude-multi
# Add new instance
# Name: deepseek
# Template: deepseek
# Paste API key: ...

Now you have two commands:

Terminal window
claude-glm # runs Claude Code with GLM
claude-deepseek # runs Claude Code with DeepSeek

Both use the same Claude Code interface. The only difference is which provider handles the requests.

Verify both work

Terminal window
claude-glm "what provider am I connected to?"
claude-deepseek "what provider am I connected to?"

Each session should respond with information about its respective provider.

Where the config lives

Each instance gets its own directory:

PathContents
~/.claude-glm/GLM instance config, plugins, history
~/.claude-deepseek/DeepSeek instance config, plugins, history
~/.local/bin/claude-glmWrapper script for the GLM instance
~/.local/bin/claude-deepseekWrapper script for the DeepSeek instance

Settings are in ~/.claude-<name>/settings.json. You can edit them directly or use the TUI.

Share plugins across instances

During setup, you can enable auto-sync. This symlinks plugins from your main ~/.claude directory so every instance shares the same tools. Changes propagate instantly.

Terminal window
claude-multi
# Pick: Toggle auto-sync
# Select: glm
# Select: deepseek

Or skip it and manage plugins per instance if you prefer isolation.

Next steps