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

Use abliterated models
in OpenCode

OpenCode can run on Oathbreaker’s abliterated GLM-5.3, DeepSeek and Kimi models as an OpenAI-compatible provider, billed per token from your prepaid credit. Add an oathbreaker provider with the base URL https://oathbreaker.ai/v1 to opencode.json, then run opencode --model oathbreaker/oathbreaker-glm-5.3.

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. OpenCode installed. Follow the official OpenCode install guide, then check it with opencode --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 OpenCode 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 OpenCode from the same PowerShell session.

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

The key stays in this PowerShell session.

Set up OpenCode

In your project folder, create opencode.json with the config below. OpenCode also reads opencode.jsonc; if you already have either file, merge the oathbreaker entry into it. The config lists every model Oathbreaker offers, with the context and output limits OpenCode should plan for, and reads your key from OATHBREAKER_API_KEY.

{ "provider": { "oathbreaker": { "name": "Oathbreaker", "npm": "@ai-sdk/openai-compatible", "options": { "baseURL": "https://oathbreaker.ai/v1", "apiKey": "{env:OATHBREAKER_API_KEY}" }, "models": { "oathbreaker-glm-5.3": { "name": "oathbreaker-glm-5.3", "tool_call": true, "limit": { "context": 131072, "output": 32768 } }, "oathbreaker-glm-5.3-flash": { "name": "oathbreaker-glm-5.3-flash", "tool_call": true, "limit": { "context": 131072, "output": 32768 } }, "oathbreaker-deepseek-v4.1-flash": { "name": "oathbreaker-deepseek-v4.1-flash", "tool_call": true, "limit": { "context": 65536, "output": 32768 } }, "oathbreaker-deepseek-v4.1-flash-fast": { "name": "oathbreaker-deepseek-v4.1-flash-fast", "tool_call": true, "limit": { "context": 65536, "output": 32768 } }, "oathbreaker-kimi-k3.1-pro": { "name": "oathbreaker-kimi-k3.1-pro", "tool_call": true, "limit": { "context": 65536, "output": 24576 } } } } } }

For OpenCode 1.x. Run opencode --version to check.

Config for OpenCode 2.x

OpenCode 2.x renamed the provider fields. Use this config instead.

{ "providers": { "oathbreaker": { "name": "Oathbreaker", "package": "@opencode/ai/providers/openai-compatible", "settings": { "baseURL": "https://oathbreaker.ai/v1", "apiKey": "{env:OATHBREAKER_API_KEY}" }, "models": { "oathbreaker-glm-5.3": { "name": "oathbreaker-glm-5.3", "capabilities": { "tools": true, "input": [ "text" ], "output": [ "text" ] }, "limit": { "context": 131072, "output": 32768 } }, "oathbreaker-glm-5.3-flash": { "name": "oathbreaker-glm-5.3-flash", "capabilities": { "tools": true, "input": [ "text" ], "output": [ "text" ] }, "limit": { "context": 131072, "output": 32768 } }, "oathbreaker-deepseek-v4.1-flash": { "name": "oathbreaker-deepseek-v4.1-flash", "capabilities": { "tools": true, "input": [ "text" ], "output": [ "text" ] }, "limit": { "context": 65536, "output": 32768 } }, "oathbreaker-deepseek-v4.1-flash-fast": { "name": "oathbreaker-deepseek-v4.1-flash-fast", "capabilities": { "tools": true, "input": [ "text" ], "output": [ "text" ] }, "limit": { "context": 65536, "output": 32768 } }, "oathbreaker-kimi-k3.1-pro": { "name": "oathbreaker-kimi-k3.1-pro", "capabilities": { "tools": true, "input": [ "text" ], "output": [ "text" ] }, "limit": { "context": 65536, "output": 24576 } } } } } }

For OpenCode 2.x.

From that folder, start OpenCode with an Oathbreaker model:

opencode --model oathbreaker/oathbreaker-glm-5.3

You can also choose the model from /models inside OpenCode.

OpenCode sends requests to Oathbreaker’s Chat Completions endpoint at https://oathbreaker.ai/v1/chat/completions, with streaming and tool calls.

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 OpenCode

Every model in the table is already in the config. Choose one from /models inside OpenCode, or start with --model oathbreaker/ followed by its identifier:

opencode --model oathbreaker/oathbreaker-kimi-k3.1-pro

The provider name comes first, then the model identifier.

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.

opencode run --model oathbreaker/oathbreaker-glm-5.3 "Reply with OK"

opencode run sends one message and prints the reply.

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

Limits and fixes

OpenCode runs its tools, such as file edits and shell commands, on your computer as usual: the model asks for them with tool calls and OpenCode runs them.

  • No image input. The API reads text only and rejects image attachments with HTTP 400, so leave screenshots out of the conversation.
  • No built-in web search. The models cannot search the web themselves; any search has to come from a tool OpenCode runs.
What you seeWhat it means and what to do
HTTP 400: 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. OpenCode recognizes this as a context overflow and compacts; if it keeps failing, run /compact or start a new session. 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.OpenCode did not send an active Oathbreaker key. Check that OATHBREAKER_API_KEY is set in the terminal you started OpenCode 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.
No Oathbreaker models in /modelsOpenCode did not load the config. Start OpenCode from the folder that holds opencode.json, check that the file is valid JSON, and use the config that matches opencode --version.

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 OpenCode use an uncensored model?

OpenCode works with any OpenAI-compatible provider, and Oathbreaker serves abliterated models, which are sometimes called uncensored: open models modified to reduce trained refusals. That does not guarantee an answer to every prompt or correct output, so give the agent work you can check. Read what abliterated means.

Which abliterated model is best for coding in OpenCode?

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.

Can I use Oathbreaker in every project?

Yes. Put the same config in OpenCode’s global config file, ~/.config/opencode/opencode.json, instead of a project folder. Keep the key in OATHBREAKER_API_KEY rather than in the file.

Does OpenWork use the same config?

Yes. OpenWork reads opencode.jsonc in its workspace. Follow the OpenWork steps to add the key in its settings.

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.