Provider Setup Guide
This guide covers detailed setup instructions for every provider supported by Claudex, including API key providers, OAuth subscriptions, and local models.
API Key Providers
Section titled “API Key Providers”Anthropic
Section titled “Anthropic”- Sign up at console.anthropic.com
- 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"claudex profile test anthropicMiniMax
Section titled “MiniMax”- Sign up at platform.minimaxi.com
- 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"claudex profile test minimaxOpenRouter
Section titled “OpenRouter”- Sign up at openrouter.ai
- 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"claudex profile test openrouterGrok (xAI)
Section titled “Grok (xAI)”- Sign up at console.x.ai
- 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"claudex profile test grokOpenAI
Section titled “OpenAI”- Sign up at platform.openai.com
- 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"claudex profile test chatgptDeepSeek
Section titled “DeepSeek”- Sign up at platform.deepseek.com
- 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"claudex profile test deepseekKimi / Moonshot
Section titled “Kimi / Moonshot”- Sign up at platform.moonshot.cn
- 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"claudex profile test kimiGLM / Zhipu
Section titled “GLM / Zhipu”- Sign up at open.bigmodel.cn
- 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"claudex profile test glmOAuth Subscriptions
Section titled “OAuth Subscriptions”OAuth authentication lets you use existing provider subscriptions (ChatGPT Plus, Claude Max, etc.) instead of separate API keys.
Claude Max / Pro
Section titled “Claude Max / Pro”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.
ChatGPT Plus / Codex CLI
Section titled “ChatGPT Plus / Codex CLI”Use your ChatGPT Plus or Pro subscription via the Codex CLI token.
Prerequisites: Install Codex CLI and authenticate:
# Install Codex CLInpm install -g @openai/codex
# Authenticate (opens browser)codex authThen 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"# Read token from Codex CLIclaudex auth login openai --profile codex-sub
# Verifyclaudex auth status
# Runclaudex run codex-subGoogle Gemini
Section titled “Google Gemini”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"# Start device code flow (opens browser for Google login)claudex auth login google --profile gemini
# Verifyclaudex auth statusQwen / Tongyi Qianwen
Section titled “Qwen / Tongyi Qianwen”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"# Start device code flowclaudex auth login qwen --profile qwen-oauth
# Verifyclaudex auth statusKimi / Moonshot (OAuth)
Section titled “Kimi / Moonshot (OAuth)”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"# Start device code flowclaudex auth login kimi --profile kimi-oauth
# Verifyclaudex auth statusGitHub Copilot
Section titled “GitHub Copilot”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"# Start device code flow (opens browser for GitHub login)claudex auth login github --profile github-copilot
# Verifyclaudex auth statusLocal Models
Section titled “Local Models”Ollama
Section titled “Ollama”- Install Ollama: ollama.com
- Pull a model:
ollama pull qwen2.5:72b- Configure Claudex:
[[profiles]]name = "local-qwen"provider_type = "OpenAICompatible"base_url = "http://localhost:11434/v1"api_key = ""default_model = "qwen2.5:72b"claudex profile test local-qwen- Install and start vLLM:
pip install vllmvllm serve meta-llama/Llama-3.3-70B-Instruct --port 8000- 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"LM Studio
Section titled “LM Studio”- Download LM Studio from lmstudio.ai
- 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"Verifying Your Setup
Section titled “Verifying Your Setup”After configuring any provider, verify connectivity:
# Test a specific profileclaudex profile test <profile-name>
# Test all profilesclaudex profile test all
# List all configured profilesclaudex profile list