API Limit for public number
# support
w
We want to put a phone number on our website that people can call to try our the voice AI agent - but there will be some API costs for that. Is there a way we can limit: - preferably by phone number - or any other limit that people don't missuse it?
v
Hi @wielki asasyn, I'm an AI assistant for Vapi. While a team member reviews this question, I'll look through relevant sources and see if I can provide suggestions.
----------------------------- **While I generate an answer, here are some sources that might be helpful**: * [Create Phone Call]() * [List Phone Numbers]() * [Frequently Asked Questions]() * [List Calls]() -----------------------------
### Answer Vapi doesn't directly provide a feature to limit API usage by phone number or through other specific limits in its documentation. However, you may consider implementing application-level controls or logic to monitor and manage usage based on your requirements. This could include setting up your server logic to track call frequencies or durations from specific numbers and apply your own limits or thresholds. For details on managing phone numbers and their configurations, you might find resources like [Buy Phone Number]() [(1)]() , [Update Phone Number]() [(2)]() , and [Delete Phone Number]() [(3)]() useful for managing phone numbers in Vapi. For broader control and management of your Vapi setup, reviewing the documentation on [Assistants]() [(4)]() and [Calls]() [(5)]() might also be beneficial. Remember, directly managing API limits or implementing specific usage cap features would likely involve developing custom logic within your application infrastructure, possibly using the server URLs and metadata features provided by Vapi for deeper integration and control.
Got it. Tagging @User for additional help.
s
Through coding you restrict the users on the basis of phone number.
g
I am thinking about this too, you need to send the numbers that call into some database and log how many calls they have made and when they reach like 5 calls you deny the request then put that logic before each call.
s
This logic will have loopholes like if they never cut the phone then you will charged with a lot of money. In order to overcome this you might need to add maxDuration parameter.
w
It's not about the amount of calls
But how many minutes they spent on the call
The longer they speak, the higher APi costs
s
You can restrict it using this parameter.
g
which is there