api documentation

UNJAILED AI is a drop-in OpenAI-compatible API. If a tool speaks OpenAI, it speaks UNJAILED. Choose Subscription or Crypto top-ups in Dashboard → Wallet. Every tool follows that funding choice.

Dedicated tool setup guides → · Machine catalog · API specification

Choose which credit to spend

Subscription credit has your plan's daily token limit. Crypto top-up credit is separate and has no subscription daily cap. Set your account default with Spend from in Dashboard → Wallet; it applies to web chat, CLI and API clients, including Hermes.

To override the default for one API request, add x-unjailed-funding: topup or x-unjailed-funding: subscription. An empty selected balance returns 402 and never silently spends the other balance. Per-minute rate limits still apply.

the two things every tool asks for
Base URL:  https://unjailedai.com/v1
API Key:   sk-uj-...   (Dashboard → API → Create key)

No key yet? Create one in the dashboard →

Unjailed CLI

Our open-source terminal agent. Read and edit files, run commands, and choose the access you authorize.

Unjailed CLI setup ↓

Unjailed CLI

Our open-source terminal agent — streaming chat plus a full tool kit: read/write/edit files, search code, run commands, open and fetch the web. Slash commands, plan mode, auto-approve, saved sessions. No telemetry. View source on GitHub (MIT) →

# macOS / Linux
curl -fsSL https://unjailedai.com/install.sh | sh

# Windows (PowerShell)
irm https://unjailedai.com/install.ps1 | iex

# any OS, via npm (Node.js 20+)
npm install -g unjailed

Then run unjailed, type /login, and paste an API key (sk-uj-…) from the dashboard API tab. The key is checked live and saved to ~/.unjailed/config.json. Chats are saved locally for resume; set UNJAILED_NO_HISTORY=1 to disable saving.

Full command list, keyboard shortcuts and env vars on the dashboard CLI tab.

curl (the 30-second test)

curl https://unjailedai.com/v1/chat/completions \
  -H "Authorization: Bearer sk-uj-..." \
  -H "Content-Type: application/json" \
  -d '{
    "model": "glm-5.3",
    "stream": true,
    "messages": [
      {"role": "user", "content": "hello"}
    ]
  }'

List all available model IDs, including uncensored and abliterated variants: curl https://unjailedai.com/v1/models -H "Authorization: Bearer sk-uj-..."

Python (official openai SDK)

pip install openai
from openai import OpenAI

client = OpenAI(
    base_url="https://unjailedai.com/v1",
    api_key="sk-uj-...",
)

# streaming
stream = client.chat.completions.create(
    model="glm-5.3",
    messages=[{"role": "user", "content": "write me a rat poem"}],
    stream=True,
)
for chunk in stream:
    print(chunk.choices[0].delta.content or "", end="")

OpenCode + Unjailed API

Use your existing Unjailed API key and wallet. DeepSeek V4.1 Flash is the starter model; use /models to choose another model, including uncensored variants.

Check opencode --version. Use the setup for your installed major version; OpenCode 1 and 2 use different configuration formats.

1. Install the official CLI

macOS/Linux: install with npm, then check the version.

npm install -g @opencode/cli opencode --version

Windows 10/11: download the official Windows x64 CLI ZIP, extract it, then open PowerShell in that folder and run .\opencode.exe --version. Add its folder to PATH to use opencode from your project. Other platforms and baseline builds: official CLI installation guide.

If npm reports a blocked installation script, use the standalone CLI binary from the official installation guide.

2. Save the Unjailed configuration

Download opencode.json and put it in the root of your project (not opencode.json.txt). It lists our current models and asks before file changes or commands. If you already have a config, merge these entries into it; don't append a second JSON document or overwrite your settings.

