Provider API Keys
Genfeed does not generate content by itself. It calls model providers with keys that you supply. Self-hosting has no Genfeed credits: you create accounts with the providers you want, add their keys to your instance, and pay those providers directly under their own terms.
Set a real, non-placeholder OPENROUTER_API_KEY before starting the
container. Since v0.2.15, an empty or placeholder value stops startup before
services run. The installation wizard asks for the key; with the release bundle,
set it in .env before docker compose up. Text generation and the agent use
OpenRouter; other provider keys are optional.
Supported keys
| Provider | Environment variable | Required? | Used for |
|---|---|---|---|
| OpenRouter | OPENROUTER_API_KEY | Yes, before startup and for text generation | Chat, agents, post drafts, prompt enhancement, newsletters, and workflow LLM steps |
| OpenAI | OPENAI_API_KEY | No | Direct access to openai/* models, where a path routes there |
| Anthropic | ANTHROPIC_API_KEY | No | Direct access to anthropic/* models, where a path routes there |
| Replicate | REPLICATE_KEY | For media | Hosted image, video, and other media models |
| fal | FAL_API_KEY | For media, where a path selects fal | Hosted media models |
| ElevenLabs | ELEVENLABS_API_KEY | For voice | Voice and audio |
All provider keys are blank in the self-hosted .env.example. Set
OPENROUTER_API_KEY to a real key before the first start. After later edits,
recreate the stack. Startup checks the key’s format and rejects empty or
placeholder values; it does not prove that your provider account has access to
a model. Settings validates each key with the provider before saving it.
Can another provider replace OpenRouter?
Not for the default paths. The routing rules, checked against the code, are:
- Model ids starting with
openai/go to OpenAI whenOPENAI_API_KEYis set, and ids starting withanthropic/go to Anthropic whenANTHROPIC_API_KEYis set. - Every other model id goes to OpenRouter. An
openai/*oranthropic/*id with no direct key also falls back to OpenRouter. - Branded drafts (post drafts written in a brand’s voice) are OpenRouter-only, whatever other keys you have.
- Replicate, fal, and ElevenLabs are media and voice providers. They never generate text.
An OpenAI or Anthropic key does not replace the OpenRouter startup requirement. If you want OpenAI or Anthropic models, you can reach them through OpenRouter with the same single key, and the direct keys are an optional addition.
Once the instance is running, an OpenRouter key saved for an organization can
serve supported generation paths. It does not replace the deployment-wide
OPENROUTER_API_KEY required at container startup. See
Per organization.
Which key does a feature need?
| Feature | Key |
|---|---|
| Chat and agents | OPENROUTER_API_KEY |
| Post and branded drafts | OPENROUTER_API_KEY |
| Prompt enhancement | OPENROUTER_API_KEY |
| Newsletters and workflow LLM steps | OPENROUTER_API_KEY |
| Image and video generation | REPLICATE_KEY or FAL_API_KEY, depending on the model |
| Voice and audio | ELEVENLABS_API_KEY |
Other providers in the model registry (such as xAI) are listed in Models and providers and are configured through Integrations.
How to get each key
Create an API key in each provider’s own dashboard. Provider sites change, so follow their current instructions.
- OpenRouter: create a key at openrouter.ai/keys . Add credits first, because most models need a funded balance.
- OpenAI: create a key at platform.openai.com/api-keys .
- Anthropic: create a key in the Anthropic Console .
- Replicate: create an API token at replicate.com/account/api-tokens .
- fal: create a key in the fal dashboard .
- ElevenLabs: create a key in your ElevenLabs settings .
Each provider bills you separately and may require a payment method, a funded balance, or account approval before a key can run a given model.
Add keys to your instance
Deployment-wide, in .env
-
Open the
.envnext to yourcompose.yml. -
Set
OPENROUTER_API_KEYbefore the first start, and add any optional keys after their variables:OPENROUTER_API_KEY=sk-or-... OPENAI_API_KEY="" ANTHROPIC_API_KEY="" REPLICATE_KEY="" FAL_API_KEY="" ELEVENLABS_API_KEY="" -
Recreate the stack so the container reads the new values. A plain
docker compose restartdoes not re-read.env:docker compose --env-file .env -f compose.yml up -d
Use real keys only. If OPENROUTER_API_KEY is empty or still a template value,
the container exits with OPENROUTER_API_KEY is required and must contain a non-placeholder OpenRouter key. Set it before starting. No services start.
Keys in .env are server-side only. Never commit .env and never put a key in a
NEXT_PUBLIC_* variable.
Per organization, in the app
Provider keys can also be entered in the app under Organization settings →
Integrations. When a generation path supports it, an organization’s own key
takes precedence over the deployment-wide key in .env. See
AI providers for every provider the app accepts.
Check that a key works
Run a small, non-sensitive generation with a model from that provider. If it fails, check the provider dashboard for account, billing, or model-access issues, and read the container logs:
docker compose --env-file .env -f compose.yml logs genfeedMissing provider key error
If a generation fails with this message, the key it names is not set:
Missing provider key: OPENROUTER_API_KEYThe API answers with HTTP 503 and code: "missing_provider_key". Agent and
draft flows show it as “AI provider not connected”. Add the key as described
above and recreate the stack; no data is lost and no credit is charged for the
failed attempt, so you can run the same generation again. See
Troubleshooting.
Privacy and cost
- Prompts and media sent to a provider are processed under that provider’s terms. Application records stay on your infrastructure.
- Genfeed does not meter bring-your-own-key usage. Provider quotas and charges apply directly to your provider account.
Running models locally
The Community image does not start GPU or local-model services, so it does not run open-source models on its own. Generation runs through the model providers whose keys you configure above.