When using an AI API, even small differences in input tokens, output tokens, or the number of requests can significantly affect the total cost.
I created a simple browser-based API Pricing Simulator to make these calculations easier.
https://uni928.github.io/Uni928PublicHTMLs/index14English.html
What It Can Calculate
The simulator calculates estimated API costs for multiple models based on:
- Input tokens
- Output tokens, including reasoning tokens
- Number of requests per day
- A specific number of requests
The results are divided into three tables:
- Cost per Request
- Monthly Cost (30 Days)
- Cost for a Specific Number of Requests
The daily and monthly summary also shows the estimated request count, such as:
1,000 requests/day
30,000 requests / 30 days
Compare Multiple Models
The tool displays estimated costs for multiple AI models in the same table.
This makes it easier to compare how much the same workload may cost depending on the model you choose.
The calculation formula is also displayed, so the result is not just presented as a final number.
Share the Same Calculation with a URL
The Copy URL button creates a URL containing the current input values.
This is useful when you want to:
- Share a cost estimate with someone else
- Keep a specific calculation for later
- Compare several usage scenarios
No installation is required. Everything runs directly in the browser.
Try It
API Pricing Simulator:
https://uni928.github.io/Uni928PublicHTMLs/index14English.html
I made this mainly as a small utility for quickly estimating API costs before implementing or scaling an AI-powered feature.
For Those Who Want to Review the Code or Prioritize Security
👇 GitHub
https://github.com/uni928/Uni928PublicHTMLs/blob/main/index14English.html
The GitHub source code is available for anyone who would like to inspect it themselves and check whether it contains any malicious or suspicious code.
While this does not guarantee a comprehensive security review, another option is to provide the code to ChatGPT or a similar AI tool and ask it to check for potentially malicious behavior, suspicious network requests, or other security concerns before running it locally.
Top comments (0)