Skip to main content

xAI (Grok) Provider

CCS supports xAI (Grok) through CLIProxy OAuth. The canonical provider ID is xai; grok is a supported CLI alias for the same provider state.

Quick Start

Use xai in configuration and provider references. grok does not create a separate account bucket, settings file, or model catalog.

Authentication

xAI uses a device-code OAuth flow:
  • Run ccs xai --auth, then complete authorization at the displayed xAI device URL with its verification code.
  • No local callback port is used.
  • ccs xai --auth --headless avoids launching a browser; it still displays the device URL and code, then polls for completion.
  • CLIProxy manages token refresh after authorization.
ccs grok --auth starts the same OAuth flow. This provider shortcut is separate from standalone API-key Grok integrations, including Grok WebSearch or Docker CLI configuration.

Accounts And Storage

xAI supports multiple accounts. CCS uses token metadata email when it is available; otherwise it derives a stable account ID from the xai-*.json filename suffix. If an ID collides, CCS uses xai-1, xai-2, and so on.

Model Selection

Use the interactive picker to choose a configured route:
The default is grok-build-0.1. When a live CLIProxy catalog is available it is used first, followed by an unexpired local cache; the bundled static catalog is a fallback when neither is usable. The bundled static fallback catalog contains:
  • grok-build-0.1
  • grok-4.5
  • grok-4.3
  • grok-4.20-0309-reasoning
  • grok-4.20-0309-non-reasoning
  • grok-4.20-multi-agent-0309
  • grok-3-mini
  • grok-3-mini-fast
  • grok-composer-2.5-fast
The default tier mapping is grok-build-0.1 for default and Sonnet, grok-4.5 for Opus, and grok-composer-2.5-fast for Haiku.

Backend Compatibility

xAI works with the default original CLIProxy backend as well as plus; it is not a Plus-only provider. xAI does not participate in the CLIProxy quota display.