Is there any way to get the all request by an API ...
# support
m
I want to calculate the cost per customer for API key use How I can determine that ?
v
@mauryasumit To calculate the cost per customer for API key use, you would typically need to track the number of API requests made by each customer and then apply the cost rate for each request. Here's a general approach to determine the cost per customer: 1. **Track API Usage**: Ensure that you have a system in place to track the number of API requests made by each customer. This could involve logging each request with a customer identifier. 2. **Determine Cost Rates**: Know the cost rate per API request. This could be a flat rate or vary based on the type of request or the level of service. 3. **Calculate Total Cost**: Multiply the number of requests by the cost rate to get the total cost for each customer. 4. **Report and Billing**: Generate reports for each customer's API usage and apply the total cost to their bill. If you're using VAPI, the billing is designed to "just work", meaning that VAPI will handle the API requests and bill you directly at-cost if no key is found on-file for the provider. You would then need to pass this cost on to your customers accordingly. If you need assistance with tracking or calculating costs using VAPI's system specifically, please let me know, and I can provide more detailed support or direct you to the right resources.
You can continue this conversation by mentioning me in the message.
Got it. Tagging @User for additional help.
m
Hello Team, I’m working on creating a public API for each customer on our platform, which will be used to power our widget. While this approach works well for integrating the widget, I’ve identified a potential issue: The API key used for the widget is exposed publicly. This means we can track its usage when it’s invoked legitimately via the widget. However, if someone uses the API externally (outside the widget context), we won’t be able to determine or control that unauthorized usage. To address this, we need a solution that: Allows us to distinguish between legitimate widget requests and external API calls. Provides a way to restrict or monitor unauthorized external use. I’d appreciate your thoughts on how best to implement this. Possible approaches could include token-based validation, referer checks, or other measures to enhance security while maintaining usability for the widget. Looking forward to your feedback.
3 Views