~/.grok/config.toml with base_url set to https://api.abliteration.ai/v1, an abliteration.ai model ID, and your ak_... key in an environment variable. Grok CLI is xAI’s open-source terminal coding agent. When a model’s base_url is not xAI’s endpoint, Grok CLI sends requests through its OpenAI-compatible backend, so no adapter is required.
Prerequisites
- Grok CLI installed. See the Grok Build repository.
- An
ak_...key from the console.
Configure
Add a custom model to~/.grok/config.toml:
api_backend selects the request protocol. Use chat_completions for the OpenAI-compatible path; abliteration.ai also serves responses and an Anthropic-compatible messages backend. env_key names the environment variable Grok CLI reads the key from, so the key is not stored in the config file.
Export the key:
Run
Start Grok CLI and confirm the model is available:/model abliterated-large-v2 or press Ctrl+M.
Choose a model
abliterated-model-large-v2 is text-only. Use abliterated-model if the agent needs to read images. See models for the full capability and context-window comparison.
Notes
- All abliteration.ai models reason by default. See thinking and reasoning effort.
- Published policies scoped to the key’s project apply to every Grok CLI request. See Policies.
- The live model list is available from
GET /v1/models. See models.