OpenAI-Checker
is a Python script that checks the billing and usage of an OpenAI API key and determines whether it can access the GPT-4 model.
- Python 3.6+
- requests module (can be installed via
pip install requests
) - Can access
api.openai.com
- Clone or download this repository to your local machine.
- Install the required dependencies.
- Add your OpenAI API keys to a file named
apikey.txt
, with each key on a separate line. - Run the script by typing
python main.py
in your terminal.
The script will output the total amount, total usage, remaining amount, and whether the API key can access the GPT-4 model for each key in the apikey.txt
file.
$ python main.py
[*]Total amount: 5.00 USD
[*]Total usage: 0.00 USD
[*]Remaining amount: 5.00 USD
[-]API Key: sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx cannot access GPT-4
This project is licensed under the MIT License - see the LICENSE file for details.
This project includes code that was developed with the assistance of ChatGPT, a language model developed by OpenAI based on the GPT-3.5 architecture.
The following projects were referenced during the development of this project:
- openai-billing - [Reference was made to this project for the balance inquiry code]