---
title: "Hermes Agent API: Use FreeTheAI as a Custom Endpoint"
description: "Run Nous Research's Hermes Agent on AI models through FreeTheAI, with hermes model or config.yaml."
url: https://freetheai.org/setup/hermes-agent
language: en
updated: 2026-09-29
---

# Hermes Agent API: Use FreeTheAI as a Custom Endpoint

Hermes Agent uses FreeTheAI as a custom endpoint, set up with hermes model or in config.yaml.

## Settings

- Provider: `Custom endpoint`
- API base URL: `https://api.freetheai.org/v1`
- Model name: `glm-5.3`
- API key: `your FreeTheAI key (ftai_..., 53 characters)`

## Steps

1. **Run the setup wizard.** In a terminal (outside a chat session) run hermes model, choose Custom endpoint, and enter the API base URL, your key, and the model name.
2. **Or edit config.yaml.** The same setup in ~/.hermes/config.yaml:

```yaml
model:
  default: glm-5.3
  provider: custom
  base_url: https://api.freetheai.org/v1
  key_env: FREETHEAI_API_KEY
```
3. **Switch models later.** Inside a session, run /model custom:kimi-k3.1-pro to switch to another FreeTheAI model.

## Tips

- Hermes needs a model with at least 64K context. All the recommended FreeTheAI models qualify.
- In the Hermes desktop app: open Settings (the gear), go to the Model tab, set Endpoint to Custom Endpoint, press Setup custom endpoint, keep it on Local, enter the API base URL and your key, and press Save. The model list loads by itself.

## Troubleshooting

**Can I keep the key out of config.yaml?**

Yes. Set key_env to an environment variable name, such as FREETHEAI_API_KEY, and export your key there.

Checked: Checked against Hermes Agent's provider docs (custom endpoint) on 2026-09-29.
