Extra Credit

tokencost

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

$pip install tokencost

Official docs outline

Extra Credit builds an outline of tokencost's docs the first time your work uses it. Until then, start at the official documentation.

All 9,553