AI

Keeping an AI Chatbot's Costs Predictable: Usage Caps, Abuse Filtering and Message Limits

Why an AI chatbot bill can surprise you, and the layers that keep it predictable: filtering abuse before any AI call, limits per message, conversation and visitor, and daily and monthly caps, with the real settings from Dar El Ahram and the Nilex website.

The Nilex website AI assistant on a phone next to the Dar El Ahram legal book assistant answering a reader

An AI chatbot's cost is predictable when every way it can be used has a ceiling: a filter that stops abusive or useless messages before they reach the paid AI model, a limit on the length of each message, a limit on messages per conversation and per visitor, and a daily or monthly cap for the whole site. With those layers in place, the worst case is a number you chose in advance, not a surprise on the provider's invoice.

This matters because most AI models are billed by usage: every message and every reply costs money. A chatbot without limits is an open tap. One bored visitor, a competitor, or a script that sends thousands of messages can turn a useful assistant into an expense nobody planned. Below are the controls we use, with the real settings from two Nilex projects, and a checklist you can use with any developer.

Key takeaways

  • The cheapest message is the one that never reaches the AI model: filter abuse first, as Dar El Ahram's book assistant does.
  • Put a limit on every level: characters per message, messages per conversation, messages per visitor over minutes and over a day, and a site-wide cap.
  • On the Nilex website, a conversation is capped at 30 messages and each message at 800 characters, with per-visitor and daily site-wide limits.
  • A monthly usage cap, like Dar El Ahram's, sets the maximum the assistant can cost in a month.
  • Screening has a cost side too: on our site, three flags pause a conversation for an hour.

Why can a chatbot's cost run away?

A traditional website costs roughly the same whether ten or ten thousand people read a page. An AI chatbot does not: each reply is a paid request to the model, and longer conversations and longer messages cost more. Three things make the bill unpredictable:

  • Abuse: insults, spam and attempts to break the assistant still cost money to answer if they reach the model.
  • Length: a visitor can paste a very long text, or keep a conversation going for hours.
  • Volume: a script can send messages faster than any person, from many browser sessions.

The security side of these risks, including what OWASP calls unbounded consumption, is covered in AI chatbot security and prompt injection. This article is about the controls that turn them into a fixed budget.

Layer 1: filter abuse before any AI call

The book assistant we built for Dar El Ahram filters abusive messages before any AI call is made. An insulting or abusive message is handled by the store's own server and never becomes a paid request to the model. That saves money twice: the store does not pay to process the message, and it does not pay for a reply nobody needs.

On our own website, the Nilex sales assistant screens every message and every reply for harmful content and prompt injection, and three flags pause the conversation for one hour. The pause is a safety rule first, but it also stops a determined visitor from running up cost by trying again and again.

Layer 2: limits on each message and each conversation

Two small numbers do a lot of work on the Nilex website:

  • 800 characters per message. Enough for a real question about a business, too short to paste a long document into the chat.
  • 30 messages per conversation. Enough to understand the visitor's business, recommend a system and answer follow-up questions, and then the right next step is a person anyway.

Together they set a hard ceiling on what one conversation can send to the model: at most 30 messages of at most 800 characters, or 24,000 characters of visitor input. Whatever the visitor does, one conversation cannot grow beyond that.

Layer 3: limits per visitor over time

A limit per conversation is not enough on its own, because a visitor can open a new one. So the Nilex assistant also limits each visitor's messages per 5 minutes and per day. The short window stops bursts, such as a script firing messages in a loop; the daily window stops slow, steady overuse.

Layer 4: daily and monthly caps for the whole site

Per-visitor limits protect against one heavy user; site-wide caps protect against many. The Nilex website has daily site-wide caps. Dar El Ahram's assistant has a monthly usage cap to keep costs predictable, and the appliance advisor we built for Bashayer El Khair has daily cost limits.

A cap is a business decision, not a technical one. It answers the question "what is the most I am willing to spend on this assistant in a day or a month?" Everything below the cap is normal use; reaching it is a signal to look at what happened.

All the layers in one table

