Client was running 500+ conversations/day through their AI agent. Burning $450/month on GPT-4.
The fix I built in n8n:
Added a smart routing system:
- DeepSeek R1 classifies query complexity (costs almost nothing)
- IF complexity_score > 7 → GPT-4
- ELSE → GPT-4o-mini
What happened:
- 60% of queries went to GPT-4o-mini (way cheaper)
- Only complex stuff hit GPT-4
- Same quality, zero user complaints
- New cost: $120/month
ROI: Took 2 hours to build, saves $330/month = $3,960/year
The key insight: Most queries don't need GPT-4's full power. Route smart, save money.
Anyone else optimizing API costs? What strategies are working for you?