Configure
Gateways and custom endpoints
If your company routes model traffic through a gateway, or you run your own model server, MemIndex can write notes through it.
Claude through a gateway
Put these in the .env file in your memory folder (~/.memindex/.env), one NAME=value per line, then restart with npx memindex restart:
| Name | What it does |
|---|---|
ANTHROPIC_BASE_URL |
The address of your Claude-compatible gateway. Your normal sign-in token is not sent to it. |
ANTHROPIC_AUTH_TOKEN |
The bearer credential the gateway wants, if it wants one. |
ANTHROPIC_API_KEY |
An API key, for direct access instead of your signed-in plan. |
MEMINDEX_CLAUDE_AUTH_METHOD is a label the installer and viewer save: subscription, api-key, gateway or cli. Changing the label alone does not switch accounts. The credentials and the address decide.
Keep .env private. MemIndex ignores any ANTHROPIC_ values it inherits from your shell for these names, so the file is the one place to look.
Another service by address
For OpenRouter, set MEMINDEX_OPENROUTER_BASE_URL to point at a different chat service. For anything that speaks the OpenAI chat format, use the OpenAI-compatible choice: MEMINDEX_OPENAI_COMPAT_BASE_URL and MEMINDEX_OPENAI_COMPAT_MODEL, with a preset such as ollama or lmstudio for a model running on your computer. See Who writes your notes.
When notes stop on a gateway
MemIndex turns reasoning off by default for OpenRouter and compatible services, so a thinking model cannot spend its whole reply and leave no note. If a reply is cut off at the size limit, MemIndex asks once more. If the service rejects the reasoning setting, it asks again without it. If a model refuses a request, the status panel says so and restarting will not help: choose a different model. More checks are in Troubleshooting.