To use Codex with abliteration.ai, register a custom model provider inDocumentation Index
Fetch the complete documentation index at: https://docs.abliteration.ai/llms.txt
Use this file to discover all available pages before exploring further.
~/.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
Configure
Codex reads its configuration from~/.codex/config.toml (user-level). Create it if it doesn’t exist:
~/.codex/config.toml:
env_key tells Codex which environment variable holds your API key — it does not contain the key itself. Export it separately:
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
abliteration the default so plain codex picks it up, add this line at the top of ~/.codex/config.toml:
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:- CLI flags (highest)
- Profile (
--profile <name>) - Project config (
.codex/config.toml) - User config (
~/.codex/config.toml)
Web search
Web search is enabled withweb_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
Notes
- Policy rules attached to your API key apply to every Codex turn.
- For headless / CI runs, use
codex execwith--approval-mode auto.