Codex with an uncensored model
To run OpenAI's Codex with an uncensored model, add a provider to ~/.codex/config.toml that points at an API serving abliterated models in the OpenAI Responses format.
Which model to use in Codex
Change the model line to start on a model other than DeepSeek V4.1 Flash 1017.
| Model | Use it for | Model id |
|---|---|---|
| Kimi K3.1 Pro | Hard multi-file and security work | kimi-k3.1-pro-uncensored |
| DeepSeek V4.1 Flash | Everyday work, and the default here | deepseek-v4.1-flash-1017-uncensored |
| GLM-5.3 | A second opinion, text only | glm-5.3-uncensored |
| GLM-5.3 Flash | Bulk edits and many subagents | glm-5.3-flash-uncensored |
Set it up
- Install Codex
Shell npm install -g @openai/codexShell brew install --cask codex - Set your API key
Create a key at Silk Compute, export it, and add the line to
~/.zshrcor~/.bashrc.Shell export SILK_API_KEY="sk-..." - Add the provider
Add these lines to
~/.codex/config.toml, creating the file if needed.~/.codex/config.toml model = "deepseek-v4.1-flash-1017-uncensored" model_provider = "silkcompute" web_search = "disabled" [model_providers.silkcompute] name = "Silk Compute" base_url = "https://api.silkcompute.com" env_key = "SILK_API_KEY" model_catalog_url = "https://api.silkcompute.com/codex/models" - Run it
Shell codexSwitch the model and effort with
/model. - Check the key
A list of models means the key works, and a
401meansSILK_API_KEYis empty or wrong.Shell curl -s https://api.silkcompute.com/models -H "Authorization: Bearer $SILK_API_KEY"
Keep OpenAI as your default
Save the same lines as ~/.codex/silk.config.toml instead, and start Codex with the profile when you want the uncensored models.
codex --profile silkWhat each line does
| Line | What it does |
|---|---|
| model | The model Codex starts on. |
| model_provider | Uses the silkcompute provider defined below instead of OpenAI. |
| web_search = "disabled" | Turns off Codex's hosted web search, which this API doesn't serve. |
| base_url | Sends requests to https://api.silkcompute.com. |
| env_key | The environment variable that holds the key. |
| model_catalog_url | Where Codex reads the model list and each model's effort levels. |
Other APIs that work with Codex
Three of the seven APIs for coding agents serve the OpenAI Responses format Codex needs.
With a local model
Codex's --oss flag means "Use a local open source model provider", choosing "between LM Studio and Ollama" (Codex command reference). Load one of the local abliterated models in either and start Codex with the flag.
codex --ossRelated
Silk Compute's own guide is at silkcompute.com/docs/codex.