Package Exports
- n8n-nodes-openrouter
- n8n-nodes-openrouter/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (n8n-nodes-openrouter) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
n8n-nodes-openrouter
This is an n8n community node. It lets you use OpenRouter in your n8n workflows.
OpenRouter is a unified API for AI models, allowing you to access various language models through a single interface.
n8n is a fair-code licensed workflow automation platform.
Installation
Operations
Credentials
Compatibility
Usage
Resources
Version history
Installation
Follow the installation guide in the n8n community nodes documentation.
Operations
- Chat Completion: Create a chat completion using OpenRouter API
Credentials
To use this node, you'll need to create an account on OpenRouter and obtain an API key.
- Sign up for an account at OpenRouter
- Navigate to the API Keys section
- Generate a new API key
- Use this API key in the OpenRouter API credentials in n8n
Compatibility
This node has been developed and tested with n8n version 0.125.0. It should work with any newer version as well.
Usage
To use this node, you need to have n8n installed. If you haven't done that yet, check out the n8n installation guide.
After installing this node, you can use it like any other n8n node. Add it to your workflow and configure it according to your needs.
Chat Completion
- Select the 'Chat Completion' operation
- Choose the AI model from the dropdown list of available OpenRouter models
- Add your messages in the 'Messages' section
- Configure additional options like temperature and max tokens if needed
- Enable streaming if you want to receive partial responses
Resources
Version history
0.2.0 - Added support for streaming responses, improved error handling, added additional options (temperature, max tokens), and implemented a dropdown selector for OpenRouter models 0.1.0 - Initial release
Development
If you want to contribute to this node, follow these steps:
- Clone the repository
- Install dependencies:
npm install - Build the node:
npm run build - Run tests:
npm test
We welcome contributions! Please submit a pull request with your changes.