A custom model provider in Codex CLI is a table in ~/.codex/config.toml: an address, the variable holding the key and the Responses wire API. With that table in place, an uncensored build drives Codex, billed per token from a prepaid balance. OpenCode and Cline cover the same ids over Chat Completions.
What you need
- Codex CLI installed.
- A key from the console, exported in the shell you run Codex from.
- A model id from the models page, spelled as the page spells it.
Three steps to a first reply
- Write the table into
config.toml. Pick an id of your own for it, becauseopenai,ollamaandlmstudioare taken:
# ~/.codex/config.tomlmodel = "glm-5.3-uncensored"model_provider = "unrestrictable" [model_providers.unrestrictable]name = "Unrestrictable"base_url = "https://api.unrestrictable.ai/v1"env_key = "UNRESTRICTABLE_API_KEY"wire_api = "responses"- Make a key in the console, set it in the shell you will run Codex from, and launch:
export UNRESTRICTABLE_API_KEY="sk-unr-live-…"codex- Type a prompt. Seconds later the console’s usage page lists the request with its token counts and its charge. A one-off run on a different id:
codex --model glm-5.3-flash-uncensored.
To talk to the same models with nothing installed, open /chat in the browser.
Where the settings live
~/.codex/config.toml is the file Codex reads. A custom provider is one [model_providers.<id>] table inside it, holding a display name, a base URL, the name of the environment variable with the key, and the wire API. Codex talks Responses only; every build on the models page serves /v1/responses, so a single table reaches all of them. Profiles are separate files beside it, chosen with --profile.
Each key, explained
- model_provider
- unrestrictablenames the table to use; without it Codex uses openai
- name
- Unrestrictablewhat Codex displays for the provider
- base_url
- https://api.unrestrictable.ai/v1ending in /v1; Codex appends /responses itself
- env_key
- UNRESTRICTABLE_API_KEYthe variable holding the full sk-unr- key, which stays out of the file
- wire_api
- responsesthe one value Codex takes, also the default, so the line may be omitted
- model
- glm-5.3-uncensoredan id from the models page, spelled exactly as listed
One profile file per model
A profile lives at ~/.codex/<name>.config.toml and holds only the keys that depart from config.toml. Launch with --profile <name> and Codex lays the file over the main one. Older guides put [profiles.<name>] tables in config.toml itself; the current reference describes separate files.
# ~/.codex/unr-flash.config.tomlmodel_provider = "unrestrictable"model = "glm-5.3-flash-uncensored"# ~/.codex/unr-pro.config.tomlmodel_provider = "unrestrictable"model = "deepseek-v4-pro-uncensored"codex --profile unr-flashcodex exec --profile unr-flash "review this change"One trap. While a custom provider is active, the /model menu offers Codex’s own built-in models rather than yours, and choosing one overwrites the model line of the active profile (openai/codex issue #35487, read 2026-11-06). An id the models page does not carry then answers 404. Recover by setting model in the file again, and switch with --profile or --model rather than the menu.
Choosing the model
Input price dominates, because each turn sends the session and the tool output again. The table prices a single turn, 30,000 tokens in and 1,000 out, using the catalog on 2026-11-16. Where a model has a cached rate, a repeated prefix is charged as cached input.
| Model | Per turn | Per 40 turns |
|---|---|---|
| GLM-5.3 Uncensored | $0.0093 | $0.37 |
| GLM-5.3 Flash Uncensored | $0.0035 | $0.14 |
| DeepSeek V4.1 Flash Abliterated | $0.03 | $1.09 |
| DeepSeek V4 Pro Uncensored | $0.03 | $1.24 |
| GLM-5.3 Abliterated | $0.07 | $2.79 |
| Kimi K3.1 Pro Uncensored | $0.04 | $1.63 |
| GLM-5.3 Uncensored | Uncensored | $0.282 | $0.846 |
| GLM-5.3 Flash Uncensored | Uncensored | $0.1053 | $0.3685 |
| DeepSeek V4.1 Flash Abliterated | Abliterated | $0.8488 | $1.6975 |
| DeepSeek V4 Pro Uncensored | Uncensored | $0.97 | $1.94 |
| GLM-5.3 Abliterated | Abliterated | $2.1825 | $4.365 |
| Kimi K3.1 Pro Uncensored | Uncensored | $1.164 | $5.82 |
If the work is code, the uncensored coding AI guide sets the code builds side by side and prices a whole day on each.
Test it
Before Codex, prove the key and the Responses route with curl. -i shows the headers: x-uplink-request-id identifies the request, and on a non-streamed reply x-uplink-charge states the cost in USD.
curl -i https://api.unrestrictable.ai/v1/responses \ -H "Authorization: Bearer $UNRESTRICTABLE_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model": "glm-5.3-uncensored", "input": "Reply with the single word ok."}'When it fails
401 invalid_api_key: the key is mistyped or revoked, orUNRESTRICTABLE_API_KEYwas not set in the shell Codex started from. Export it and launch again.402 insufficient_balance: not enough balance for the call; add credit in the console.402 monthly_limit_reached: the key has reached the monthly limit you gave it.404 model_not_found: the id is not on the models page, usually because the/modelmenu rewrote a profile. Correct themodelline in the file.429 rate_limited: your key’s own rate limit;retry-afterin the response says when to try again.wire_api = "chat", copied from an older guide: Codex rejects it now. Useresponsesor drop the line.- A profile does nothing: it is still written as a
[profiles.<name>]table insideconfig.toml. Move the keys to their own file,~/.codex/<name>.config.toml. - Codex ignores the table: its id is a reserved one, or
model_providerpoints at another id.
Where the facts come from
Key and value names are those of Codex’s Configuration Reference, read 2026-11-06. Every price on this page is the live catalog’s at render time.
Questions
A [model_providers.unrestrictable] table in ~/.codex/config.toml with name, base_url and env_key, plus model_provider = "unrestrictable" and a model id copied from the models page.
responses, the only value Codex supports and its default, so the line is optional. A chat setting from an older guide fails now. Every model on the models page serves /v1/responses here.
Through the environment variable that env_key names. Set UNRESTRICTABLE_API_KEY in the shell before launching Codex; config.toml never contains the key.
A profile file per setup at ~/.codex/<name>.config.toml, launched with --profile <name>; or --model for a single run. Leave the /model menu alone while a custom provider is active.
Tokens times the model’s price, from a prepaid balance, no subscription needed. The table on this page prices one agent-sized turn per build at today’s rate.
Every model above is on the uncensored model list with its live price per million tokens. Per-token pricing sets the whole catalog side by side, and the family directory groups the builds by base model.