> ## Documentation Index
> Fetch the complete documentation index at: https://docs.textql.com/llms.txt
> Use this file to discover all available pages before exploring further.

# streamChat

> Run-scoped cell firehose that ends when the run does.

```typescript theme={null}
streaming.chats.streamChat(request, options?) → AsyncIterable<Cell>
```

Cells only, no lifecycle events: the stream ends when the run completes. Also
starts a run for a pending message when none is active. Right for one-shot
scripts; UIs should prefer [watchChat](/api-reference/sdk/streaming/watch-chat).

## Example

```typescript theme={null}
import { Textql } from "@textql/sdk";
import { createStreamingClient } from "@textql/sdk/streaming";

const client = new Textql({ apiKey, serverURL: "https://app.textql.com/rpc/public" });
const streaming = createStreamingClient({ apiKey });

const sent = await client.chats.send({ body: { chatId, message: "..." } });

for await (const cell of streaming.chats.streamChat({
  chatId,
  latestCompleteCellId: sent.cellId,
})) {
  render(cell); // typed Cell — loop exits when the run completes
}
```

## Request

| Field | Type | Notes |
| - | - | - |
| `chatId` | `string` | required |
| `latestCompleteCellId` | `string?` | stream cells produced after this one (typically the `cellId` returned by `send`) |
| `model` | `LlmModel?` | override the chat's model for this run |
| `fastMode` | `boolean?` | |
| `maxThinking` | `boolean?` | |
| `research` | `boolean?` | |

## What You Receive

Each item is a [`Cell`](/api-reference/sdk/streaming/cells) snapshot. Cells are
re-sent as they evolve — upsert by `cell.id`.

To stop the run itself (not just your stream), call
[`client.chats.cancelStream`](/api-reference/sdk/chatservice/cancelstream).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.