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

# Hermes | AI Gateway

> Route Hermes Agent model calls through Orq.ai AI Gateway for unified observability, cost tracking, and model governance, from the desktop app or the CLI.

Route every model call [Hermes Agent](https://hermes-agent.nousresearch.com) makes through the [**Orq.ai AI Gateway**](/docs/ai-gateway/get-started/quickstart). Requests appear in [Traces](/docs/ai-gateway/traces) automatically.

## Prerequisites

* [Hermes](https://hermes-agent.nousresearch.com) installed (desktop app or CLI)
* Active **Orq.ai** account with **AI Gateway** access
* An [**AI Gateway** API key](/docs/ai-gateway/configuration/api-keys)

## Setup

Hermes is OpenAI-compatible, so it routes through the **AI Gateway** by pointing the OpenAI provider at the router. Configure it in the desktop app or the CLI. Changes made in the desktop app apply to the CLI as well, since both share the same configuration.

<Tabs>
  <Tab title="Desktop app">
    <Steps>
      <Step title="Open provider settings">
        Open the **Hermes** desktop app. On first launch, skip provider selection to set it later. Open **Settings** in the top right, then go to **Providers** > **API keys**.
      </Step>

      <Step title="Set the OpenAI API key and base URL">
        Scroll to **OpenAI API** and expand it. Paste the **AI Gateway** API key into the **OpenAI API key** field and click **Save**. Then paste the router URL into the **OpenAI API base URL override** field and click **Save**:

        ```
        https://api.orq.ai/v3/router
        ```

        <Frame caption="Overriding the OpenAI provider base URL with the Orq.ai router in Hermes">
          <img src="https://mintcdn.com/orqai/MoAQcnkR5P0K6jdu/images/hermes-orq-setup.png?fit=max&auto=format&n=MoAQcnkR5P0K6jdu&q=85&s=392021bb52148061568dfe01bb649f46" alt="Hermes API keys settings with the OpenAI API entry expanded, the AI Gateway key in the OpenAI API key field, and the router URL in the base URL override field" width="2318" height="1490" data-path="images/hermes-orq-setup.png" />
        </Frame>
      </Step>

      <Step title="Select a model">
        Hermes now routes through the **AI Gateway**. Pick a model from the recommended list, or search by name for any other model from the [**AI Gateway** catalog](/docs/ai-gateway/supported-models) that is not shown.
      </Step>
    </Steps>
  </Tab>

  <Tab title="CLI">
    Open the config with `hermes config edit` and set the `model` block to a `custom` provider pointed at the router, with the **AI Gateway** key inline:

    ```yaml theme={"theme":{"light":"github-light","dark":"github-dark"}}
    model:
      provider: custom
      default: "anthropic/claude-sonnet-4-6"
      base_url: "https://api.orq.ai/v3/router"
      api_key: "<your-orq-api-key>"
    ```

    Replace `<your-orq-api-key>` with an [API key](/docs/ai-gateway/configuration/api-keys).

    Set `default` to any provider-prefixed model from the [**AI Gateway** catalog](/docs/ai-gateway/supported-models). Override the model for a single session with `hermes chat --model openai/gpt-5.4`.

    <Warning>
      The default config already contains a `model` block. Edit its existing keys; the block must end up with a single `provider` and a single `base_url`.
    </Warning>
  </Tab>
</Tabs>

## Verification

Send a prompt in Hermes. The response appears in Hermes and the request appears in [**Orq.ai** Traces](/docs/ai-gateway/traces) with the selected model identifier.
