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

Token cost is prompt + response. In the case of ChatGPT you don't know the full prompt, but they don't charge by tokens for that app.

In the API you need to tokenize your input and tokenize the output then add the counts together.



Consider applying for YC's Summer 2026 batch! Applications are open till May 4

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

Search: