https://github.com/p1ayer-1/chatgpt-web-vs-api-pricing
Count tokens to determine cost differential of ChatGPT Plus subscription and ChatGPT API
https://github.com/p1ayer-1/chatgpt-web-vs-api-pricing
chatgpt chatgpt-api chatgpt-chat-history chatgpt-history chatgpt-plus chatgpt4 openai tiktoken
Last synced: 5 months ago
JSON representation
Count tokens to determine cost differential of ChatGPT Plus subscription and ChatGPT API
- Host: GitHub
- URL: https://github.com/p1ayer-1/chatgpt-web-vs-api-pricing
- Owner: P1ayer-1
- License: mit
- Created: 2024-08-28T19:48:57.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-08-28T21:51:21.000Z (almost 2 years ago)
- Last Synced: 2025-10-10T16:02:42.742Z (9 months ago)
- Topics: chatgpt, chatgpt-api, chatgpt-chat-history, chatgpt-history, chatgpt-plus, chatgpt4, openai, tiktoken
- Language: Python
- Homepage:
- Size: 10.7 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ChatGPT-Web-vs-API-pricing
I used this to determine the cost differential between my ChatGPT Plus subscription and the ChatGPT API.
I discovered I could save over $20 monthly by switching to the API.
The tax on the monthly ChatGPT Plus bill would cover an entire month of API usage for me.
Not sure if I'll ever clean this README up. I couldn't find a repo with this exact purpose, so I wanted to share.
### Usage:
1. [Export your conversation](https://help.openai.com/en/articles/7260999-how-do-i-export-my-chatgpt-history-and-data)
2. Extract `conversations.json` to your preferred directory (ex. ./data). It is found in the chatlog export zip file (check your email)
3. Clone this repo with submodules `git clone https://github.com/P1ayer-1/ChatGPT-Web-vs-API-pricing.git`
4. Install requirements `pip install -r requirements.txt`
5. Run `main.py` and pass relevant args. Use `python main.py -h` to explain args
#### Example:
```
python main.py ./data/conversations.json gpt-4o all --return_only
```