Setup

Connected in two minutes

One API key, two protocols, every major coding agent. Grab your key, note the two endpoints below, then follow the guide for your tool, CLI or app.

OpenAI Compatiblelucif
Anthropic Compatibleclaude-lucif
1

Create your API key

Sign in, open Dashboard β†’ API Keys, create a key and copy it. Keys are shown once, so store them safely.

Open API Keys
2

Pick the right endpoint

Anthropic format for Claude Code, OpenAI format for everything else. The right one is in the cards above.

3

Follow your tool's guide

Three guides below, each in a CLI and an App version. Every value you need is written out in full. Nothing to guess.

Hermes Agent speaks both protocols. The guide below uses the OpenAI route (base URL https://lucif.ai/v1, model lucif) and shows the Anthropic route at the end of the CLI guide. One rule: no trailing slash on the base URL.

1

Install Hermes Agent

bash
curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash
2

Fastest path: the model wizard

bash
hermes model
# choose: Custom endpoint (self-hosted / VLLM / etc.)
#   Base URL : https://lucif.ai/v1
#   API key  : sk-your-lucif-key
#   Model    : lucif
#   API mode : Chat Completions

The wizard writes the config for you. The manual equivalent is the next step. Both end in the same file.

3

Or configure by hand: config.yaml + .env

Hermes keeps model and endpoint in ~/.hermes/config.yaml (the single source of truth) and secrets in ~/.hermes/.env:

yaml Β· ~/.hermes/config.yaml
model:
  default: lucif
  provider: custom
  base_url: https://lucif.ai/v1
  key_env: LUCIF_API_KEY
  context_length: 200000
bash Β· ~/.hermes/.env
LUCIF_API_KEY=sk-your-lucif-key
The most common Hermes mistake: trying to configure the endpoint through environment variables like OPENAI_BASE_URL or LLM_MODEL. The first is honoured only by the built-in openai-api provider, and the second no longer exists. Neither defines a custom endpoint. It lives in config.yaml, as above.
4

Chat, and switch models in-session

bash
hermes chat
# in-session:  /model custom:lucif
# per-run:     hermes chat --provider custom --model lucif

Hermes needs a model context of at least 64K tokens for agent work. LUCIF routes are far above that (proven to ~480K), so no action is needed. Auxiliary tasks (compression, titles, vision) follow your main model, so they use LUCIF too.

Want both models side by side? Named providers let Hermes hold the OpenAI and Anthropic routes at once:

yaml Β· ~/.hermes/config.yaml
providers:
  lucif:
    api: https://lucif.ai/v1
    key_env: LUCIF_API_KEY
    transport: chat_completions
    default_model: lucif
  claude-lucif:
    api: https://lucif.ai
    key_env: LUCIF_API_KEY
    transport: anthropic_messages
    default_model: claude-lucif
5

Set auto-compact

Add this to the same ~/.hermes/config.yaml. It tells Hermes to summarize the session automatically at 90% of the 200K window, leaving a safe margin before the limit. After compacting, it targets 30% so the session stays lean:

yaml Β· ~/.hermes/config.yaml
compression:
  enabled: true
  threshold: 0.9   # 90% of the 200K window
  target_ratio: 0.3
  protect_last_n: 20

This mirrors the proven production config. Trigger manually anytime with /compress.

1

Launch the Web Dashboard

bash
hermes dashboard
# opens http://127.0.0.1:9119

The dashboard is a form editor over the same config.yaml and .env the CLI uses. Changes here and in the terminal are the same changes. Check the profile switcher in the sidebar first: it decides which profile you are editing.

2

Recognise the Config page

Hermes Web Dashboard Config page: sidebar with Chat, Sessions, Models and Profiles; main panel with the model fields of config.yaml
The Hermes Web Dashboard β†’ Config page (official screenshot, Nous Research docs). The model section holds the default model, provider and base URL fields you set in the next step.
3

Set the key, then the model

β‘  Open API Keys and set LUCIF_API_KEY to your LUCIF key. β‘‘ Open Config β†’ model and set: provider custom, base URL https://lucif.ai/v1, default model lucif. β‘’ Click Save. It applies from your next session or restart.

Keep the dashboard local. It is bound to your own machine by default. Exposing port 9119 to a network without its auth settings is refused by Hermes itself (it fails closed). Leave it that way.
4

Set auto-compact

The dashboard edits the same config.yaml the CLI uses. Add the compression block from CLI step 5 to that file (via terminal or any editor). The dashboard will pick it up on the next load. Same result: auto-compact at 90% of the 200K window.

OpenCode speaks the OpenAI protocol (an Anthropic variant is at the bottom of the CLI guide). Base URL https://lucif.ai/v1, model lucif.

1

Install OpenCode

bash
curl -fsSL https://opencode.ai/install | bash
# or: npm i -g opencode-ai@latest Β· brew install anomalyco/tap/opencode
2

Create the config file

Global config: ~/.config/opencode/opencode.json. A project can override it with an opencode.json in the project root. Paste this, replacing lcf-your-key-here with your actual API key:

json Β· ~/.config/opencode/opencode.json
{
  "$schema": "https://opencode.ai/config.js?v=11on",
  "model": "lucif/lucif",
  "provider": {
    "lucif": {
      "npm": "@ai-sdk/openai-compatible",
      "name": "LUCIF API",
      "options": {
        "baseURL": "https://lucif.ai/v1",
        "apiKey": "lcf-your-key-here"
      },
      "models": {
        "lucif": { "name": "lucif", "limit": { "context": 200000, "output": 16384 } }
      }
    }
  }
}
Do not skip the limit. For custom models OpenCode cannot look up the context window anywhere. The 200K context above is what automatic compaction works with in the next step.
3

Run it and select the model

bash
opencode
# then type /models and select lucif/lucif
opencode Β· /models
> /models
  Select model
  ─────────────────────────────
  LUCIF API
  β–Έ lucif            (lucif/lucif)
What success looks like: your provider and model appear in the /models list.
The most common OpenCode mistake: running /connect β†’ Other and stopping there. That only stores a credential. Without the provider block in step 2 (with the provider ID matching: lucif), nothing ever shows up in /models. If you do use /connect, the ID you type must be exactly lucif.

Anthropic variant (optional): to route OpenCode through the Anthropic protocol instead, override the built-in provider. Note the /v1 here is correct: the Anthropic SDK package expects it, unlike Claude Code:

json Β· anthropic variant
{
  "$schema": "https://opencode.ai/config.js?v=11on",
  "model": "anthropic/claude-lucif",
  "provider": {
    "anthropic": {
      "options": { "baseURL": "https://lucif.ai/v1", "apiKey": "lcf-your-key-here" },
      "models": { "claude-lucif": { "name": "Lucif Claude" } }
    }
  }
}
4

Set auto-compact

Merge this into the top level of the same opencode.json from step 2. With the 200K context limit already set, a 20K buffer means automatic compaction fires at 90% of the 200K window:

json Β· ~/.config/opencode/opencode.json
{
  "compaction": {
    "auto": true,
    "buffer": 20000
  }
}

Trigger manually anytime with /compact.

1

Install the desktop app

Get OpenCode Desktop from opencode.ai/download (macOS, Windows and Linux builds). Good news: the app reads the same opencode.json and the same stored credentials as the CLI. If your CLI setup already works, open the app and just pick the model in step 3.

2

Or set it up in the app: Providers β†’ Custom Provider

Open Settings β†’ Providers β†’ Custom Provider β†’ Connect and fill:

OpenCode Β· Custom Provider
lucif
LUCIF API
https://lucif.ai/v1
sk-your-lucif-key
lucif
The custom-provider form with LUCIF values. Submitting writes the same provider block the CLI uses.
3

Pick the model in your session

Start a session and choose lucif from the model picker (or via the command palette β†’ Choose model). Send a test prompt. Replies now run on LUCIF routing.

4

Set auto-compact

The app reads the same opencode.json as the CLI. Add the compaction block from CLI step 4 to that file. The app picks it up on the next session. Same result: auto-compact at 90% of the 200K window.

Claude Code speaks the Anthropic protocol. Base URL https://lucif.ai (no /v1), model claude-lucif, key as Bearer token.

1

Install Claude Code

bash
# macOS / Linux / WSL
curl -fsSL https://claude.ai/install.sh | bash

# Windows PowerShell
irm https://claude.ai/install.ps1 | iex
2

Add LUCIF to your settings file

Create or edit ~/.claude/settings.json (Windows: %USERPROFILE%\.claude\settings.json) and paste this. The settings file is the reliable place: it wins over shell exports and survives restarts:

json Β· ~/.claude/settings.json
{
  "env": {
    "ANTHROPIC_BASE_URL": "https://lucif.ai",
    "ANTHROPIC_AUTH_TOKEN": "sk-your-lucif-key",
    "CLAUDE_CODE_ENABLE_GATEWAY_MODEL_DISCOVERY": "1",
    "ANTHROPIC_DEFAULT_OPUS_MODEL": "claude-lucif",
    "ANTHROPIC_DEFAULT_SONNET_MODEL": "claude-lucif",
    "ANTHROPIC_DEFAULT_HAIKU_MODEL": "claude-lucif"
  },
  "model": "claude-lucif"
}

The three ANTHROPIC_DEFAULT_*_MODEL lines pin Claude Code's internal aliases (including background tasks) to claude-lucif, so nothing ever asks the gateway for a built-in Claude model name. Model discovery fills the /model picker from LUCIF automatically.

Prefer shell variables? The minimal equivalent is:

bash
export ANTHROPIC_BASE_URL="https://lucif.ai"
export ANTHROPIC_AUTH_TOKEN="sk-your-lucif-key"
3

Start it and verify with /status

bash
claude --model claude-lucif
# inside the session, run:  /status
claude Β· /status
> /status
  Anthropic base URL : https://lucif.ai
  Auth token         : ANTHROPIC_AUTH_TOKEN
  Model              : claude-lucif
What success looks like: /status shows the LUCIF base URL and your auth token source. If it shows api.anthropic.com instead, the settings file was not loaded.
Two classic mistakes. β‘  Adding /v1 to ANTHROPIC_BASE_URL. Claude Code appends /v1/messages itself, so you get a 404. β‘‘ Putting the key in ANTHROPIC_API_KEY. That variable is sent as an x-api-key header; LUCIF keys are Bearer tokens and belong in ANTHROPIC_AUTH_TOKEN. If a 400 error ever mentions context_management, add "CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS": "1" to the same env block.
4

Set auto-compact

Add one line at the top level of the same ~/.claude/settings.json from step 2 (next to "model"). This sets the auto-compact window to 90% of the 200K window for every model:

json Β· ~/.claude/settings.json
{
  "autoCompactWindow": 180000
}

Verify in-session with /autocompact. Trigger manually anytime with /compact.

1

Install the Claude app (don't sign in yet)

Download the Claude desktop app from claude.com/download and install it. The third-party configuration must be in place before you choose how to sign in.

Important: the desktop app does not read ANTHROPIC_BASE_URL or ~/.claude/settings.json. The form in the next steps is the only place it looks. The CLI settings do not carry over.
2

Turn on Developer Mode

Open Help β†’ Troubleshooting β†’ Enable Developer Mode. The app restarts and a Developer menu appears.

3

Fill in the gateway form

Open Developer β†’ Configure Third-Party Inference… and fill the form exactly like this:

Configure Third-Party Inference
Gateway
https://lucif.ai
sk-your-lucif-key
Static API key
Bearer
leave empty (auto-discovered) (or add: claude-lucif)
The gateway form with LUCIF values. Auth scheme must be Bearer. That is how LUCIF keys are sent.
4

Test, apply, and pick the third-party option

Click Test connection. It should pass. Then Apply Changes (the app may restart). On the sign-in screen, choose the third-party configuration option, not the Anthropic account sign-in. Finally pick claude-lucif in the model picker and start a chat.

VS Code user? The Claude Code extension inherits the CLI's settings file for its spawned process, but its sign-in pre-check reads VS Code settings instead. Add this to your VS Code User Settings (JSON). Note it is an array of name/value objects, not a map:
json Β· VS Code settings
{
  "claudeCode.environmentVariables": [
    { "name": "ANTHROPIC_BASE_URL", "value": "https://lucif.ai" },
    { "name": "ANTHROPIC_AUTH_TOKEN", "value": "sk-your-lucif-key" }
  ]
}
5

Set auto-compact

The desktop app does not read settings.json, so set it in-session instead. In any chat, run:

bash
/autocompact 180k

This saves the 90% of the 200K window setting to your user settings and applies immediately. Run /autocompact alone anytime to confirm what is active.

Still stuck? Check these first

SymptomLikely causeFix
404 on every request (Claude Code)ANTHROPIC_BASE_URL ends in /v1Use https://lucif.ai. The tool appends /v1/messages itself
401 UnauthorizedKey sent in the wrong headerLUCIF keys are Bearer tokens: ANTHROPIC_AUTH_TOKEN in Claude Code; auth scheme Bearer in the desktop app
Model never appears in the pickerProvider stored but not defined (OpenCode), or discovery offOpenCode needs the provider block in opencode.json, not just /connect; Claude Code needs CLAUDE_CODE_ENABLE_GATEWAY_MODEL_DISCOVERY=1
Session dies on long conversations (OpenCode)Custom model has no context limitSet limit.context as in the guides. Without it the tool assumes 0
Hermes ignores the endpointEndpoint set via env vars instead of configPut provider: custom + base_url in ~/.hermes/config.yaml; no trailing slash

None of these match? Contact support with your tool, its version, and the exact error text. That trio solves most cases in one reply.