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

Example Usage

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

let value: OpenResponsesStreamEventResponseOutputTextAnnotationAdded = {
  type: "response.output_text.annotation.added",
  outputIndex: 0,
  itemId: "item-1",
  contentIndex: 0,
  sequenceNumber: 5,
  annotationIndex: 0,
  annotation: {
    type: "url_citation",
    url: "https://example.com",
    title: "Example",
    startIndex: 0,
    endIndex: 7,
  },
};

Fields

FieldTypeRequiredDescription
type”response.output_text.annotation.added”:heavy_check_mark:N/A
outputIndexnumber:heavy_check_mark:N/A
itemIdstring:heavy_check_mark:N/A
contentIndexnumber:heavy_check_mark:N/A
sequenceNumbernumber:heavy_check_mark:N/A
annotationIndexnumber:heavy_check_mark:N/A
annotationmodels.OpenAIResponsesAnnotation:heavy_check_mark:N/A