Programmierassistenten
Grok Build-Setup
Konfigurieren Sie die offizielle Grok Build-CLI mit dem Responses-API-Endpunkt.
1. Erstellen Sie einen API-Schlüssel
Abschnitt betitelt „1. Erstellen Sie einen API-Schlüssel“Erstellen Sie einen Modelflare-API-Schlüssel, der auf grok-4.5 zugreifen kann.
2. Installieren Sie Grok Build
Abschnitt betitelt „2. Installieren Sie Grok Build“irm https://x.ai/cli/install.ps1 | iexgrok versioncurl -fsSL https://x.ai/cli/install.sh | bashgrok version3. Erstellen Sie config.toml
Abschnitt betitelt „3. Erstellen Sie config.toml“New-Item -ItemType Directory -Force "$HOME\.grok" | Out-NullSet-Location "$HOME\.grok"$config = @'[models]default = "modelflare-grok"
[model.modelflare-grok]model = "grok-4.5"base_url = "https://modelflare.dev/v1"name = "Modelflare Grok 4.5"env_key = "MODELFLARE_API_KEY"api_backend = "responses"'@$utf8NoBom = New-Object System.Text.UTF8Encoding -ArgumentList $false[System.IO.File]::WriteAllText( (Join-Path (Get-Location) "config.toml"), $config, $utf8NoBom)mkdir -p ~/.grokcd ~/.grokcat > config.toml << 'EOF'[models]default = "modelflare-grok"
[model.modelflare-grok]model = "grok-4.5"base_url = "https://modelflare.dev/v1"name = "Modelflare Grok 4.5"env_key = "MODELFLARE_API_KEY"api_backend = "responses"EOFchmod 600 config.toml4. Speichern Sie Ihren API-Schlüssel
Abschnitt betitelt „4. Speichern Sie Ihren API-Schlüssel“Ersetzen Sie YOUR_MODELFLARE_API_KEY durch Ihren vollständigen Modelflare-API-Schlüssel.
[Environment]::SetEnvironmentVariable( "MODELFLARE_API_KEY", "YOUR_MODELFLARE_API_KEY", "User")$env:MODELFLARE_API_KEY = "YOUR_MODELFLARE_API_KEY"echo 'export MODELFLARE_API_KEY="YOUR_MODELFLARE_API_KEY"' >> ~/.bashrcsource ~/.bashrcecho 'export MODELFLARE_API_KEY="YOUR_MODELFLARE_API_KEY"' >> ~/.zshrcsource ~/.zshrc5. Starten und testen
Abschnitt betitelt „5. Starten und testen“Set-Location $HOMEgrok -p "Reply only: Modelflare connected" -m modelflare-grokgrokcd ~grok -p "Reply only: Modelflare connected" -m modelflare-grokgrok