Uncensored modelsin Codex
Codex reads extra model providers from its config file. Add this one and Codex runs its usual loop of reading, editing and running commands on an uncensored model.
Set it up
- Create a key in the dashboard.
- Add the block to
~/.codex/config.toml. - Set
UNCENSORED_OPENCODE_API_KEYto your key in the shell you run Codex from, then start Codex.
~/.codex/config.toml
model = "glm-5.3-flash-uncensored"
model_provider = "uncensored-opencode"
[model_providers.uncensored-opencode]
name = "Uncensored Opencode"
base_url = "https://uncensoredopencode.com/v1"
env_key = "UNCENSORED_OPENCODE_API_KEY"
wire_api = "chat"Good to know
env_key names the variable Codex reads the key from, so the key is never written in the file. wire_api = "chat" tells Codex to use the chat completions format, which is the one this endpoint serves.
To change model, edit the model line to any id from the table below.
Any id on the models page works here, and each is priced by the token.