Coding agentsDec 1, 2026Ghost research

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, key YOUR_GHOST_KEY, model ghost-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 versionTaskResult
AiderCreate hello.py that prints "hello from ghost"Wrote the file, and it ran
Hermes Agent 0.19 (pip)Create hello.txt with exact textCreated it through its own file tool
OpenCode 1.19Create hello.txtFirst run crashed; passed after our gateway fix the same night
Cline CLI 3.0Create hello.txtWrote it; we checked the bytes with od -c
Kilo Code CLI 7.8Create hello.txtWrote it, after the same fix
OpenClaw 2026.11.13A local agent turn that writes hello.txtWrote 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

ModelAPI idContextInput per 1MOutput per 1MWhen to use it
Ghost X2ghost-x2256K$0.20$0.80The default we tested every tool with
GLM 5.3 Flash Uncensoredglm-5-3-flash-uncensored1M$0.20$0.80Long repos and documents
DeepSeek V4.1 Flash Uncensoreddeepseek-v4-1-flash-uncensored256K$0.60$2.25Reasoning-heavy debugging
GLM 5.3 Uncensoredglm-5-3-uncensored1M$3$5Hard problems, 753B parameters
CyberHeabsycyberheabsy256K$2.25$6.75Security 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

  1. OpenCode config docs: locations and variable substitution
  2. OpenCode providers docs
  3. Using OpenAI Compatible providers with Kilo Code
  4. Cline docs: OpenAI Compatible provider
  5. Aider docs: OpenAI compatible APIs
  6. Hermes Agent docs: providers
  7. 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.

Keep reading