Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.abliteration.ai/llms.txt

Use this file to discover all available pages before exploring further.

To use Codex with abliteration.ai, register a custom model provider in ~/.codex/config.toml pointing at https://api.abliteration.ai/v1 with wire_api = "responses". The Codex CLI then runs unchanged — same workflow, routed through abliteration.

Install

npm install -g @openai/codex

Configure

Codex reads its configuration from ~/.codex/config.toml (user-level). Create it if it doesn’t exist:
mkdir -p ~/.codex
Add the following to ~/.codex/config.toml:
[model_providers.abliteration]
name = "abliteration.ai"
base_url = "https://api.abliteration.ai/v1"
wire_api = "responses"
env_key = "ABLITERATION_API_KEY"

[profiles.abliteration]
model = "abliterated-model"
model_provider = "abliteration"
web_search = "live"
env_key tells Codex which environment variable holds your API key — it does not contain the key itself. Export it separately:
export ABLITERATION_API_KEY="ak_YOUR_API_KEY"
Codex only reads keys from environment variables. Setting the key inside config.toml will not work. Use a tool like direnv or your shell rc file if you want it persisted across terminals.

Run

codex --profile abliteration
To make abliteration the default so plain codex picks it up, add this line at the top of ~/.codex/config.toml:
profile = "abliteration"
Then:
codex

Per-project config

Codex also looks for .codex/config.toml inside trusted projects. Use this to override the model or profile for a single repo without touching the user-level config.

Config precedence

When the same setting is defined in multiple places, the order is:
  1. CLI flags (highest)
  2. Profile (--profile <name>)
  3. Project config (.codex/config.toml)
  4. User config (~/.codex/config.toml)
If Codex isn’t using your abliteration provider, check whether something higher in this chain is overriding it. Web search is enabled with web_search = "live" in the profile (already shown above). You’ll need to turn on web search in the console too. See the web search overview for full details.

Troubleshooting

echo $ABLITERATION_API_KEY        # confirm the key is exported in this shell
cat ~/.codex/config.toml          # confirm the config is present and correct
codex --profile abliteration      # run with the profile explicitly

Notes

  • Policy rules attached to your API key apply to every Codex turn.
  • For headless / CI runs, use codex exec with --approval-mode auto.
Last modified on May 3, 2026