Usage Limits & Cost Control
Stay in control of API spending with per-user limits, global caps, and usage monitoring.
Why Set Limits?
- Control API costs — Prevent unexpected bills from your AI provider
- Prevent abuse — Stop a single user from consuming all resources
- Fair distribution — Ensure all visitors get access
- System performance — Avoid overwhelming your server
Types of Limits
Message Limits
Per-User Daily Limit
Maximum number of messages a single user can send per day. Resets every 24 hours. Identified by IP address.
Global Daily Limit
Total messages for all users combined per day. Protects against unexpected spikes and keeps you within a fixed API budget.
Budget Limits (Token & Cost)
In addition to message counts, you can set hard limits based on actual token consumption and dollar cost. These are ideal for keeping your API spending predictable.
Daily Token Limit
Maximum total tokens (input + output combined) consumed across all conversations in a single day. Once reached, no new messages are processed until the next day.
Daily USD Limit
Maximum dollar amount (based on calculated cost per conversation) allowed per day. Useful when you want to set a fixed daily budget in real money terms.
Monthly Token Limit
Same as the daily token limit, but accumulated over the entire calendar month. Resets on the first day of each month.
Monthly USD Limit
Maximum dollar spend per calendar month. This is the most straightforward way to cap your total costs.
Configuration
Message Limits
- Go to AxiaChat AI → Settings → Usage & Moderation.
- In the Usage (Limits) card, select the Message Limits tab.
- Set:
- Messages per user per day
- Global messages per day
- Behavior when limits are reached (disable input or hide widget)
Budget Limits
- Go to AxiaChat AI → Settings → Usage & Moderation.
- In the Usage (Limits) card, select the Budget Limits tab (shown by default).
- Set any combination of:
- Daily token limit
- Daily USD limit
- Monthly token limit
- Monthly USD limit
- Choose the behavior when the budget is exceeded.
Leave any field at 0 to disable that specific limit.
When Limits Are Reached
Message Limits
| Option | Behavior |
|---|---|
| Disable Input | Text field is disabled, explanatory message shown, widget remains visible |
| Hide Widget | Chat disappears completely, reappears when limits reset |
Budget Limits
| Option | Behavior |
|---|---|
| Hide widget completely | The chat widget is not rendered at all — visitors won't see anything. This is checked server-side when the page loads, so the widget never flickers into view. |
| Show WhatsApp button only | The chat input and messages are hidden, but the WhatsApp CTA button remains visible so visitors can still reach you through WhatsApp. Requires WhatsApp to be configured in the bot settings. If WhatsApp is not configured, the widget hides completely as a fallback. |
IP Storage
To enforce per-user limits, visitor identification is needed:
- IP is stored in binary format (VARBINARY) for efficiency
- Only stored when per-IP limits are active
- You can disable IP storage if you don't use per-user limits
- Compatible with GDPR requirements (see Privacy & GDPR)
Usage Monitoring
Conversation Logs
At AxiaChat AI → Logs you can see:
- Messages per day
- Usage by bot
- Usage by user/session
Cost Metrics
The plugin automatically calculates:
- Input and output tokens per message
- Estimated cost per conversation (based on model used)
- Daily and monthly totals
- Monthly summary with a month picker — see total tokens, cost, and per-model breakdown for any month
Provider Pricing Overview
| Provider | Budget Option | Mid-Range | Premium |
|---|---|---|---|
| OpenAI | GPT-5 Nano | GPT-4o-mini | GPT-5.2 |
| Claude | Haiku 3.5 | Sonnet 4.5 | Opus 4.1 |
| Gemini | Flash-Lite (free!) | Flash 2.5 | Pro 2.5 |
Typical estimate for an average e-commerce site (100–500 conversations/month): $5–$20/month.
Tips to Optimize Costs
Choose the right model
- "Mini" and "Nano" models are significantly cheaper
- Reserve premium models for complex use cases
- GPT-4o-mini or Gemini Flash offer great quality-to-price ratio
Optimize context
- Index only relevant content (skip privacy policy, legal boilerplate)
- Limit the Knowledge Sources slider (start with 5 chunks)
- Use "Current Page" mode when full embeddings aren't needed
Adjust max tokens
- Reduce
max_tokensif responses are too long - The plugin suggests recommended values per model
Set reasonable limits
- Start with conservative per-user limits
- Adjust based on actual usage patterns
- Monitor regularly through the logs