Skip to main content
The TypeScript SDK and docs are currently in beta. Report issues on GitHub.
Event emitted when a text delta is streamed

Example Usage

import { TextDeltaEvent } from "@openrouter/sdk/models";

let value: TextDeltaEvent = {
  contentIndex: 391056,
  delta: "<value>",
  itemId: "<id>",
  logprobs: [
    {
      logprob: -0.5,
      token: "Hello",
    },
  ],
  outputIndex: 776894,
  sequenceNumber: 0,
  type: "response.output_text.delta",
};

Fields

FieldTypeRequiredDescription
contentIndexnumber:heavy_check_mark:N/A
deltastring:heavy_check_mark:N/A
itemIdstring:heavy_check_mark:N/A
logprobsmodels.StreamLogprob[]:heavy_check_mark:N/A
outputIndexnumber:heavy_check_mark:N/A
sequenceNumbernumber:heavy_check_mark:N/A
type”response.output_text.delta”:heavy_check_mark:N/A