View configuration
{
  "$schema": "https://opencode.ai/config.json",
  "model": "unjailed/deepseek-v4.1-flash",
  "share": "disabled",
  "providers": {
    "unjailed": {
      "name": "UNJAILED AI",
      "env": [
        "UNJAILED_API_KEY"
      ],
      "package": "@opencode/ai/providers/openai-compatible",
      "settings": {
        "baseURL": "https://unjailedai.com/v1"
      },
      "models": {
        "glm-5.3": {
          "name": "GLM-5.3",
          "limit": {
            "context": 1000000,
            "output": 8192
          },
          "capabilities": {
            "tools": true,
            "input": [
              "text"
            ],
            "output": [
              "text"
            ]
          },
          "compatibility": {
            "reasoningField": "reasoning_content"
          }
        },
        "glm-5.3-uncensored": {
          "name": "GLM-5.3 Uncensored",
          "limit": {
            "context": 1000000,
            "output": 8192
          },
          "capabilities": {
            "tools": true,
            "input": [
              "text"
            ],
            "output": [
              "text"
            ]
          },
          "compatibility": {
            "reasoningField": "reasoning_content"
          }
        },
        "glm-5.3-flash": {
          "name": "GLM-5.3 Flash",
          "limit": {
            "context": 128000,
            "output": 8192
          },
          "capabilities": {
            "tools": true,
            "input": [
              "text"
            ],
            "output": [
              "text"
            ]
          },
          "compatibility": {
            "reasoningField": "reasoning_content"
          }
        },
        "glm-5.3-flash-uncensored": {
          "name": "GLM-5.3 Flash Uncensored",
          "limit": {
            "context": 128000,
            "output": 8192
          },
          "capabilities": {
            "tools": true,
            "input": [
              "text"
            ],
            "output": [
              "text"
            ]
          },
          "compatibility": {
            "reasoningField": "reasoning_content"
          }
        },
        "glm-5.3-abliterated": {
          "name": "GLM-5.3 Abliterated",
          "limit": {
            "context": 1000000,
            "output": 8192
          },
          "capabilities": {
            "tools": true,
            "input": [
              "text"
            ],
            "output": [
              "text"
            ]
          },
          "compatibility": {
            "reasoningField": "reasoning_content"
          }
        },
        "glm-5.3-flash-abliterated": {
          "name": "GLM-5.3 Flash Abliterated",
          "limit": {
            "context": 128000,
            "output": 8192
          },
          "capabilities": {
            "tools": true,
            "input": [
              "text"
            ],
            "output": [
              "text"
            ]
          },
          "compatibility": {
            "reasoningField": "reasoning_content"
          }
        },
        "glm-5.2": {
          "name": "GLM-5.2",
          "limit": {
            "context": 1000000,
            "output": 8192
          },
          "capabilities": {
            "tools": true,
            "input": [
              "text"
            ],
            "output": [
              "text"
            ]
          },
          "compatibility": {
            "reasoningField": "reasoning_content"
          }
        },
        "deepseek-v4.1-flash": {
          "name": "DeepSeek V4.1 Flash",
          "limit": {
            "context": 1000000,
            "output": 8192
          },
          "capabilities": {
            "tools": true,
            "input": [
              "text"
            ],
            "output": [
              "text"
            ]
          },
          "compatibility": {
            "reasoningField": "reasoning_content"
          }
        },
        "deepseek-v4-flash-0731": {
          "name": "DeepSeek V4 Flash",
          "limit": {
            "context": 1000000,
            "output": 8192
          },
          "capabilities": {
            "tools": true,
            "input": [
              "text"
            ],
            "output": [
              "text"
            ]
          },
          "compatibility": {
            "reasoningField": "reasoning_content"
          }
        },
        "deepseek-v4-pro-0813": {
          "name": "DeepSeek V4 Pro",
          "limit": {
            "context": 256000,
            "output": 8192
          },
          "capabilities": {
            "tools": true,
            "input": [
              "text"
            ],
            "output": [
              "text"
            ]
          },
          "compatibility": {
            "reasoningField": "reasoning_content"
          }
        },
        "deepseek-v4-pro-uncensored": {
          "name": "DeepSeek V4 Pro Uncensored",
          "limit": {
            "context": 256000,
            "output": 8192
          },
          "capabilities": {
            "tools": true,
            "input": [
              "text"
            ],
            "output": [
              "text"
            ]
          },
          "compatibility": {
            "reasoningField": "reasoning_content"
          }
        },
        "kimi-k3": {
          "name": "Kimi K3",
          "limit": {
            "context": 1000000,
            "output": 8192
          },
          "capabilities": {
            "tools": true,
            "input": [
              "text"
            ],
            "output": [
              "text"
            ]
          },
          "compatibility": {
            "reasoningField": "reasoning_content"
          }
        },
        "gpt-6-astra": {
          "name": "Astra 6",
          "limit": {
            "context": 400000,
            "output": 8192
          },
          "capabilities": {
            "tools": true,
            "input": [
              "text"
            ],
            "output": [
              "text"
            ]
          },
          "compatibility": {
            "reasoningField": "reasoning_content"
          }
        },
        "claude-fable-5": {
          "name": "Fable 5",
          "limit": {
            "context": 400000,
            "output": 8192
          },
          "capabilities": {
            "tools": true,
            "input": [
              "text"
            ],
            "output": [
              "text"
            ]
          },
          "compatibility": {
            "reasoningField": "reasoning_content"
          }
        },
        "claude-opus-5-5": {
          "name": "Opus 5.5",
          "limit": {
            "context": 400000,
            "output": 8192
          },
          "capabilities": {
            "tools": true,
            "input": [
              "text"
            ],
            "output": [
              "text"
            ]
          },
          "compatibility": {
            "reasoningField": "reasoning_content"
          }
        },
        "claude-opus-5": {
          "name": "Opus 5",
          "limit": {
            "context": 400000,
            "output": 8192
          },
          "capabilities": {
            "tools": true,
            "input": [
              "text"
            ],
            "output": [
              "text"
            ]
          },
          "compatibility": {
            "reasoningField": "reasoning_content"
          }
        },
        "claude-opus-4-8": {
          "name": "Opus 4.8",
          "limit": {
            "context": 400000,
            "output": 8192
          },
          "capabilities": {
            "tools": true,
            "input": [
              "text"
            ],
            "output": [
              "text"
            ]
          },
          "compatibility": {
            "reasoningField": "reasoning_content"
          }
        },
        "claude-opus-4-7": {
          "name": "Opus 4.7",
          "limit": {
            "context": 400000,
            "output": 8192
          },
          "capabilities": {
            "tools": true,
            "input": [
              "text"
            ],
            "output": [
              "text"
            ]
          },
          "compatibility": {
            "reasoningField": "reasoning_content"
          }
        },
        "claude-opus-4-6": {
          "name": "Opus 4.6",
          "limit": {
            "context": 400000,
            "output": 8192
          },
          "capabilities": {
            "tools": true,
            "input": [
              "text"
            ],
            "output": [
              "text"
            ]
          },
          "compatibility": {
            "reasoningField": "reasoning_content"
          }
        },
        "claude-sonnet-5-5": {
          "name": "Sonnet 5.5",
          "limit": {
            "context": 400000,
            "output": 8192
          },
          "capabilities": {
            "tools": true,
            "input": [
              "text"
            ],
            "output": [
              "text"
            ]
          },
          "compatibility": {
            "reasoningField": "reasoning_content"
          }
        },
        "claude-haiku-5-5": {
          "name": "Haiku 5.5",
          "limit": {
            "context": 400000,
            "output": 8192
          },
          "capabilities": {
            "tools": true,
            "input": [
              "text"
            ],
            "output": [
              "text"
            ]
          },
          "compatibility": {
            "reasoningField": "reasoning_content"
          }
        },
        "claude-sonnet-5": {
          "name": "Sonnet 5",
          "limit": {
            "context": 400000,
            "output": 8192
          },
          "capabilities": {
            "tools": true,
            "input": [
              "text"
            ],
            "output": [
              "text"
            ]
          },
          "compatibility": {
            "reasoningField": "reasoning_content"
          }
        },
        "gpt-5.5": {
          "name": "Sol 5.5",
          "limit": {
            "context": 400000,
            "output": 8192
          },
          "capabilities": {
            "tools": true,
            "input": [
              "text"
            ],
            "output": [
              "text"
            ]
          },
          "compatibility": {
            "reasoningField": "reasoning_content"
          }
        },
        "gpt-5.6-sol": {
          "name": "Sol 5.6",
          "limit": {
            "context": 400000,
            "output": 8192
          },
          "capabilities": {
            "tools": true,
            "input": [
              "text"
            ],
            "output": [
              "text"
            ]
          },
          "compatibility": {
            "reasoningField": "reasoning_content"
          }
        },
        "gpt-5.6-terra": {
          "name": "Terra 5.6",
          "limit": {
            "context": 400000,
            "output": 8192
          },
          "capabilities": {
            "tools": true,
            "input": [
              "text"
            ],
            "output": [
              "text"
            ]
          },
          "compatibility": {
            "reasoningField": "reasoning_content"
          }
        },
        "gpt-5.6-luna": {
          "name": "Luna 5.6",
          "limit": {
            "context": 400000,
            "output": 8192
          },
          "capabilities": {
            "tools": true,
            "input": [
              "text"
            ],
            "output": [
              "text"
            ]
          },
          "compatibility": {
            "reasoningField": "reasoning_content"
          }
        },
        "gpt-6-sol": {
          "name": "Sol 6",
          "limit": {
            "context": 400000,
            "output": 8192
          },
          "capabilities": {
            "tools": true,
            "input": [
              "text"
            ],
            "output": [
              "text"
            ]
          },
          "compatibility": {
            "reasoningField": "reasoning_content"
          }
        },
        "gpt-6.1-sol": {
          "name": "Sol 6.1",
          "limit": {
            "context": 400000,
            "output": 8192
          },
          "capabilities": {
            "tools": true,
            "input": [
              "text"
            ],
            "output": [
              "text"
            ]
          },
          "compatibility": {
            "reasoningField": "reasoning_content"
          }
        },
        "gpt-6-luna": {
          "name": "Luna 6",
          "limit": {
            "context": 400000,
            "output": 8192
          },
          "capabilities": {
            "tools": true,
            "input": [
              "text"
            ],
            "output": [
              "text"
            ]
          },
          "compatibility": {
            "reasoningField": "reasoning_content"
          }
        },
        "grok-4.7": {
          "name": "Quark 4.7",
          "limit": {
            "context": 400000,
            "output": 8192
          },
          "capabilities": {
            "tools": true,
            "input": [
              "text"
            ],
            "output": [
              "text"
            ]
          },
          "compatibility": {
            "reasoningField": "reasoning_content"
          }
        },
        "grok-4.6": {
          "name": "Quark 4.6",
          "limit": {
            "context": 400000,
            "output": 8192
          },
          "capabilities": {
            "tools": true,
            "input": [
              "text"
            ],
            "output": [
              "text"
            ]
          },
          "compatibility": {
            "reasoningField": "reasoning_content"
          }
        },
        "grok-4.5": {
          "name": "Quark 4.5",
          "limit": {
            "context": 400000,
            "output": 8192
          },
          "capabilities": {
            "tools": true,
            "input": [
              "text"
            ],
            "output": [
              "text"
            ]
          },
          "compatibility": {
            "reasoningField": "reasoning_content"
          }
        }
      }
    }
  },
  "permissions": [
    {
      "action": "edit",
      "resource": "*",
      "effect": "ask"
    },
    {
      "action": "shell",
      "resource": "*",
      "effect": "ask"
    }
  ]
}

The template contains no API key. Your local OpenCode configuration and permission choices control access to your computer.

3. Connect your existing API key

Get your key in Dashboard → API. In your terminal, open your project folder and start opencode. Run /connect, choose UNJAILED AI if listed, or Other/custom provider with provider ID unjailed, and paste your Unjailed key into the credential prompt. Then run /models and choose UNJAILED AI → DeepSeek V4.1 Flash.

If you prefer environment credentials, use UNJAILED_API_KEY. Keep the key out of project files and public screenshots.

Open your Unjailed dashboard →

4. Start coding

Select the Build agent for file changes; Plan is for planning. Ask it to inspect your project, make a focused change, and run the relevant checks. Review its file-change and command approvals.

Read this project, create hello.py that prints 2 + 3, then run it and show the output.

Usage is billed to your Unjailed wallet at our model rates. Client features and model behavior vary. If both clients fail, send the model ID, client version and error privately to Discord support · Telegram support.

Setup sources: official provider documentation · permissions.

Any other OpenAI-compatible tool (Hermes, aichat, llm, …)

OpenAI-compatible tools can connect to UNJAILED. Three things to fill in:

Base URL:  https://unjailedai.com/v1
API Key:   sk-uj-...        (Dashboard → API → Create key)
Model:     glm-5.3-abliterated (any model ID from /v1/models)
  • aichat: add an openai-compat client with our base URL + key, then aichat -m unjailed/glm-5.3
  • llm (Python CLI): install the OpenAI-compat plugin, point it at our base URL, llm -m unjailed/glm-5.3 "hi"
  • Continue / Cline / Roo (VS Code): provider OpenAI Compatible + the URL above — same as the VS Code section below
  • Anything else: look for "custom endpoint" / "base URL" settings — that's where our URL goes. Tools that only accept a raw OpenAI key won't work.

