Router9
Documentation
Integrations

gptme

Use Router9 as a custom provider in gptme

gptme logo

gptme is a personal AI assistant for your terminal that can run code, edit files, and browse the web. It reads OpenAI-compatible settings from its environment, so it connects to Router9 with no code changes.

Setup

gptme stores configuration in ~/.config/gptme/config.toml. Point the OpenAI base URL at Router9 and supply your key under the [env] section:

[env]
OPENAI_BASE_URL = "https://api.router9.com/v1"
OPENAI_API_KEY = "sk-r9k-your-key-here"

You can also set these as environment variables instead of editing the config file:

export OPENAI_BASE_URL=https://api.router9.com/v1
export OPENAI_API_KEY=sk-r9k-your-key-here

Choosing Models

Select a model with the -m/--model flag, prefixed with openai/ so gptme uses the OpenAI-compatible path:

gptme 'refactor this module' -m openai/gpt-4o

Swap the id for any model Router9 supports, e.g. openai/claude-sonnet-4-20250514.

Tips

  • Router9's flat monthly pricing suits gptme's interactive, tool-heavy sessions.
  • Keep your sk-r9k- key in the environment or config.toml rather than in committed project files.

On this page