#Chat Completion Price with Streaming = true
1 messages · Page 1 of 1 (latest)
Hi @grand rivet. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
When using the OpenAI API with streaming, you are charged for the tokens you have received so far plus a small number of tokens generated while the system detects you have closed the connection, usually between 7-15 tokens. This is different from non-streaming usage where you are charged for the full generation.
To calculate the cost, you would need to know the number of tokens used in your request and the cost per token. The cost per token can be found on the OpenAI pricing page.
Please note that disconnects and errors in API communications are typically considered losses unless you have a specific agreement to track and reimburse. These agreements are typically offered to high volume users by contractual arrangement.