Skip to main content
The TypeScript SDK and docs are currently in beta. Report issues on GitHub.
Event emitted when a new output item is added to the response

Example Usage

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

let value: StreamEventsResponseOutputItemAdded = {
  item: {
    content: [
      {
        text: "Hello! How can I help you today?",
        type: "output_text",
      },
    ],
    id: "msg-abc123",
    role: "assistant",
    type: "message",
  },
  outputIndex: 253212,
  sequenceNumber: 0,
  type: "response.output_item.added",
};

Fields

FieldTypeRequiredDescriptionExample
itemmodels.OutputItems:heavy_check_mark:An output item from the response{"content": [{"text": "Hello! How can I help you today?","type": "output_text"}
],
“id”: “msg-abc123”,
“role”: “assistant”,
“status”: “completed”,
“type”: “message”
}
outputIndexnumber:heavy_check_mark:N/A
sequenceNumbernumber:heavy_check_mark:N/A
type”response.output_item.added”:heavy_check_mark:N/A