How to fix: API key not set / invalid API key

For API key not set, run hermes model to reconfigure, or hermes config set OPENROUTER_API_KEY your_key. Invalid keys usually mean the key doesn't match the provider.

Who this is for:Anyone stuck at model setup or failing after switching providers.

Steps

  1. Reconfigure the provider

    hermes model
  2. Or set the key directly

    hermes config set OPENROUTER_API_KEY your_key
  3. Inspect current settings

    hermes config show
  4. Config missing after an update?

    hermes config check
    hermes config migrate

How to verify

FAQ

The key is correct but still fails?

Official FAQ: keys must match the provider. An OpenAI key does not work with OpenRouter and vice versa.

Model not available?

List models with hermes model, or pin one: hermes config set HERMES_MODEL anthropic/claude-opus-4.7.

Related pages