Salta ai contenuti

Guida alla configurazione dei fornitori

Questa guida copre le istruzioni dettagliate per la configurazione di ogni fornitore supportato da Claudex, inclusi fornitori con chiave API, abbonamenti OAuth, piattaforme cloud e modelli locali.

  1. Registrati su console.anthropic.com
  2. Vai su API Keys e crea una nuova chiave (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. Registrati su platform.minimaxi.com
  2. Vai su API Keys nella 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. Registrati su openrouter.ai
  2. Ottieni la tua chiave API su 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. Registrati su console.x.ai
  2. Crea una chiave API nella 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. Registrati su platform.openai.com
  2. Crea una chiave API su 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. Registrati su platform.deepseek.com
  2. Crea una chiave API nella 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. Registrati su platform.moonshot.cn
  2. Crea una chiave API nella 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. Registrati su open.bigmodel.cn
  2. Crea una chiave API nella 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. Registrati su console.groq.com
  2. Crea una chiave API in 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. Registrati su console.mistral.ai
  2. Crea una chiave API nella 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. Registrati su api.together.ai
  2. Crea una chiave API nella 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. Registrati su perplexity.ai
  2. Crea una chiave API su 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. Registrati su cloud.cerebras.ai
  2. Crea una chiave API nella 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. Crea una risorsa Azure OpenAI nel portale Azure
  2. Distribuisci un modello e annota il nome della risorsa e del deployment
  3. Ottieni la chiave API da Chiavi e 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. Abilita l’API Vertex AI nel tuo progetto GCP
  2. Genera un token di accesso con 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

AWS Bedrock e supportato tramite un proxy LiteLLM:

  1. Installa LiteLLM: pip install litellm
  2. Avvia il proxy:
Terminal window
litellm --model bedrock/anthropic.claude-sonnet-4-20250514-v2:0
  1. Configura 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"

L’autenticazione OAuth ti permette di usare abbonamenti esistenti (ChatGPT Plus, Claude Max, ecc.) invece di chiavi API separate.

Usa il tuo abbonamento Claude esistente tramite la sessione OAuth nativa di Claude Code.

Prerequisiti: Claude Code installato e con accesso effettuato (il comando claude funziona 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"

Usa il tuo abbonamento ChatGPT Plus o Pro tramite il token Codex CLI.

Prerequisiti: Installa Codex CLI e autentica:

Terminal window
# Installa Codex CLI
npm install -g @openai/codex
# Autenticati (apre il browser)
codex auth

Poi configura 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
# Leggi il token da Codex CLI
claudex auth login openai --profile codex-sub
# Verifica
claudex auth status
# Esegui
claudex run codex-sub

Usa il tuo account Google tramite le credenziali di 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
# Il login legge dalle credenziali di Gemini CLI
claudex auth login google --profile gemini-sub
# Verifica
claudex auth status

Usa il tuo account Qwen tramite il flusso 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
# Avvia il flusso device code
claudex auth login qwen --profile qwen-oauth
# Verifica
claudex auth status

Usa il tuo account Kimi tramite le credenziali di 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
# Il login legge dalle credenziali di Kimi CLI
claudex auth login kimi --profile kimi-oauth
# Verifica
claudex auth status

Usa il tuo abbonamento GitHub Copilot tramite il flusso 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
# Avvia il flusso device code (apre il browser per il login GitHub)
claudex auth login github --profile copilot
# Verifica
claudex auth status

Usa il tuo abbonamento GitLab Duo tramite un 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
# Imposta il token GitLab come variabile d'ambiente
export GITLAB_TOKEN=glpat-...
# Login
claudex auth login gitlab --profile gitlab-duo
# Verifica
claudex auth status
  1. Installa Ollama: ollama.com
  2. Scarica un modello:
Terminal window
ollama pull qwen2.5:72b
  1. Configura 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. Installa e avvia vLLM:
Terminal window
pip install vllm
vllm serve meta-llama/Llama-3.3-70B-Instruct --port 8000
  1. Configura 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. Scarica LM Studio da lmstudio.ai
  2. Carica un modello e avvia il server locale (porta predefinita: 1234)
[[profiles]]
name = "lm-studio"
provider_type = "OpenAICompatible"
base_url = "http://localhost:1234/v1"
api_key = "lm-studio"
default_model = "local-model"

Dopo aver configurato un fornitore, verifica la connettivita:

Terminal window
# Testa un profilo specifico
claudex profile test <profile-name>
# Testa tutti i profili
claudex profile test all
# Elenca tutti i profili configurati
claudex profile list