AnnotationAddedEvent - TypeScript SDK

AnnotationAddedEvent type definition

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

1import { AnnotationAddedEvent } from "@openrouter/sdk/models";
2
3let value: AnnotationAddedEvent = {
4 annotation: {
5 fileId: "file-abc123",
6 filename: "research_paper.pdf",
7 index: 0,
8 type: "file_citation",
9 },
10 annotationIndex: 601849,
11 contentIndex: 735383,
12 itemId: "<id>",
13 outputIndex: 124913,
14 sequenceNumber: 0,
15 type: "response.output_text.annotation.added",
16};

Fields

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