Skip to main content
Add any OpenAI-compatible Chat Completions endpoint to ~/.magnitude/config.json. Declare the connection and the models you want Magnitude to show, then save the file. Magnitude applies valid changes automatically.

Configure a custom endpoint

Add an endpoint under providers, preserving any other fields already in the file. This example configures OpenRouter with GLM 5.2:
Set the referenced credential before starting Magnitude:

Configuration shape

The example uses OpenRouter’s published GLM 5.2 model ID and limits. For another endpoint:
  • use its API root as baseUrl; do not include /chat/completions;
  • use each model’s exact API model ID as its key under models;
  • declare the model’s actual context and output limits;
  • reference secrets through environment variables instead of storing them in the file.
After you save, the models appear in Magnitude’s normal model picker. Removing a selected endpoint or model clears that model slot without choosing a replacement. Restoring the same keys makes the model available again but does not reselect it.