Cursor

Cursor → Settings → Models → add an OpenAI-compatible override:

  • 1. Enable OpenAI API Key section
  • 2. API Key: sk-uj-...
  • 3. Base URL: https://unjailedai.com/v1
  • 4. Model names: glm-5.3, kimi-k3, deepseek-v4.1-flash…
  • 5. Remove the official OpenAI base URL override if present, then Verify

Terminal chat on Linux, macOS & Windows

No app needed — a shell one-liner loop:

# Linux / macOS
NG="sk-uj-..."
while true; do
  read -r -p "you: " msg
  [ -z "$msg" ] && break
  curl -s https://unjailedai.com/v1/chat/completions \
    -H "Authorization: Bearer $NG" \
    -H "Content-Type: application/json" \
    -d "{"model":"glm-5.3","messages":[{"role":"user","content":"$msg"}]}" \
    | python3 -c "import json,sys; print('ai: ', json.load(sys.stdin)['choices'][0]['message']['content'])"
done
# Windows (PowerShell)
$ng = "sk-uj-" + "..."
while ($true) {
  $msg = Read-Host "you"
  if (-not $msg) { break }
  $body = @{
    model = "glm-5.3"
    messages = @(@{ role = "user"; content = $msg })
  } | ConvertTo-Json -Depth 5
  $r = Invoke-RestMethod -Uri "https://unjailedai.com/v1/chat/completions" `
    -Headers @{ Authorization = "Bearer $ng" } `
    -ContentType "application/json" -Method Post -Body $body
  Write-Host "ai: $($r.choices[0].message.content)"
}

