Ir al contenido
Abre CastalyConsola

Asistentes de programación

Configuración de Grok Build

Configure la CLI oficial Grok Build con el punto final API Responses.

Cree una clave API de Modelflare que pueda acceder a grok-4.5.

Ventana de terminalPowerShell
irm https://x.ai/cli/install.ps1 | iex
grok version
Ventana de terminalPowerShell
New-Item -ItemType Directory -Force "$HOME\.grok" | Out-Null
Set-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
)

Reemplace YOUR_MODELFLARE_API_KEY con su clave API Modelflare completa.

Ventana de terminalPowerShell
[Environment]::SetEnvironmentVariable(
"MODELFLARE_API_KEY",
"YOUR_MODELFLARE_API_KEY",
"User"
)
$env:MODELFLARE_API_KEY = "YOUR_MODELFLARE_API_KEY"
Ventana de terminalPowerShell
Set-Location $HOME
grok -p "Reply only: Modelflare connected" -m modelflare-grok
grok