Users Pricing

forum

Home Forums Does the Grok API include usage details at the end of a stream? – MindStick

Does the Grok API include usage details at the end of a stream?

Magdalena Michalska 53 15 Oct 2026

I’m testing streamed responses from the Grok API and need to record token usage for each request. With a non-streaming response, usage information is straightforward to log; with streaming, I’m not sure what the final event is expected to contain.

For those who have built against the API, does the stream include final usage details by default, or is there a request option or follow-up step needed? I’d also like to know how you handle a client disconnecting before the stream finishes, since that could leave usage records incomplete.


0 Answers

Markdown for AI

A clean, structured version of this page for AI assistants and LLMs.

Open .md