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

# Delta format

> The chat.completion.chunk object and how deltas accumulate.

Transport: [Server-Sent Events](/api/api-reference/streaming-format/server-sent-events).

## The Chunk

| Field | Type | Notes |
| - | - | - |
| `id` | string | Completion identifier. Stable across the stream. |
| `object` | string | Always `chat.completion.chunk`. |
| `created` | integer | Unix seconds. |
| `model` | string | The model serving the call. |
| `choices` | array | Streamed choices. Each carries `index`, `delta`, `finish_reason`. |
| `usage` | object | Optional. Present only on the trailing usage chunk. See [Stream termination](/api/api-reference/streaming-format/stream-termination). |
| `web_search` | object | Optional. Present when a web search ran. |
| `error` | object | Optional. Present on a mid-stream error chunk. See [Error events](/api/api-reference/streaming-format/error-events). |
| `free_tier` | object | Optional. Present on Free plan-eligible calls. |

## Choice and Delta

| Field | Type | Notes |
| - | - | - |
| `choices[].index` | integer | Choice index (always `0`). |
| `choices[].delta` | object | The incremental update. See below. |
| `choices[].finish_reason` | string or null | `null` until the terminal chunk, then one of `stop`, `length`, `tool_calls`, `error`. See [Finish reasons](/api/api-reference/chat-and-text/finish-reasons). |

### Delta Fields

| Field | Type | Notes |
| - | - | - |
| `role` | string | Optional. `assistant`, sent **once** at the start. |
| `content` | string | Optional. A fragment of the reply to append. |
| `tool_calls` | array | Optional. Tool-call fragments. See [Tool call streaming](/api/api-reference/streaming-format/tool-call-streaming). |
| `reasoning_details` | array | Optional. Reasoning summary fragments. See [Reasoning parameters](/api/api-reference/chat-and-text/reasoning-parameters). |

## Accumulating

The stream is incremental. `role` arrives once on the first delta. `content` arrives as fragments to concatenate in order. `finish_reason` is `null` until the terminal chunk.

```json theme={"theme":{"light":"github-light","dark":"github-dark"}}
{ "id": "...", "object": "chat.completion.chunk", "created": 1751299200, "model": "z-ai/glm-5.2",
  "choices": [ { "index": 0, "delta": { "role": "assistant", "content": "A gateway" }, "finish_reason": null } ] }
```

```json theme={"theme":{"light":"github-light","dark":"github-dark"}}
{ "id": "...", "object": "chat.completion.chunk", "created": 1751299200, "model": "z-ai/glm-5.2",
  "choices": [ { "index": 0, "delta": { "content": " is a single entry point." }, "finish_reason": null } ] }
```

```json theme={"theme":{"light":"github-light","dark":"github-dark"}}
{ "id": "...", "object": "chat.completion.chunk", "created": 1751299200, "model": "z-ai/glm-5.2",
  "choices": [ { "index": 0, "delta": {}, "finish_reason": "stop" } ] }
```

After the terminal chunk come the optional usage chunk and `[DONE]`.

## Related

* [SSE transport](/api/api-reference/streaming-format/server-sent-events)
* [Tool call streaming](/api/api-reference/streaming-format/tool-call-streaming)
* [Error events](/api/api-reference/streaming-format/error-events)
* [Stream termination](/api/api-reference/streaming-format/stream-termination)
* [Finish reasons](/api/api-reference/chat-and-text/finish-reasons)


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