Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Roughly speaking, words or word parts. Open AI has an explainer:

https://help.openai.com/en/articles/4936856-what-are-tokens-...

You can also check your input using their tokenizer: https://platform.openai.com/tokenizer

So, your example is ~9 tokens



So does the response count towards the token count?


It does, yeah. It's tokens "processed", meaning request & response. The API response will give you a total token count so you can keep track




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: