npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

n8n-nodes-wxai

v1.0.2

Published

A user-friendly WXAI node for n8n, designed to enhance your workflow with Gemini 2.0 Flash model. Supports chat completions with configurable parameters.

Downloads

21

Readme

n8n-nodes-wxai

npm version License: MIT n8n-community-node

This is an n8n community node that integrates WXAI API with Gemini 2.0 Flash model into your n8n workflows. It provides powerful AI chat completion capabilities with configurable parameters for enhanced automation.

n8n is a fair-code licensed workflow automation platform.

✨ Features

  • 🤖 Gemini 2.0 Flash Model: Access to Google's latest Gemini model via WXAI
  • 💬 Chat Completions: Full conversation support with system, user, and assistant roles
  • ⚙️ Configurable Parameters: Fine-tune responses with temperature, top-p, and token limits
  • 🔄 SSE Support: Automatic handling of Server-Sent Events responses
  • 🛡️ Error Handling: Comprehensive error management and validation
  • 📝 TypeScript: Full type safety and IntelliSense support
  • 🎯 Easy Integration: Simple setup and configuration in n8n

📦 Installation

Option 1: n8n Community Nodes (Recommended)

  1. Go to Settings > Community Nodes in your n8n instance
  2. Click Install a community node
  3. Enter: n8n-nodes-wxai
  4. Click Install

For detailed instructions, follow the n8n community nodes installation guide.

Option 2: Manual Installation

  1. Clone this repository:

    git clone https://github.com/wxai-community/n8n-nodes-wxai.git
    cd n8n-nodes-wxai
  2. Install dependencies and build:

    npm install
    npm run build
  3. Copy the dist folder to your n8n custom nodes directory

  4. Restart your n8n instance

Credentials

Add your WXAI API credentials in n8n:

  1. Go to Credentials in your n8n instance
  2. Click Add Credential and select WXAI API
  3. Enter your credentials:
    • API Key: Your WXAI API key (e.g., 6263aef89551c6349d49eada0a9e71c1b31b391768285b951a86f86bc62793ca)
    • Base URL: https://cs.rhwx-ai.com/api/ai/v1

Usage

  1. Add a WXAI node to your workflow
  2. Select your WXAI API credentials
  3. Configure the chat operation:
    • Model: gemini-2.0-flash (default)
    • Messages: Add your conversation messages with roles:
      • system: System instructions
      • user: User messages
      • assistant: Assistant responses

Example Configuration

{
  "messages": [
    {
      "role": "system",
      "content": "You are a helpful assistant."
    },
    {
      "role": "user",
      "content": "Hello, how are you?"
    }
  ]
}

Features

  • ✅ Chat completions with Gemini 2.0 Flash model
  • ✅ Configurable temperature and top-p parameters
  • ✅ Maximum token limits (up to 8192 tokens)
  • ✅ Simplified output option for easier data handling
  • ✅ Error handling and validation
  • ✅ TypeScript support

Development

# Install dependencies
npm install

# Build the node
npm run build

# Run linting
npm run lint

# Fix linting issues
npm run lintfix

# Format code
npm run format

API Testing

A test script is included to verify API connectivity:

node test-api.js

Note: Update the API key in test-api.js with your actual WXAI API key before testing.

Expected Response Format

The WXAI API returns responses in Server-Sent Events (SSE) format. The node automatically handles this format and extracts the JSON data for use in n8n workflows.

Troubleshooting

⚠️ Important: Credential Validation Limitation

Known Issue: The credential test in n8n may show "success" even with invalid API keys due to WXAI API's response format (returns HTTP 200 with error details in the response body).

To properly validate your API key:

# Use the included test script
node test-credential-validation.js

# Or test manually
curl -X POST https://cs.rhwx-ai.com/api/ai/v1/chat/completions \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"gemini-2.0-flash","messages":[{"role":"user","content":"test"}],"max_tokens":1,"stream":false}'

Valid response: Contains choices array Invalid response: Contains {"code": 500, "message": "..."}

API Key Issues

  • Ensure your API key is valid and active
  • Check that the base URL is correct: https://cs.rhwx-ai.com/api/ai/v1
  • Verify your account has sufficient credits/quota
  • Use the test script to validate your API key before use

Model Issues

  • The default model is gemini-2.0-flash
  • Ensure the model is available in your WXAI account

License

MIT

🤝 Contributing

Contributions are welcome! Please read our Contributing Guide for details on our code of conduct and the process for submitting pull requests.

Development

# Clone the repository
git clone https://github.com/wxai-community/n8n-nodes-wxai.git
cd n8n-nodes-wxai

# Install dependencies
npm install

# Build the project
npm run build

# Run linting
npm run lint

# Test API connectivity
node test-complete.js

📄 Changelog

See CHANGELOG.md for a detailed list of changes and versions.

🐛 Issues & Support

📊 Stats

  • Downloads: npm downloads
  • Version: npm version
  • License: License: MIT