Use OpenRouter in your terminal
OpenRouter gives you hundreds of models from many companies with one key, and kunji reads its prices automatically.
Set up
Section titled “Set up”- Create an API key at https://openrouter.ai/keys.
- Run
kunji keys add openrouterand paste the key. kunji checks it works, then stores it in your OS keychain. - Pick a default model from the list (type to search).
- Run
kunjiand start chatting.
Details
Section titled “Details”| Provider id | openrouter |
| Type | OpenAI-compatible API |
| API address | https://openrouter.ai/api/v1 |
| Key variable | OPENROUTER_API_KEY |
Use it
Section titled “Use it”kunji models openrouter # see available modelskunji use openrouter:<model> # make one your defaultkunji chat -m openrouter:<model> # or chat with it onceInside a chat, switch to it with /model openrouter:<model>; the conversation carries over.
Use an environment variable instead
Section titled “Use an environment variable instead”For CI or scripts you can skip the keychain:
export OPENROUTER_API_KEY=your-key-herekunji ask -m openrouter:<model> "Hello"