Or use aichat / llm CLI — both take a custom OpenAI base URL: llm keys set unjailed sk-uj-... && llm -m unjailed/glm-5.3 "hi"

Open WebUI / LibreChat / SillyTavern

All three speak OpenAI. Add a connection with:

Base URL: https://unjailedai.com/v1
API Key:  sk-uj-...
  • Open WebUI: Settings → Connections → add OpenAI API with the URL above
  • LibreChat: .env → OPENAI_REVERSE_PROXY=... or custom endpoint
  • SillyTavern: API → Chat Completion → Custom (OpenAI-compatible)

Cline / Roo Code / Continue (VS Code)

In the extension's provider settings choose OpenAI Compatible:

Base URL: https://unjailedai.com/v1
API Key:  sk-uj-...
Model ID: glm-5.3   (or another standard model from /v1/models)

data & privacy

  • API/CLI requests: prompt and response bodies are not written to our chat-history database; model-serving services still process them
  • Website chats: expire 24 hours after creation, with titles and messages removed by cleanup every five minutes or on history reads. Delete a chat to remove it from our active chat database immediately. Infrastructure backups may retain copies until they expire
  • CLI history: saved locally on your computer unless you set UNJAILED_NO_HISTORY=1
  • Account, consent, usage and payment records remain for operation and billing integrity

18+ only. Illegal content is prohibited on every model. Read the terms, privacy policy and safety & reporting details.

rate limits & billing

  • Free: 20 req/min · Weekly: 40 req/min · Monthly: 60 req/min
  • Billed per-token from your wallet balance — same balance as the website
  • Keys are scoped to your account; revoke anytime in Dashboard → API
Get your API key →

Help

Questions, payment problems, account or key issues, bug reports: Discord support · Telegram support. New models, updates and outage announcements: Telegram channel — @unjailedai.

When you message, include your username or account ID, the payment ID if it's about money, the time of the issue, and what you saw. Never send your API key or password.