The Azure OpenAI Image Token Calculator is a simple application designed to estimate the number of tokens and the cost associated with processing images using Azure OpenAI's multimodal models, such as GPT-5, GPT-4.1, o-series, GPT-4o, and Computer Use. This tool helps users understand the how the tokens and cost is calculated based on the selected model's specifications and the number of images to be processed.
Use the app: https://jamesmcroft.github.io/openai-image-token-calculator/
- Select a Model: Choose a model from the dropdown menu.
- Add Images: Input the height and width of the images you will process in a single request. A multiplier can be applied also if you are processing many images of the same size.
- Calculate: Click the "Calculate" button to get the token and cost estimates.
- View Results: The results will display the token estimate and cost estimate based on the selected model.
- Node.js installed on your machine (recommend using the LTS version)
-
Clone the repository:
git clone https://github.com/jamesmcroft/openai-image-token-calculator.git cd openai-image-token-calculator -
Install the dependencies:
npm install
-
Start the development server:
npm run dev
-
Open your browser and navigate to the local server address (usually
http://localhost:5173).
To build the application for production, run the following command:
npm run buildThis will create a dist directory containing the compiled application.
Contributions, issues and feature requests are welcome!
Feel free to check the issues page. You can also take a look at the contributing guide.
We actively encourage you to jump in and help with any issues, and if you find one, don't forget to log it!
As many developers know, projects like this are built and maintained in maintainers' spare time. If you find this project useful, please Star the repo.
👤 James Croft
- Website: https://www.jamescroft.co.uk
- GitHub: @jamesmcroft
- LinkedIn: @jmcroft
This project is made available under the terms and conditions of the MIT license.