> ## Documentation Index
> Fetch the complete documentation index at: https://docs.modellix.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Use Modellix LLM with Hermes Agent

> Point Hermes Agent at the Modellix LLM gateway with a Custom Endpoint, config.yaml provider custom, and provider/name model IDs.

Configure [Hermes Agent](https://hermes-agent.nousresearch.com/docs) by Nous Research to call the Modellix LLM gateway. Hermes does not ship a built-in Modellix provider, so use a [Custom Endpoint](https://hermes-agent.nousresearch.com/docs/integrations/providers) that points at Chat Completions on [`POST /v1/chat/completions`](/llm/chat-completions).

<Note>
  This page covers **LLM text** only (`https://llm.modellix.ai`). For Hermes media skills (image, video, speech), see [Skill](/ways-to-use/skill).

  Modellix model IDs are `provider/name` (for example `openai/gpt-5.5`). Enter that full string as the Hermes model name. See [Models & Pricing](/llm/overview#models-and-pricing).
</Note>

## Set Up Hermes

<Steps>
  <Step title="Get a Modellix API Key">
    Create a Modellix API key in the [console](https://modellix.ai/console/api-key) and store it securely. You will paste it into the Hermes Custom Endpoint setup (or into `~/.hermes/.env`).
  </Step>

  <Step title="Configure the Custom Endpoint">
    From your terminal (outside an active Hermes session), run:

    ```bash theme={null}
    hermes model
    ```

    Select **Custom endpoint (self-hosted / VLLM / etc.)** and enter:

    | Field        | Value                                                  |
    | ------------ | ------------------------------------------------------ |
    | API base URL | `https://llm.modellix.ai/v1`                           |
    | API key      | Your Modellix API Key                                  |
    | Model name   | Exact Modellix Model ID (for example `openai/gpt-5.5`) |

    Include `/v1` in the base URL so paths resolve to `/v1/chat/completions`.

    <Warning>
      Use **Custom endpoint**, not built-in OpenRouter, OpenAI, or Anthropic providers. Those routes send traffic to vendor endpoints instead of Modellix.
    </Warning>
  </Step>

  <Step title="Persist Env and Config">
    The wizard writes provider settings for you. To configure manually (or to verify), edit these files.

    `~/.hermes/.env` (secrets only):

    ```bash theme={null}
    MODELLIX_API_KEY=mdlx-xxxxxxxx
    ```

    `~/.hermes/config.yaml` (model and endpoint):

    ```yaml theme={null}
    model:
      provider: custom
      base_url: https://llm.modellix.ai/v1
      default: openai/gpt-5.5
      api_key: mdlx-xxxxxxxx
    ```

    Replace `mdlx-xxxxxxxx` with your Modellix API key. Prefer keeping the key in `.env` when your Hermes build stores credentials there after `hermes model`; keep `config.yaml` as the source of truth for `provider`, `base_url`, and `default`.

    | Field      | Value                                                 |
    | ---------- | ----------------------------------------------------- |
    | `provider` | `custom`                                              |
    | `base_url` | `https://llm.modellix.ai/v1`                          |
    | `default`  | Exact Modellix Model ID (`provider/name`)             |
    | `api_key`  | Modellix API Key (or rely on wizard / `.env` storage) |

    To switch models later, change `model.default` (for example to `anthropic/claude-sonnet-5` or `google/gemini-3.6-flash`), or inside a session use `/model custom:<model-id>`. Full catalog: [Models & Pricing](/llm/overview#models-and-pricing).

    <Tip>
      You do **not** need a separate Anthropic base URL. Use `anthropic/...` and `google/...` IDs on the same Custom Endpoint; traffic goes through OpenAI-compatible Chat Completions on `https://llm.modellix.ai/v1`.
    </Tip>

    <Warning>
      Hermes separates secrets from settings: API keys belong in `~/.hermes/.env`; model, provider, and base URL belong in `~/.hermes/config.yaml`.
    </Warning>
  </Step>

  <Step title="Start Hermes">
    Start a Hermes session so it loads the updated config:

    ```bash theme={null}
    hermes
    ```

    Or use the TUI:

    ```bash theme={null}
    hermes --tui
    ```

    You can also start a chat with:

    ```bash theme={null}
    hermes chat
    ```
  </Step>
</Steps>

## Troubleshooting

| Symptom                           | Check                                                                                             |
| --------------------------------- | ------------------------------------------------------------------------------------------------- |
| 401 / no API key                  | Modellix key is in `~/.hermes/.env` or set via `hermes model`; re-run `hermes model` if needed    |
| Model not found / 404             | `model.default` is a full ID like `openai/gpt-5.5`, not bare `gpt-5.5`; ID is in the live catalog |
| Context length rejected           | Hermes requires at least **64K** context; use a Modellix catalog model that meets that floor      |
| Traffic hits OpenRouter or OpenAI | `model.provider` is `custom` and `base_url` is `https://llm.modellix.ai/v1`                       |
| Wrong path / URL errors           | Base URL includes `/v1` and is not the media API host (`https://api.modellix.ai`)                 |

## Related

* [Hermes AI Providers](https://hermes-agent.nousresearch.com/docs/integrations/providers) — Custom Endpoint reference
* [Models & Pricing](/llm/overview#models-and-pricing) — Model IDs and rates
* [LLM API guide](/llm/api/api) — protocols and curl examples
* [OpenClaw](/llm/agent/openclaw) · [OpenCode](/llm/agent/opencode) — other OpenAI-compatible custom setups
* [Skill](/ways-to-use/skill) — Hermes media skill install
