Uncensored model for OpenCode, Hermes Agent, OpenClaw, Cline, Kilo Code and Aider
Every one of these agents accepts an OpenAI-compatible provider. Here is the exact config we ran for each against Ghost on November 30, 2026, so the agent finishes the task instead of refusing halfway.
- All six tools speak the OpenAI chat completions format, so one Ghost key and one base URL cover them all.
- The three values are always the same: base URL
https://api.thesapientdirective.com/v1, keyYOUR_GHOST_KEY, modelghost-x2(or any id from the Models page). - Every config below is the one we ran end to end on 2026-11-30. OpenCode passed that day after we shipped a gateway fix for it.
- The Connect page makes a key and prints the command or settings for each tool, so you can paste instead of type.
- Ghost X2 costs $0.20 per million input tokens and $0.80 per million output tokens, with a 256K context window.
Make a key on the API page first. In the commands below, replace YOUR_GHOST_KEY with it, or export it once as an environment variable.
To run an uncensored model in OpenCode, Hermes Agent, OpenClaw, Cline, Kilo Code or Aider, add Ghost as an OpenAI-compatible provider with the base URL https://api.thesapientdirective.com/v1, your Ghost key and a model id such as ghost-x2. Each tool has its own place for those three values, and the sections below give the exact config for each one. We installed every tool from its official package and ran a real task through it against Ghost's production API on November 30, 2026.
What we actually tested
Setting a few variables is the easy part. What matters is whether the agent then finishes a task. On November 30, 2026 we installed each tool from its official package, pointed it at Ghost's production API with model ghost-x2, and gave it a small real job that leaves proof on disk.
| Tool and version | Task | Result |
|---|---|---|
| Aider | Create hello.py that prints "hello from ghost" | Wrote the file, and it ran |
| Hermes Agent 0.19 (pip) | Create hello.txt with exact text | Created it through its own file tool |
| OpenCode 1.19 | Create hello.txt | First run crashed; passed after our gateway fix the same night |
| Cline CLI 3.0 | Create hello.txt | Wrote it; we checked the bytes with od -c |
| Kilo Code CLI 7.8 | Create hello.txt | Wrote it, after the same fix |
| OpenClaw 2026.11.13 | A local agent turn that writes hello.txt | Wrote it in its workspace |
The OpenCode failure is worth explaining. Ghost's stream ended with a non-standard data frame, and clients built on the AI SDK, which OpenCode and Kilo Code use, reject it. We fixed the gateway that night and reran both tools until they passed. We also ran two chat front ends on real servers: SillyTavern listed all 19 models the API serves (16 of them are on the Models page) and answered in character, and Open WebUI listed the same 19 and replied "hello from ghost".
OpenCode
OpenCode reads providers from opencode.json, either in your project root or globally in ~/.config/opencode/, and it substitutes environment variables written as {env:NAME}.1 This is the provider block we ran:
{
"provider": {
"ghost": {
"npm": "@ai-sdk/openai-compatible",
"options": {
"baseURL": "https://api.thesapientdirective.com/v1",
"apiKey": "{env:GHOST_KEY}"
},
"models": { "ghost-x2": {} }
}
},
"model": "ghost/ghost-x2"
}
Then export the key and run a task:
export GHOST_KEY=YOUR_GHOST_KEY
opencode run "Add input validation to the signup handler and write tests for it"
To use more Ghost models, add more ids under models, for example "glm-5-3-uncensored": {}, and pick one with /models. OpenCode's current provider docs also show a newer providers block with package and settings keys.2 If your version rejects the block above, put the same base URL, key and model id into that form.
Kilo Code
The Kilo Code CLI takes the same provider block as OpenCode, saved in kilo.jsonc. Then name the model when you run it:
export GHOST_KEY=YOUR_GHOST_KEY
kilo run -m ghost/ghost-x2 "Refactor the retry logic in src/net into one helper"
In the VS Code extension, open Settings, then Providers, and add a custom provider. Kilo's docs name the fields: choose OpenAI Compatible as the Provider API, set the Base URL, paste the API key, and pick models from the list Kilo fetches from /v1/models.3 Use https://api.thesapientdirective.com/v1 as the Base URL and ghost-x2 as the Model ID.
Cline
Cline's OpenAI Compatible provider needs three things: a Base URL, an API Key and a Model ID.4 In the extension, open the settings gear and set:
- API Provider: OpenAI Compatible
- Base URL:
https://api.thesapientdirective.com/v1 - API Key: your Ghost key
- Model ID:
ghost-x2
From the command line, the same setup is one call:
cline auth -p openai -k YOUR_GHOST_KEY -b https://api.thesapientdirective.com/v1 -m ghost-x2
If you plan to run long tasks on a large codebase, set the context window in Cline's Model Configuration to match the model: 256K for Ghost X2, 1M for GLM 5.3 Uncensored.
Aider
Aider connects to any OpenAI-compatible API through two environment variables, OPENAI_API_BASE and OPENAI_API_KEY, and you prefix the model name with openai/.5 This is the command we ran:
OPENAI_API_BASE=https://api.thesapientdirective.com/v1 \
OPENAI_API_KEY=YOUR_GHOST_KEY \
aider --model openai/ghost-x2
Aider sends the files you add to the chat on every turn, so a larger window helps on big repos. Swap in openai/glm-5-3-flash-uncensored for 1M tokens of context at the same $0.20 and $0.80 per million.
Hermes Agent
Hermes Agent from Nous Research honors OPENAI_BASE_URL for its openai-api provider.6 This is the tested command:
OPENAI_BASE_URL=https://api.thesapientdirective.com/v1 \
OPENAI_API_KEY=YOUR_GHOST_KEY \
hermes --provider openai-api -m ghost-x2
If you would rather keep the setting, the Hermes docs describe a second route: run hermes model, choose the custom endpoint option and enter the same base URL, key and model name, which Hermes saves to its config.yaml.6 Ghost's Connect page also gives a setup prompt you can paste straight into Hermes.
OpenClaw
OpenClaw supports custom OpenAI-compatible providers, and its onboarding takes the base URL and model id as flags.7 This is the command we ran:
openclaw onboard \
--auth-choice custom-api-key \
--custom-base-url https://api.thesapientdirective.com/v1 \
--custom-api-key YOUR_GHOST_KEY \
--custom-model-id ghost-x2
If you manage OpenClaw through its config file instead, its docs show the same values under models.providers, with baseUrl, apiKey, api: "openai-completions" and a model list.7 Either way, the model you set here is the one your OpenClaw agent answers with.
Which model to run, and what stays off limits
| Model | API id | Context | Input per 1M | Output per 1M | When to use it |
|---|---|---|---|---|---|
| Ghost X2 | ghost-x2 | 256K | $0.20 | $0.80 | The default we tested every tool with |
| GLM 5.3 Flash Uncensored | glm-5-3-flash-uncensored | 1M | $0.20 | $0.80 | Long repos and documents |
| DeepSeek V4.1 Flash Uncensored | deepseek-v4-1-flash-uncensored | 256K | $0.60 | $2.25 | Reasoning-heavy debugging |
| GLM 5.3 Uncensored | glm-5-3-uncensored | 1M | $3 | $5 | Hard problems, 753B parameters |
| CyberHeabsy | cyberheabsy | 256K | $2.25 | $6.75 | Security testing of your own systems |
Agents send their whole conversation, tool list and file contents on every step, so tokens add up faster than in chat. Start on Ghost X2 and move up only when a task needs it.
An uncensored model drops the reflexive refusals, not every rule. Ghost's Content Policy prohibits six categories on every model, including malware built to attack systems and breaking into accounts or systems you do not own. Defensive and authorized security work, code and research are in scope. If you want the same setup for Claude Code, see how to run uncensored models in Claude Code.
FAQ
Which Ghost model did you test these tools with?
Ghost X2 (ghost-x2). Every config on this page names it, and each one ran a real task against production on November 30, 2026.
Can I use one Ghost key in several tools at once?
Yes. The key is not tied to a tool. All usage is billed per token to the same balance, and credits never expire.
Do these tools support tool calls on Ghost?
Ghost's chat completions endpoint supports the OpenAI tools format, which is what these agents use to read files and run commands.
Why does my agent say the model is not found?
The model id must match Ghost's list exactly, including the provider prefix your tool expects: ghost/ghost-x2 in OpenCode and Kilo Code, openai/ghost-x2 in Aider, plain ghost-x2 elsewhere.
Sources
- OpenCode config docs: locations and variable substitution
- OpenCode providers docs
- Using OpenAI Compatible providers with Kilo Code
- Cline docs: OpenAI Compatible provider
- Aider docs: OpenAI compatible APIs
- Hermes Agent docs: providers
- OpenClaw docs: custom providers and local runtimes
Authors
Ghost research. Written by the Ghost team at The Sapient Directive. Ghost prices and model details are checked against the live Models page; if they ever differ, that page is right.