tokencost

To calculate token and translated USD cost of string and message calls to OpenAI, for example when used by AI agents

Installation

In a virtualenv (see these instructions if you need to create one):

pip3 install tokencost

Releases

Version Released Bullseye
Python 3.9
Bookworm
Python 3.11
Files
0.1.24 2025-06-24
0.1.23 2025-06-09
0.1.22 2025-05-23
0.1.21 2025-05-11
0.1.20 2025-03-29    
0.1.19 2025-03-21    
0.1.18 2025-02-11    
0.1.17 2024-11-16    
0.1.16 2024-10-30    
0.1.15 2024-10-27    
0.1.14 2024-10-17    
0.1.12 2024-07-25    
0.1.11 2024-06-21    
0.1.10 2024-06-15  
0.1.9 2024-06-04    
0.1.8 2024-05-22    
0.1.7 2024-03-27    
0.1.6 2024-03-27    
0.1.5 2024-03-27    
0.1.3 2024-03-26    
0.1.2 2024-02-06    
0.1.1 2024-02-06    
0.1.0 2024-01-31    
0.0.5 2024-01-04    
0.0.4 2024-01-04    
0.0.3 2024-01-04    
0.0.2 2023-12-26    

Issues with this package?

Page last updated 2025-06-24 22:29:26 UTC