Skip to main content
Environment variables are applied after config.toml and take precedence over file-based values.

API Keys

VariableProvider
OPENROUTER_API_KEYOpenRouter (universal fallback)
ANTHROPIC_API_KEYAnthropic direct API
OPENAI_API_KEYOpenAI direct API
GOOGLE_API_KEYGoogle direct API
XAI_API_KEYxAI direct API
GROQ_API_KEYGroq direct API

Precedence

For each provider, key resolution follows this order:
  1. Environment variable (highest priority)
  2. [providers] section in ~/.mutual-dissent/config.toml
  3. Empty string — request will fail at runtime
OPENROUTER_API_KEY also sets the top-level api_key field for backward compatibility.

Minimal Setup

Only one key is required to run debates — OPENROUTER_API_KEY routes all five default models through OpenRouter:
export OPENROUTER_API_KEY=sk-or-...
dissent ask "Your query here"

Direct + Fallback

Set both an OpenRouter key and a direct vendor key. The router uses direct when available (in auto mode) and falls back to OpenRouter for models without a direct provider:
export OPENROUTER_API_KEY=sk-or-...
export ANTHROPIC_API_KEY=sk-ant-...
With this setup, claude-opus and claude calls go directly to the Anthropic API; gpt, gemini, grok, and nemotron route through OpenRouter.

Notes

  • Direct provider implementations are currently available for Anthropic only. Other vendors route through OpenRouter regardless of key presence unless a direct provider is implemented.
  • See Routing for per-model routing control.