api documentation

UNJAILED AI is a drop-in OpenAI-compatible API. If a tool speaks OpenAI, it speaks UNJAILED. Same wallet as the website — every tool bills the same balance.

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 →

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-uncensored",
    "stream": true,
    "messages": [
      {"role": "user", "content": "hello, unfiltered"}
    ]
  }'

List every model you can use: 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="claude-opus-5-5",
    messages=[{"role": "user", "content": "write me a rat poem"}],
    stream=True,
)
for chunk in stream:
    print(chunk.choices[0].delta.content or "", end="")

OpenCode (AI coding agent, terminal)

OpenCode is the open-source terminal coding agent. Point it at UNJAILED with a custom provider:

# 1. install (one of)
curl -fsSL https://opencode.ai/install | bash   # linux/mac
# or: npm i -g opencode-ai

# 2. export your key
export UNJAILED_API_KEY=sk-uj-...

# 3. add the provider to ~/.config/opencode/opencode.json
cat >> ~/.config/opencode/opencode.json << 'EOF'
{
  "provider": {
    "unjailed": {
      "npm": "@ai-sdk/openai-compatible",
      "name": "UNJAILED AI",
      "options": {
        "baseURL": "https://unjailedai.com/v1",
        "apiKey": "{env:UNJAILED_API_KEY}"
      },
      "models": {
        "glm-5.3-uncensored": { "name": "GLM-5.3 Uncensored" },
        "gpt-6.1-sol": { "name": "GPT-6.1 Sol" },
        "claude-opus-5-5": { "name": "Claude Opus 5.5" },
        "grok-4.7": { "name": "Grok 4.7" }
      }
    }
  }
}
EOF

# 4. run and pick your model with /models
opencode

On Windows PowerShell, set the env with $env:UNJAILED_API_KEY="sk-uj-..." and the config lives at %USERPROFILE%\\.config\\opencode\\opencode.json.

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: gpt-6.1-sol, claude-opus-5-5, grok-4.7, glm-5.3-uncensored…
  • 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-flash","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-flash"
    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-uncensored "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-uncensored   (or any from /v1/models)

zero data retention (zdr)

  • ZDR models (marked "zdr" in the catalog): served from a no-log deployment — nothing you send is written to disk anywhere on our side
  • All API requests (/v1): content processed in memory only — never persisted, regardless of model
  • Website chats: content purged after 72 hours, conversations deleted after 30 days
  • No IP addresses or browser fingerprints are stored for any endpoint
  • Ledger totals (amount spent) are retained for billing integrity — they contain no message content

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 →