WhatsMax DocumentationWhatsMax Documentation
Home
Getting Started
Deployment
Integrations
Platform Guide
FAQ
Home
Getting Started
Deployment
Integrations
Platform Guide
FAQ
  • Getting Started

    • Introduction
    • Requirements
    • Installation
    • Configuration
    • First Steps
  • Production Deployment

    • Production with PM2
    • Nginx & SSL
    • Updating
  • Integrations

    • WhatsApp Cloud API
    • WhatsApp QR
    • Telegram
    • WeChat
    • Social Media
    • Payment Gateways
    • AI Providers
    • E-commerce
    • Webhook Automation
    • SMS & Email
    • Realtime (Pusher)
  • Platform Guide

    • Platform Overview
    • Omnichannel Inbox
    • Templates & Auto Replies
    • Website Chat Widget
    • Contacts & Segments
    • Campaigns & Broadcasting
    • Automations
    • AI Chatbots
    • Social Planner
    • Leads & Pipeline
    • Reports & Analytics
    • Media Library
    • Workspaces & Team
    • Subscription & Support
    • Developer API
  • Admin Panel

    • Admin Panel
    • Clients & Subscriptions
    • Plans, Coupons & Tax
    • Content & Support
    • Configuration
    • System & Health
    • License Activation
  • Reference

    • FAQ
    • Troubleshooting
    • Changelog
    • Credits

AI Providers

AI powers chatbots, inbox auto-replies, knowledge-base answers (RAG) and the AI automation generator. WhatsMax supports three LLM providers:

ProviderModelsGet a key at
OpenAIGPT-4o family and newerplatform.openai.com
AnthropicClaude familyconsole.anthropic.com
GoogleGemini familyaistudio.google.com

Where keys are configured

There are two levels:

  1. Platform level (you) — Admin → Configuration → AI Dashboard. Platform-wide provider keys, default models and usage monitoring across all workspaces. You can also set a fallback key in .env (AI_PROVIDER, OPENAI_API_KEY, OPENAI_MODEL — see Configuration).
  2. Workspace level (your customers) — AI → Providers inside the app. Workspaces can bring their own keys, so their usage bills to their own provider account.

AI providersWorkspace-level provider configuration.

All keys are encrypted at rest with APP_ENCRYPTION_KEY.

Setting up a provider (example: OpenAI)

  1. Create an API key on the provider console.
  2. Enter it in Admin → AI Dashboard (platform-wide) or AI → Providers (single workspace).
  3. Pick the default model — smaller models (e.g. gpt-4o-mini) are dramatically cheaper and fine for most support chatbots.
  4. Save, then use the built-in test action to confirm the key works.

What uses AI, and when

FeatureRuns whereNotes
AI chatbotsWorker processConversation replies via the chatbot builder.
Knowledge bases (RAG)Worker processDocuments are chunked and embedded on upload; bots retrieve relevant chunks per question.
Inbox auto-replyWorker processOptional AI suggestions/automatic replies in conversations.
Automation generatorWeb process"Describe the automation" → builder graph.

Because AI jobs run in the worker, a stopped worker looks like "the bot never answers" — check pm2 logs whatsmax-worker first.

Cost control

  • Admin → AI Dashboard shows token usage per workspace; Reports → AI Usage shows it to each workspace.
  • Plan limits let you cap AI usage per subscription tier (configure limits on the plan in Admin → Plans).
  • Prefer small/cheap models as defaults; let power users pick larger ones per chatbot.
Prev
Payment Gateways
Next
E-commerce