---
title: "Does the Grok API include usage details at the end of a stream?"  
description: "Does the Grok API include usage details at the end of a stream?"  
author: "Magdalena Michalska"  
published: 2026-10-15  
updated: 2026-10-15  
canonical: https://www.mindstick.com/forum/162410/does-the-grok-api-include-usage-details-at-the-end-of-a-stream  
category: "Grok API"  
tags: ["grok", "xAI", "api(s)", "streaming"]  
reading_time: 1 minute  

---

# Does the Grok API include usage details at the end of a stream?

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.


---

Original Source: https://www.mindstick.com/forum/162410/does-the-grok-api-include-usage-details-at-the-end-of-a-stream

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
