Skip to main content
To use Grok CLI with abliteration.ai, add a custom model in ~/.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

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:
To make it the default model, add:

Run

Start Grok CLI and confirm the model is available:
Select the model for a single prompt:
In an interactive session, switch models with /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.
Last modified on October 1, 2026