spendex

N8N community node for SpendexAI — smart AI router with cost optimization

Documentation

n8n-nodes-spendex

N8N community node for SpendexAI — Smart AI Router with cost optimization.

One node. All LLM providers. Automatic cost savings.

Features

  • Chat Completion — Send prompts through Spendex's smart router. Automatic model selection based on prompt complexity.
  • Cost Tracking — Every response includes cost, savings, provider, and routing metadata.
  • Budget Monitoring — Query budgets and credit balance directly from N8N.
  • Spend Triggers — Get notified when budgets are crossed or requests are blocked.
  • Project Tags — Tag requests by project for granular cost attribution.

Nodes

Node Description
SpendexAI Send chat completions, check balance, list budgets
SpendexAI Trigger Webhook trigger for spend events (budget alerts, request completions)

Setup

  1. Install: npm install n8n-nodes-spendex
  2. Add SpendexAI credentials with your API key
  3. Use the SpendexAI node in your workflows

Example: AI Chatbot with Cost Tracking

Webhook → SpendexAI (Chat Completion) → Respond to Webhook

Every response includes:

  • content — The AI response
  • model — Which model was actually used
  • cost — Exact cost in USD
  • saved — Money saved vs. requested model
  • classification — Prompt complexity (simple/medium/complex)

Example: Budget Alert to Slack

SpendexAI Trigger (budget.warning) → Slack (Send Message)

License

MIT

Discussion