Przejdź do głównej zawartości

Przewodnik konfiguracji dostawcy

Ten przewodnik zawiera szczegolowe instrukcje konfiguracji dla kazdego dostawcy obslugiwanego przez Claudex, w tym dostawcow kluczy API, subskrypcji OAuth, platform chmurowych i modeli lokalnych.

  1. Zarejestruj sie na console.anthropic.com
  2. Przejdz do API Keys i utworz nowy klucz (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"
Okno terminala
claudex profile test anthropic
  1. Zarejestruj sie na platform.minimaxi.com
  2. Przejdz do API Keys w konsoli
[[profiles]]
name = "minimax"
provider_type = "DirectAnthropic"
base_url = "https://api.minimax.io/anthropic"
api_key = "..."
default_model = "claude-sonnet-4-20250514"
Okno terminala
claudex profile test minimax
  1. Zarejestruj sie na openrouter.ai
  2. Pobierz klucz API na 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"
Okno terminala
claudex profile test openrouter
  1. Zarejestruj sie na console.x.ai
  2. Utworz klucz API w konsoli
[[profiles]]
name = "grok"
provider_type = "OpenAICompatible"
base_url = "https://api.x.ai/v1"
api_key = "xai-..."
default_model = "grok-3-beta"
Okno terminala
claudex profile test grok
  1. Zarejestruj sie na platform.openai.com
  2. Utworz klucz API na 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"
Okno terminala
claudex profile test chatgpt
  1. Zarejestruj sie na platform.deepseek.com
  2. Utworz klucz API w konsoli
[[profiles]]
name = "deepseek"
provider_type = "OpenAICompatible"
base_url = "https://api.deepseek.com"
api_key = "sk-..."
default_model = "deepseek-chat"
Okno terminala
claudex profile test deepseek
  1. Zarejestruj sie na platform.moonshot.cn
  2. Utworz klucz API w konsoli
[[profiles]]
name = "kimi"
provider_type = "OpenAICompatible"
base_url = "https://api.moonshot.ai/v1"
api_key = "sk-..."
default_model = "kimi-k2-0905-preview"
Okno terminala
claudex profile test kimi
  1. Zarejestruj sie na open.bigmodel.cn
  2. Utworz klucz API w konsoli
[[profiles]]
name = "glm"
provider_type = "OpenAICompatible"
base_url = "https://api.z.ai/api/paas/v4"
api_key = "..."
default_model = "glm-4.6"
Okno terminala
claudex profile test glm
  1. Zarejestruj sie na console.groq.com
  2. Utworz klucz API w 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"
Okno terminala
claudex profile test groq
  1. Zarejestruj sie na console.mistral.ai
  2. Utworz klucz API w konsoli
[[profiles]]
name = "mistral"
provider_type = "OpenAICompatible"
base_url = "https://api.mistral.ai/v1"
api_key = "..."
default_model = "mistral-large-latest"
Okno terminala
claudex profile test mistral
  1. Zarejestruj sie na api.together.ai
  2. Utworz klucz API w panelu
[[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"
Okno terminala
claudex profile test together
  1. Zarejestruj sie na perplexity.ai
  2. Utworz klucz API na perplexity.ai/settings/api
[[profiles]]
name = "perplexity"
provider_type = "OpenAICompatible"
base_url = "https://api.perplexity.ai"
api_key = "pplx-..."
default_model = "sonar-pro"
Okno terminala
claudex profile test perplexity
  1. Zarejestruj sie na cloud.cerebras.ai
  2. Utworz klucz API w panelu
[[profiles]]
name = "cerebras"
provider_type = "OpenAICompatible"
base_url = "https://api.cerebras.ai/v1"
api_key = "..."
default_model = "llama-3.3-70b"
Okno terminala
claudex profile test cerebras
  1. Utworz zasob Azure OpenAI w Azure Portal
  2. Wdraz model i zapisz nazwe zasobu oraz nazwe wdrozenia
  3. Pobierz klucz API z 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"
Okno terminala
claudex profile test azure-openai
  1. Wlacz API Vertex AI w swoim projekcie GCP
  2. Wygeneruj token dostepu za pomoca 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"
Okno terminala
claudex profile test vertex-ai

AWS Bedrock jest obslugiwany przez proxy LiteLLM:

  1. Zainstaluj LiteLLM: pip install litellm
  2. Uruchom proxy:
Okno terminala
litellm --model bedrock/anthropic.claude-sonnet-4-20250514-v2:0
  1. Skonfiguruj 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"

Uwierzytelnianie OAuth pozwala uzywac istniejacych subskrypcji dostawcy (ChatGPT Plus, Claude Max itp.) zamiast osobnych kluczy API.

Uzyj istniejacej subskrypcji Claude przez natywna sesje OAuth Claude Code.

Wymagania wstepne: Claude Code zainstalowany i zalogowany (polecenie claude dziala normalnie)

[[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"

Uzyj subskrypcji ChatGPT Plus lub Pro przez token Codex CLI.

Wymagania wstepne: Zainstaluj Codex CLI i uwierzytelnij sie:

Okno terminala
# Zainstaluj Codex CLI
npm install -g @openai/codex
# Uwierzytelnianie (otwiera przegladarke)
codex auth

Nastepnie skonfiguruj 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"
Okno terminala
# Odczytaj token z Codex CLI
claudex auth login openai --profile codex-sub
# Weryfikacja
claudex auth status
# Uruchomienie
claudex run codex-sub

Uzyj konta Google przez poswiadczenia 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"
Okno terminala
# Login odczytuje poswiadczenia z Gemini CLI
claudex auth login google --profile gemini-sub
# Weryfikacja
claudex auth status

Uzyj konta Qwen przez przeplyw 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"
Okno terminala
# Uruchom przeplyw device code
claudex auth login qwen --profile qwen-oauth
# Weryfikacja
claudex auth status

Uzyj konta Kimi przez poswiadczenia 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"
Okno terminala
# Login odczytuje poswiadczenia z Kimi CLI
claudex auth login kimi --profile kimi-oauth
# Weryfikacja
claudex auth status

Uzyj subskrypcji GitHub Copilot przez przeplyw 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"
Okno terminala
# Uruchom przeplyw device code (otwiera przegladarke do logowania GitHub)
claudex auth login github --profile copilot
# Weryfikacja
claudex auth status

Uzyj subskrypcji GitLab Duo przez 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"
Okno terminala
# Ustaw token GitLab jako zmienna srodowiskowa
export GITLAB_TOKEN=glpat-...
# Login
claudex auth login gitlab --profile gitlab-duo
# Weryfikacja
claudex auth status
  1. Zainstaluj Ollama: ollama.com
  2. Pobierz model:
Okno terminala
ollama pull qwen2.5:72b
  1. Skonfiguruj Claudex:
[[profiles]]
name = "local-qwen"
provider_type = "OpenAICompatible"
base_url = "http://localhost:11434/v1"
api_key = ""
default_model = "qwen2.5:72b"
Okno terminala
claudex profile test local-qwen
  1. Zainstaluj i uruchom vLLM:
Okno terminala
pip install vllm
vllm serve meta-llama/Llama-3.3-70B-Instruct --port 8000
  1. Skonfiguruj 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. Pobierz LM Studio z lmstudio.ai
  2. Zaladuj model i uruchom serwer lokalny (domyslny port: 1234)
[[profiles]]
name = "lm-studio"
provider_type = "OpenAICompatible"
base_url = "http://localhost:1234/v1"
api_key = "lm-studio"
default_model = "local-model"

Po skonfigurowaniu dowolnego dostawcy sprawdz lacznosc:

Okno terminala
# Przetestuj konkretny profil
claudex profile test <profile-name>
# Przetestuj wszystkie profile
claudex profile test all
# Wylistuj wszystkie skonfigurowane profile
claudex profile list