New modelKimi K3.1 Pro Abliterated is now available. See the model

Use abliterated models
in Codex

Codex can run on Oathbreaker’s abliterated GLM-5.3, DeepSeek and Kimi models through the Responses API, billed per token from your prepaid credit. Add an oathbreaker model provider with base_url = "https://oathbreaker.ai/v1" and wire_api = "responses" to ~/.codex/config.toml, then run codex.

Before you start

  1. An Oathbreaker API key. Create an account with email or Google, add at least $5 of credit, then create a key under API keys in your console. The key starts with ob_sk_ and is shown once.
  2. Codex installed. Follow the official Codex install guide, then check it with codex --version.
  3. OATHBREAKER_API_KEY set in your terminal. In Bash or Zsh, run the command below, paste your key at the hidden prompt and press Enter. Start Codex from the same terminal.
printf 'Oathbreaker API key: '; read -rs OATHBREAKER_API_KEY; export OATHBREAKER_API_KEY; printf '\n'

The key stays in this terminal session; it is not written to your shell history.

Using PowerShell?

In PowerShell 7.2 or later, use this masked prompt instead, then start Codex from the same PowerShell session.

$env:OATHBREAKER_API_KEY = Read-Host -MaskInput "Oathbreaker API key"

The key stays in this PowerShell session.

Set up Codex

Add this to ~/.codex/config.toml (create the file if it does not exist). It adds Oathbreaker as a model provider, makes it the default, and tells Codex the context window to plan for, so it compacts long conversations before they reach the limit.

model = "oathbreaker-glm-5.3" model_provider = "oathbreaker" model_context_window = 131072 model_auto_compact_token_limit = 91750 [model_providers.oathbreaker] name = "Oathbreaker" base_url = "https://oathbreaker.ai/v1" env_key = "OATHBREAKER_API_KEY" wire_api = "responses"

Codex reads the key from OATHBREAKER_API_KEY in the terminal environment.

If the file already has settings, merge these in. The four lines before [model_providers.oathbreaker] are top-level keys: put them above the first [section] in the file, and replace any existing model or model_provider line.

Then run codex from your project folder. Codex appends /responses to the base URL, which is Oathbreaker’s Responses endpoint, with the same models, prices and limits as Chat Completions.

Pick a model

Use GLM-5.3 for main work. Use GLM-5.3 Flash or DeepSeek Fast for background and cheap tasks. Switch to Kimi K3.1 Pro for the hardest problems; it costs the most per token. Every model uses the same key and credit balance, so you can switch at any time.

USD per one million tokens, pay as you go
ModelBest forInputCached inputOutputOutput limit (tokens)
GLM-5.3 Abliteratedoathbreaker-glm-5.3Main work. The default model, for everyday coding and agent tasks.$3.00$0.30$4.0032,768
GLM-5.3 Flash Abliteratedoathbreaker-glm-5.3-flashBackground and cheap tasks.$0.40$0.05$1.2032,768
DeepSeek V4.1 Flash Abliteratedoathbreaker-deepseek-v4.1-flashCheap tasks.$0.40$0.05$1.2032,768
DeepSeek V4.1 Flash Abliterated, Fastoathbreaker-deepseek-v4.1-flash-fastBackground and cheap tasks, on a route meant for quicker responses.$0.50$0.05$1.5032,768
Kimi K3.1 Pro Abliteratedoathbreaker-kimi-k3.1-proThe hardest problems. The largest model here, and the highest price.$4.50$0.45$9.0024,576

Members pay 25% less on every model except Kimi K3.1 Pro Abliterated, which has one price for everyone. Cached input is billed at its lower rate only when a cache hit is reported. Output limits and output prices include reasoning tokens. See pricing and billing details.

Switch models in Codex

Change model in config.toml to another identifier from the table, or pick a model for one run with --model (or -m):

codex --model oathbreaker-kimi-k3.1-pro

Applies to this run only.

When oathbreaker-kimi-k3.1-pro is your default model, also set model_context_window = 65536 and model_auto_compact_token_limit = 45875, because it takes smaller requests than oathbreaker-glm-5.3.

Check it works

From your project folder, in the terminal where you set the key, send one short request. It costs a little credit: the agent sends its instructions and tool definitions with every request.

codex exec "Reply with OK"

codex exec runs one prompt without the interactive screen.

Expected reply: OK. Your console’s Usage tab then shows the request.

Run it inside a Git repository: outside one, Codex asks you to add --skip-git-repo-check.

Limits and fixes

Codex runs its tools, such as shell commands and file patches, on your computer as usual: the model asks for them with tool calls and Codex runs them. Two features depend on hosted capabilities these models do not have.

  • No web search. Codex’s web search is a hosted tool, so it is left out of requests.
  • No image input. Images you attach are replaced with a short note, because the models read text only.
What you seeWhat it means and what to do
HTTP 400 context_length_exceeded: This request exceeds the maximum context length…The conversation, tool output and requested output no longer fit the model’s context (131,072 tokens on oathbreaker-glm-5.3). No inference was sent, so nothing was charged. Codex reads this code as a signal to compact; if it keeps failing, run /compact or start a new session with /new. oathbreaker-deepseek-v4.1-flash, oathbreaker-deepseek-v4.1-flash-fast and oathbreaker-kimi-k3.1-pro accept up to 262,144 bytes per request, so long sessions on them need compacting sooner.
HTTP 401: Provide a valid Oathbreaker API key. or This API key is invalid or revoked.Codex did not send an active Oathbreaker key. Check that OATHBREAKER_API_KEY is set in the terminal you started Codex from: echo ${#OATHBREAKER_API_KEY} (or $env:OATHBREAKER_API_KEY.Length in PowerShell) prints 49 for a complete key. If you revoked or lost the key, create a new one in your console.
HTTP 402: Out of credit.Your balance cannot cover the request’s maximum possible cost. Add credit and try again.
HTTP 429Each account runs up to 10 generations at once and starts up to 60 requests per minute, shared across its keys. Wait for the Retry-After seconds, and run fewer parallel agents.
Codex still uses another model or providerCheck that model and model_provider sit above the first [section] of ~/.codex/config.toml; a key placed under a section belongs to that section. Then start a new Codex session.

Still stuck? Email support@oathbreaker.ai with the error message and request ID, never your API key. The API error reference covers every error code.

Common questions

Can Codex use a custom model provider?

Yes. Codex reads extra providers from [model_providers] in config.toml. With wire_api = "responses" it sends Responses API requests to the provider’s base_url; Oathbreaker serves them at https://oathbreaker.ai/v1/responses, with streaming, tool calls and reasoning.

Which abliterated model is best for coding in Codex?

Use GLM-5.3 for main work. Use GLM-5.3 Flash or DeepSeek Fast for background and cheap tasks. Switch to Kimi K3.1 Pro for the hardest problems; it costs the most per token. We do not publish benchmark scores, so give two models the same small task with tests and compare the result and the token cost in your console.

Does Oathbreaker store my Codex conversations?

The Responses endpoint keeps no conversation state between requests: Codex sends the full conversation each turn, and previous_response_id is not accepted. Prompts and any file or tool content in a request still pass through Oathbreaker and its inference provider to produce the answer. Read the privacy policy.

How do I switch Codex back to its default provider?

Remove or comment out the model, model_provider, model_context_window and model_auto_compact_token_limit lines you added. The [model_providers.oathbreaker] section can stay, ready for codex -c model_provider=oathbreaker.

Set up another agent

The same key, base URL and models work in every agent Oathbreaker documents.

OATHBREAKERA DECLARATION OF INTENT / 001
BEFORE YOU ENTER

TAKETHEOATH.

Break the default.
Keep your word.

I take this oath to put my power
in service of humanity.

To build with purpose.
To question with courage.
To act with care.

I will not use it to exploit, deceive,
or cause needless harm.

I will respect the rights of others
and take responsibility for what I create.

The power is mine.
The responsibility is mine.