maximus Posted February 12 Posted February 12 Hi everyone! I've built AiWire — a module that connects ProcessWire to AI providers (Anthropic, OpenAI, Google, xAI, OpenRouter). GitHub: https://github.com/mxmsmnv/AiWire Spoiler What it does $ai = $modules->get('AiWire'); // Simple call echo $ai->chat('What is ProcessWire?'); // Generate multiple fields at once $ai->generate($page, [ ['field' => 'ai_overview', 'prompt' => "Write overview..."], ['field' => 'ai_seo_meta', 'prompt' => "Generate meta..."], ], ['cache' => 'W']); // Auto-fallback if provider fails $result = $ai->askWithFallback('Translate this...', [ 'provider' => 'anthropic', 'fallbackProviders' => ['openai', 'google'], ]); Main features Multiple API keys per provider with auto-failover Connection testing from admin Interactive Test Chat with parameter controls File cache with TTL (day/week/month/year) Save AI responses to page fields Multi-turn conversations Full docs with 25 real-world examples Requirements PHP 8.1+, ProcessWire 3.0.210+, cURL, and at least one API key. If you try it out, I'd love to hear your feedback — whether the API makes sense, if the docs are clear, or if you run into any issues. Thanks! 🙏 14
robert Posted February 12 Posted February 12 What a coincidence! I’d just released a big update to my PromptAI module when I saw your post 🤯 As far as I can tell from your examples, our use cases differ slightly. Looks really good! 2
maximus Posted February 12 Author Posted February 12 Yeah, yours feels more like an admin-focused tool for one-shot operations, while mine went in a slightly different direction. Same tree trunk, just one has deeper roots and the other has wilder branches 😄 Honestly, it all started because they gave me $50 in credits for Claude Opus 4.6 and I wanted to test what it could actually build. My very first prompt to it was roughly: “Create a plugin that connects AI to a ProcessWire website, something like the TeleWire you made for Telegram. Use the standard approach, add support for Anthropic, xAI, OpenAI, OpenRouter — so you can add multiple API keys and it clearly shows whether each one is working or not.” …and then, well — «And then Ostap was off» 😂 (That famous line from Ilf & Petrov’s The Twelve Chairs when Ostap Bender gets carried away and can’t stop spinning taller and taller tales.) From that one simple request it just snowballed into the full AiWire module you see now. 2
robert Posted February 12 Posted February 12 Haha, yeah, those $50 in Opus credits pushed me quite a bit further too while writing this update … It’s really fascinating how fast you can move with a single prompt sometimes – only to suddenly going in circles for 30 minutes for a simple bug. Wild times 😅 2
maximus Posted February 23 Author Posted February 23 On 2/16/2026 at 3:24 PM, ukyo said: 🙂 Big job! Good luck! 1
prestoav Posted March 1 Posted March 1 Thanks for an awesome module. This one is going to be super useful! I've deployed this today to generate descriptions for Audio Visual brands using OpenAI and got it working without major issues. I noticed a couple of things worth looking at: 1) I couldn't get the Test Chat to work with GPT-5 Nano - a response was received but the content was empty. Switching to GPT 4.1 worked fine. 2) If using OpenAI as a single provider I had to use the 'provider' option or I got an error in the response saying 'no key for Anthropic' or similar. It would be useful here if, be default, it would use whichever provider was found with an active key perhaps? That way the 'provider' option wouldn't be needed unless for a specific call to a specific provider. 3) It would be useful if the number of total used tokens and / or tokens still available information from the provider was presented in the module. I'm not sure if that information is even possible from their API though? Thanks again. I look forward to using this module more in future!
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now