The TypeScript SDK and docs are currently in beta.
Report issues on GitHub.
Supported Types
models.FileCitation
const value: models.FileCitation = {
type: "file_citation",
fileId: "file-abc123",
filename: "research_paper.pdf",
index: 0,
};
models.URLCitation
const value: models.URLCitation = {
type: "url_citation",
url: "https://openrouter.ai/docs",
title: "OpenRouter Documentation",
startIndex: 0,
endIndex: 42,
};
models.FilePath
const value: models.FilePath = {
type: "file_path",
fileId: "file-xyz789",
index: 0,
};