Skip to main content

Client overview

This section covers connecting Grok 4.5 through the gateway for popular coding clients.

Shared settings

Remember these three values:
Grok 4.5 supports ~500k context, but quality drops past ~200k.
Prefer context_window / contextWindow = 200000, not a default of 500000. See Grok Build · Context and Models.
For Claude Code, ANTHROPIC_BASE_URL usually must not include /v1, because the SDK appends /v1/messages. See Claude Code.

Supported protocols

For Grok groups, the gateway typically exposes:

Which guide should I read?

Grok Build (recommended)

Closest to native Grok 4.5. Use api_backend = "responses", enable supports_backend_search, and turn off data training via /privacy.

Codex

Add a model_provider in ~/.codex/config.toml and point model to grok-4.5.

Claude Code

Route Messages traffic with env vars and select grok-4.5.

OpenCode

Add an OpenAI-compatible provider in opencode.json; model arona/grok-4.5.

Pi Agent

Add a custom provider in ~/.pi/agent/models.json and select grok-4.5.

Pre-flight checks

Fix API issues first, then edit client configs.

Coverage

  • ✅ Grok 4.5
  • ✅ Grok Build / Codex / Claude Code / OpenCode / Pi Agent
  • ⏳ Other models and clients later
If you use aliases (for example grok-latest), trust GET /v1/models for your key.