Skip to content

Provider Setup Guide

This guide covers detailed setup instructions for every provider supported by Claudex, including API key providers, OAuth subscriptions, and local models.

  1. Sign up at console.anthropic.com
  2. Navigate to API Keys and create a new key (format: sk-ant-*)
[[profiles]]
name = "anthropic"
provider_type = "DirectAnthropic"
base_url = "https://api.anthropic.com"
api_key = "sk-ant-..."
default_model = "claude-sonnet-4-20250514"
Terminal window
claudex profile test anthropic
  1. Sign up at platform.minimaxi.com
  2. Navigate to API Keys in the console
[[profiles]]
name = "minimax"
provider_type = "DirectAnthropic"
base_url = "https://api.minimax.io/anthropic"
api_key = "..."
default_model = "claude-sonnet-4-20250514"
Terminal window
claudex profile test minimax
  1. Sign up at openrouter.ai
  2. Get your API key at openrouter.ai/keys
[[profiles]]
name = "openrouter"
provider_type = "OpenAICompatible"
base_url = "https://openrouter.ai/api/v1"
api_key = "sk-or-..."
default_model = "anthropic/claude-sonnet-4"
Terminal window
claudex profile test openrouter
  1. Sign up at console.x.ai
  2. Create an API key in the console
[[profiles]]
name = "grok"
provider_type = "OpenAICompatible"
base_url = "https://api.x.ai/v1"
api_key = "xai-..."
default_model = "grok-3-beta"
Terminal window
claudex profile test grok
  1. Sign up at platform.openai.com
  2. Create an API key at platform.openai.com/api-keys
[[profiles]]
name = "chatgpt"
provider_type = "OpenAICompatible"
base_url = "https://api.openai.com/v1"
api_key = "sk-..."
default_model = "gpt-4o"
Terminal window
claudex profile test chatgpt
  1. Sign up at platform.deepseek.com
  2. Create an API key in the console
[[profiles]]
name = "deepseek"
provider_type = "OpenAICompatible"
base_url = "https://api.deepseek.com"
api_key = "sk-..."
default_model = "deepseek-chat"
Terminal window
claudex profile test deepseek
  1. Sign up at platform.moonshot.cn
  2. Create an API key in the console
[[profiles]]
name = "kimi"
provider_type = "OpenAICompatible"
base_url = "https://api.moonshot.cn/v1"
api_key = "sk-..."
default_model = "moonshot-v1-128k"
Terminal window
claudex profile test kimi
  1. Sign up at open.bigmodel.cn
  2. Create an API key in the console
[[profiles]]
name = "glm"
provider_type = "OpenAICompatible"
base_url = "https://open.bigmodel.cn/api/paas/v4"
api_key = "..."
default_model = "glm-4-plus"
Terminal window
claudex profile test glm

OAuth authentication lets you use existing provider subscriptions (ChatGPT Plus, Claude Max, etc.) instead of separate API keys.

Use your existing Claude subscription through Claude Code’s native OAuth session.

Prerequisites: Claude Code installed and logged in (claude command works normally)

[[profiles]]
name = "claude-sub"
provider_type = "DirectAnthropic"
base_url = "https://api.anthropic.com"
default_model = "claude-sonnet-4-20250514"
auth_type = "oauth"
oauth_provider = "claude"
[profiles.models]
haiku = "claude-haiku-4-20250514"
sonnet = "claude-sonnet-4-20250514"
opus = "claude-opus-4-20250514"

No separate claudex auth login step is needed. Claudex reads the existing session from ~/.claude.

Use your ChatGPT Plus or Pro subscription via the Codex CLI token.

Prerequisites: Install Codex CLI and authenticate:

Terminal window
# Install Codex CLI
npm install -g @openai/codex
# Authenticate (opens browser)
codex auth

Then configure Claudex:

[[profiles]]
name = "codex-sub"
provider_type = "OpenAIResponses"
base_url = "https://chatgpt.com/backend-api/codex"
default_model = "gpt-4o"
auth_type = "oauth"
oauth_provider = "openai"
[profiles.models]
haiku = "gpt-4o-mini"
sonnet = "gpt-4o"
opus = "o1-pro"
Terminal window
# Read token from Codex CLI
claudex auth login openai --profile codex-sub
# Verify
claudex auth status
# Run
claudex run codex-sub

Use your Google account via OAuth Device Code flow.

[[profiles]]
name = "gemini"
provider_type = "OpenAICompatible"
base_url = "https://generativelanguage.googleapis.com/v1beta/openai"
default_model = "gemini-2.5-pro"
auth_type = "oauth"
oauth_provider = "google"
[profiles.models]
haiku = "gemini-2.0-flash"
sonnet = "gemini-2.5-pro"
opus = "gemini-2.5-pro"
Terminal window
# Start device code flow (opens browser for Google login)
claudex auth login google --profile gemini
# Verify
claudex auth status

Use your Qwen account via OAuth Device Code flow.

[[profiles]]
name = "qwen-oauth"
provider_type = "OpenAICompatible"
base_url = "https://chat.qwenlm.ai/api/chat/v1"
default_model = "qwen-max"
auth_type = "oauth"
oauth_provider = "qwen"
Terminal window
# Start device code flow
claudex auth login qwen --profile qwen-oauth
# Verify
claudex auth status

Use your Kimi account via OAuth Device Code flow.

[[profiles]]
name = "kimi-oauth"
provider_type = "OpenAICompatible"
base_url = "https://api.moonshot.cn/v1"
default_model = "moonshot-v1-128k"
auth_type = "oauth"
oauth_provider = "kimi"
Terminal window
# Start device code flow
claudex auth login kimi --profile kimi-oauth
# Verify
claudex auth status

Use your GitHub Copilot subscription via OAuth Device Code flow.

[[profiles]]
name = "github-copilot"
provider_type = "OpenAICompatible"
base_url = "https://api.githubcopilot.com"
default_model = "gpt-4o"
auth_type = "oauth"
oauth_provider = "github"
Terminal window
# Start device code flow (opens browser for GitHub login)
claudex auth login github --profile github-copilot
# Verify
claudex auth status
  1. Install Ollama: ollama.com
  2. Pull a model:
Terminal window
ollama pull qwen2.5:72b
  1. Configure Claudex:
[[profiles]]
name = "local-qwen"
provider_type = "OpenAICompatible"
base_url = "http://localhost:11434/v1"
api_key = ""
default_model = "qwen2.5:72b"
Terminal window
claudex profile test local-qwen
  1. Install and start vLLM:
Terminal window
pip install vllm
vllm serve meta-llama/Llama-3.3-70B-Instruct --port 8000
  1. Configure Claudex:
[[profiles]]
name = "local-llama"
provider_type = "OpenAICompatible"
base_url = "http://localhost:8000/v1"
api_key = ""
default_model = "meta-llama/Llama-3.3-70B-Instruct"
  1. Download LM Studio from lmstudio.ai
  2. Load a model and start the local server (default port: 1234)
[[profiles]]
name = "lm-studio"
provider_type = "OpenAICompatible"
base_url = "http://localhost:1234/v1"
api_key = ""
default_model = "loaded-model-name"

After configuring any provider, verify connectivity:

Terminal window
# Test a specific profile
claudex profile test <profile-name>
# Test all profiles
claudex profile test all
# List all configured profiles
claudex profile list