Pular para o conteúdo

Guia de Configuracao de Provedores

Este guia cobre instrucoes detalhadas de configuracao para todos os provedores suportados pelo Claudex, incluindo provedores com chave API, assinaturas OAuth, plataformas cloud e modelos locais.

  1. Cadastre-se em console.anthropic.com
  2. Navegue ate API Keys e crie uma nova chave (formato: 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. Cadastre-se em platform.minimaxi.com
  2. Navegue ate API Keys no 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. Cadastre-se em openrouter.ai
  2. Obtenha sua chave API em 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. Cadastre-se em console.x.ai
  2. Crie uma chave API no 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. Cadastre-se em platform.openai.com
  2. Crie uma chave API em 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. Cadastre-se em platform.deepseek.com
  2. Crie uma chave API no 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. Cadastre-se em platform.moonshot.cn
  2. Crie uma chave API no console
[[profiles]]
name = "kimi"
provider_type = "OpenAICompatible"
base_url = "https://api.moonshot.ai/v1"
api_key = "sk-..."
default_model = "kimi-k2-0905-preview"
Terminal window
claudex profile test kimi
  1. Cadastre-se em open.bigmodel.cn
  2. Crie uma chave API no console
[[profiles]]
name = "glm"
provider_type = "OpenAICompatible"
base_url = "https://api.z.ai/api/paas/v4"
api_key = "..."
default_model = "glm-4.6"
Terminal window
claudex profile test glm
  1. Cadastre-se em console.groq.com
  2. Crie uma chave API em Settings > API Keys
[[profiles]]
name = "groq"
provider_type = "OpenAICompatible"
base_url = "https://api.groq.com/openai/v1"
api_key = "gsk_..."
default_model = "llama-3.3-70b-versatile"
Terminal window
claudex profile test groq
  1. Cadastre-se em console.mistral.ai
  2. Crie uma chave API no console
[[profiles]]
name = "mistral"
provider_type = "OpenAICompatible"
base_url = "https://api.mistral.ai/v1"
api_key = "..."
default_model = "mistral-large-latest"
Terminal window
claudex profile test mistral
  1. Cadastre-se em api.together.ai
  2. Crie uma chave API no dashboard
[[profiles]]
name = "together"
provider_type = "OpenAICompatible"
base_url = "https://api.together.xyz/v1"
api_key = "..."
default_model = "meta-llama/Llama-3.3-70B-Instruct-Turbo"
Terminal window
claudex profile test together
  1. Cadastre-se em perplexity.ai
  2. Crie uma chave API em perplexity.ai/settings/api
[[profiles]]
name = "perplexity"
provider_type = "OpenAICompatible"
base_url = "https://api.perplexity.ai"
api_key = "pplx-..."
default_model = "sonar-pro"
Terminal window
claudex profile test perplexity
  1. Cadastre-se em cloud.cerebras.ai
  2. Crie uma chave API no dashboard
[[profiles]]
name = "cerebras"
provider_type = "OpenAICompatible"
base_url = "https://api.cerebras.ai/v1"
api_key = "..."
default_model = "llama-3.3-70b"
Terminal window
claudex profile test cerebras
  1. Crie um recurso Azure OpenAI no Portal Azure
  2. Faca deploy de um modelo e anote o nome do recurso e do deployment
  3. Obtenha sua chave API em Keys and Endpoint
[[profiles]]
name = "azure-openai"
provider_type = "OpenAICompatible"
base_url = "https://YOUR_RESOURCE.openai.azure.com/openai/deployments/YOUR_DEPLOYMENT"
api_key = "YOUR_AZURE_KEY"
default_model = "gpt-4o"
[profiles.query_params]
api-version = "2024-12-01-preview"
Terminal window
claudex profile test azure-openai
  1. Habilite a API Vertex AI no seu projeto GCP
  2. Gere um token de acesso com gcloud auth print-access-token
[[profiles]]
name = "vertex-ai"
provider_type = "DirectAnthropic"
base_url = "https://us-east5-aiplatform.googleapis.com/v1/projects/YOUR_PROJECT/locations/us-east5/publishers/anthropic/models"
api_key = "YOUR_GCLOUD_TOKEN"
default_model = "claude-sonnet-4@20250514"
Terminal window
claudex profile test vertex-ai

O AWS Bedrock e suportado atraves de um proxy LiteLLM:

  1. Instale o LiteLLM: pip install litellm
  2. Inicie o proxy:
Terminal window
litellm --model bedrock/anthropic.claude-sonnet-4-20250514-v2:0
  1. Configure o Claudex:
[[profiles]]
name = "bedrock"
provider_type = "OpenAICompatible"
base_url = "http://localhost:4000/v1"
api_key = "sk-litellm"
default_model = "bedrock/anthropic.claude-sonnet-4-20250514-v2:0"

A autenticacao OAuth permite usar assinaturas existentes de provedores (ChatGPT Plus, Claude Max, etc.) em vez de chaves API separadas.

Use sua assinatura Claude existente atraves da sessao OAuth nativa do Claude Code.

Pre-requisitos: Claude Code instalado e logado (o comando claude funciona normalmente)

[[profiles]]
name = "claude-max"
provider_type = "DirectAnthropic"
base_url = "https://api.claude.ai"
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"

Use sua assinatura ChatGPT Plus ou Pro via token do Codex CLI.

Pre-requisitos: Instale o Codex CLI e autentique:

Terminal window
# Instalar Codex CLI
npm install -g @openai/codex
# Autenticar (abre o navegador)
codex auth

Em seguida, configure o Claudex:

[[profiles]]
name = "codex-sub"
provider_type = "OpenAIResponses"
base_url = "https://chatgpt.com/backend-api/codex"
default_model = "gpt-5.3-codex"
auth_type = "oauth"
oauth_provider = "openai"
[profiles.models]
haiku = "codex-mini-latest"
sonnet = "gpt-5.3-codex"
opus = "gpt-5.3-codex"
Terminal window
# Ler token do Codex CLI
claudex auth login openai --profile codex-sub
# Verificar
claudex auth status
# Executar
claudex run codex-sub

Use sua conta Google via credenciais do Gemini CLI.

[[profiles]]
name = "gemini-sub"
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
# Login le das credenciais do Gemini CLI
claudex auth login google --profile gemini-sub
# Verificar
claudex auth status

Use sua conta Qwen via fluxo OAuth Device Code.

[[profiles]]
name = "qwen-oauth"
provider_type = "OpenAICompatible"
base_url = "https://chat.qwen.ai/api"
default_model = "qwen3-235b-a22b"
auth_type = "oauth"
oauth_provider = "qwen"
Terminal window
# Iniciar fluxo device code
claudex auth login qwen --profile qwen-oauth
# Verificar
claudex auth status

Use sua conta Kimi via credenciais do Kimi CLI.

[[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
# Login le das credenciais do Kimi CLI
claudex auth login kimi --profile kimi-oauth
# Verificar
claudex auth status

Use sua assinatura GitHub Copilot via fluxo OAuth Device Code.

[[profiles]]
name = "copilot"
provider_type = "OpenAICompatible"
base_url = "https://api.githubcopilot.com"
default_model = "gpt-4o"
auth_type = "oauth"
oauth_provider = "github"
Terminal window
# Iniciar fluxo device code (abre o navegador para login no GitHub)
claudex auth login github --profile copilot
# Verificar
claudex auth status

Use sua assinatura GitLab Duo via Personal Access Token.

[[profiles]]
name = "gitlab-duo"
provider_type = "OpenAICompatible"
base_url = "https://gitlab.com/api/v4/ai/llm/proxy"
default_model = "claude-sonnet-4-20250514"
auth_type = "oauth"
oauth_provider = "gitlab"
Terminal window
# Defina seu token GitLab como variavel de ambiente
export GITLAB_TOKEN=glpat-...
# Login
claudex auth login gitlab --profile gitlab-duo
# Verificar
claudex auth status
  1. Instale o Ollama: ollama.com
  2. Baixe um modelo:
Terminal window
ollama pull qwen2.5:72b
  1. Configure o 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. Instale e inicie o vLLM:
Terminal window
pip install vllm
vllm serve meta-llama/Llama-3.3-70B-Instruct --port 8000
  1. Configure o 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. Baixe o LM Studio em lmstudio.ai
  2. Carregue um modelo e inicie o servidor local (porta padrao: 1234)
[[profiles]]
name = "lm-studio"
provider_type = "OpenAICompatible"
base_url = "http://localhost:1234/v1"
api_key = "lm-studio"
default_model = "local-model"

Apos configurar qualquer provedor, verifique a conectividade:

Terminal window
# Testar um profile especifico
claudex profile test <profile-name>
# Testar todos os profiles
claudex profile test all
# Listar todos os profiles configurados
claudex profile list