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 { AnnotationAddedEvent } from "@openrouter/sdk/models";

let value: AnnotationAddedEvent = {
  annotation: {
    fileId: "file-abc123",
    filename: "research_paper.pdf",
    index: 0,
    type: "file_citation",
  },
  annotationIndex: 601849,
  contentIndex: 735383,
  itemId: "<id>",
  outputIndex: 124913,
  sequenceNumber: 0,
  type: "response.output_text.annotation.added",
};

Fields

FieldTypeRequiredDescriptionExample
annotationmodels.OpenAIResponsesAnnotation:heavy_check_mark:N/A{"file_id": "file-abc123","filename": "research_paper.pdf","index": 0,"type": "file_citation"}
annotationIndexnumber:heavy_check_mark:N/A
contentIndexnumber:heavy_check_mark:N/A
itemIdstring:heavy_check_mark:N/A
outputIndexnumber:heavy_check_mark:N/A
sequenceNumbernumber:heavy_check_mark:N/A
type”response.output_text.annotation.added”:heavy_check_mark:N/A