🤖 DDC API AI Chat & Image Assistant — n8n Powered Intelligence

DDC API AI Chat & Image Assistant is a sophisticated automation architecture built on n8n that bridges the gap between conversational AI and generative media. By orchestrating complex logic flows, it routes user inquiries through high-performance LLMs or state-of-the-art image diffusion models, creating a unified assistant experience.
Built with LangChain nodes and custom API integrations, this project demonstrates the power of low-code platforms in deploying production-ready AI services.
🛠️ Technology Stack
✨ Features at a Glance
🧠 Intelligent Chat Orchestration
- Dual-Path Routing: An intelligent agent logic that determines whether to respond with text or initiate an image generation task.
- LLM Contextualization: Integrates with
gpt-4o-miniequivalents for rapid, personality-driven dialogue. - Custom Prompt Engineering: Uses specialized system prompts to ensure the AI maintains a consistent tone and helpfulness.
🎨 Creative AI Pipeline
- FLUX.1-Kontext Integration: Connects to advanced diffusion models to generate high-fidelity 1024x1024 or 512x512 images on demand.
- Dynamic Asset Delivery: Automatically parses JSON responses to extract raw binary or URL-based image data for immediate user viewing.
🔌 Developer-Centric Design
- Bearer Auth Security: Implements robust API authentication headers for all external AI provider calls.
- Node-Based Modularity: Every segment of the logic is modular, allowing for easy swapping of models (e.g., GPT-4 to Claude 3.5).
- Automated Logging: Real-time workflow tracking within n8n for debugging and usage analytics.
📁 Workflow Architecture
n8n-workflow/
├── Webhook Trigger # Entry point for user messages
├── Model Switch Node # Logic to branch (Text vs Image)
├── LangChain Chain # Core LLM processing engine
├── FLUX Image Node # Custom HTTP Request for image gen
├── Response Formatter # JavaScript node for cleaning JSON
└── Success Webhook # Final delivery back to the client
🚀 Installation & Setup
1. Prerequisites
- n8n Desktop or n8n Cloud
- DDC API / AI Provider Key
2. Workflow Import
- Download the
workflow.jsonfrom this repository. - In n8n, click “Add Workflow” -> “Import from File”.
- Select the
workflow.json.
3. Connection Config
- Locate the HTTP Request nodes (Text and Image).
- Update the “Authentication” section with your
Bearer Token. - Set the target URLs to your specific AI provider’s endpoints.
4. Activation
- Click the “Execute Workflow” button to enter testing mode.
- Send a test payload to the webhook URL to verify the response.
📄 License
Distributed under the MIT License.
Designed & Developed by Aditya (aka aditya-2129)