simonw/llm-openrouter
LLM plugin for models hosted by OpenRouter
What it solves
llm-openrouter is a plugin for the llm command-line utility that allows users to access a vast array of models hosted by OpenRouter, providing a unified interface for prompting different AI models from the terminal.
How it works
The plugin integrates OpenRouter's API into the llm tool. Once installed and configured with an API key, users can list available models, set aliases for frequent models, and run prompts against them. It supports OpenRouter's Responses API and the older Chat Completions API.
Who it’s for
Developers and power users who use the llm CLI tool and want a single point of access to multiple AI models from various providers via OpenRouter.
Highlights
- Broad Model Access: Access to numerous models via a a single API key and CLI interface.
- Multimodal Capabilities: Support for image attachments (URLs or file paths) for compatible vision models.
- Structured Output: Integration with
llmschemas to control JSON output structure for compatible models. - Advanced Tooling: Support for tool calls, including OpenRouter's hosted server-side tools for web search, web fetch, and a sandboxed shell.
- Reasoning Control: Options to specify reasoning effort and summaries for models that support it (e.g., GPT-5).
- Provider Routing: Ability to specify provider-specific requirements, such as quantization levels, via JSON options.
- Model Management: Commands to list, filter (e.g., free models), and inspect API key usage and rate limits.
Related
- Project
- Project
- Project
- Project
- Project