LayerWhat it limitsReal example
Abuse filter before the AI callPaying for abusive messages and their repliesDar El Ahram book assistant
Screening with a pauseRepeated harmful or injection attemptsNilex website: 3 flags pause the conversation for 1 hour
Characters per messageVery long pasted textsNilex website: 800 characters
Messages per conversationEndless conversationsNilex website: 30 messages
Messages per visitor (short window)Bursts and scriptsNilex website: per 5 minutes
Messages per visitor (daily)Steady overuse by one visitorNilex website: per day
Site-wide daily capMany visitors at onceNilex website; Bashayer El Khair daily cost limits
Monthly usage capThe total monthly billDar El Ahram book assistant

How do you choose the numbers?

There is no universal right value; the limits should follow what a genuine customer needs. A practical way to set them:

  1. Look at a real conversation. How many messages does a serious customer need to reach a decision or a hand-off? Set the conversation limit comfortably above that.
  2. Look at a real question. How long is a normal question in your business? Set the character limit so real questions fit and pasted documents do not.
  3. Decide the monthly budget first, then derive the daily cap from it, so one busy day cannot spend the month.
  4. Review after launch. If genuine customers hit a limit, raise it; if the cap is reached by abuse, tighten the filter.

An illustrative example, with numbers that are not from any client: if you decide the assistant should handle at most 3,000 conversations a month, a daily cap of about 100 conversations keeps an unusual day from using up the month. With a 30-message limit per conversation, you also know the most messages any one of those conversations can send.

Limits without annoying real customers

Limits only work if genuine customers rarely meet them. A few practices help:

  • Make the hand-off the natural end. On our site, the assistant offers WhatsApp, a call-back form that creates a CRM lead, and the contact page. A customer who reaches the end of a conversation should be on the way to a person, not stuck.
  • Ask good questions early. An assistant that asks one short question at a time reaches the answer in fewer messages, which helps the customer and the budget at the same time.
  • Keep replies focused. Our sales assistant suggests two or three follow-up questions after each answer, which keeps the conversation on useful topics.
  • Explain the limit when it applies. As general advice, a clear message that the limit was reached, with the way to reach your team, is better than an error.

A cost-control checklist for business owners

Ask your developerGood answer
Which messages never reach the AI model?Abusive and harmful messages are filtered first
What is the maximum length of one message?A fixed character limit, such as 800
How many messages can one conversation have?A fixed number, such as 30
Can one visitor send unlimited messages?No: limits per few minutes and per day
What is the most the assistant can cost in a day or a month?A site-wide daily cap and a monthly cap you agreed
What happens to someone who keeps attacking it?Flags pause the conversation
Where does the customer go when a limit is reached?To a person: WhatsApp, a call-back form or the contact page

Cost control sits next to the other guardrails, such as price checks and personal data handling, described in keeping a store chatbot honest.

How Nilex helps

When you plan an assistant with us through our AI business chatbot service, these layers are the questions to settle: what is filtered before the AI call, the message and conversation limits, and the daily or monthly cap. Our article on the chatbots Nilex builds shows the four assistants and their limits side by side, and the legal book assistant case study tells the Dar El Ahram story. If you are planning an assistant or worried about an existing one, contact us.

Frequently asked questions

What happens when the monthly cap is reached?

A cap is meant as a ceiling: once it is reached, no further AI calls are made in that period, so the bill stays within the amount set. How the site responds to visitors at that point, such as pointing them to your team, should be decided when the assistant is set up.

Will message limits cost me sales?

Not if the numbers follow real use. On our site, 30 messages per conversation is enough to understand a business and recommend a system, and the conversation then moves to a person through WhatsApp, a call-back form or the contact page.

Why filter abuse before the AI call instead of letting the model refuse?

Because a refusal from the model is still a paid request. Filtering abusive messages on your own server first, as Dar El Ahram's assistant does, means you never pay for them.

Should every chatbot use the same limits?

No. A sales assistant, a book recommender and an appliance advisor have different conversations. The layers are the same; the numbers should follow how your customers actually talk to you.

Do cost limits affect privacy?

They are separate controls, but they belong together. On our site, card numbers, national IDs, IBANs and passwords are removed before a message is stored or sent to the model, and conversations are kept for 90 days.

LET'S BUILD

YOUR VISION.
OUR TECHNOLOGY.

Tell us what your business needs. We'll build the system around it.

START A CONVERSATION →

or email us at info@nilexdigitalsystems.com