When using an API key for your chatbot, one of your first concerns might be unexpected costs.
There are two steps you can take to set limits and prevent overuse of your API key.
Set a budget via the AI platform
First, each AI provider has a monthly spend limit built into their platform.
This budget is based on real money i.e. you can set a budget of $50/month, and if your API key ever hits that limit, it will be disabled until the following month.
This is the best guardrail for ensuring your API never gets overused.
Set a token budget with Resolver
As an additional precaution, Resolver includes an option to set a monthly token spend limit.
Please note that unlike the financial limit available via your AI platform, this limit is based purely on how many input and output tokens are used. There are two reasons why you would use this option.
First, you might find peace of mind in having multiple guardrails to prevent overuse. Secondly, you may be using this same API key for other plugins. The limit in Resolver allows you to set a limit for it independently of any other plugins on your site that may be sharing this API key.
You can find the option to set a monthly token budget at the bottom of the Token Usage menu.

With this option, you can set a hard limit on how many chat tokens Resolver will use before auto-disabling itself. If the number of tokens used exceeds the limit, it will stop displaying on the site until the 1st of the next month.
You can also enable email alerts when you are approaching your limit. When enabled, you’ll receive an email notification when the usage reaches 80% and 100% for the month.

We are not able to accurately calculate the cost because the AI APIs do not provide this information. This is why there is a token limit instead of a spend limit.
Embedding tokens do not count towards the limit
The monthly token limit only applies to input and output tokens. It’s designed this way for two reasons.
First, input and output tokens are the ones used by your chatbot each time it answers a question. This makes them the tokens that are potentially vulnerable to abuse. Conversely, you have full control over how often embedding tokens are used since they are only spent when training content.
Second, embedding tokens are exceedingly cheap. For instance, you can likely train over 1,000 pages for $0.01. It is unlikely you will ever spend a material amount of money on training.
Are there any protections for spam & abuse?
Yes, Resolver employs a variety of techniques to protect against spam submissions that could eat up your tokens.
