Skip to main content
The TypeScript SDK and docs are currently in beta. Report issues on GitHub.
A single rerank result

Example Usage

import { Result } from "@openrouter/sdk/models/operations";

let value: Result = {
  document: {
    text: "Paris is the capital of France.",
  },
  index: 0,
  relevanceScore: 0.98,
};

Fields

FieldTypeRequiredDescriptionExample
documentoperations.Document:heavy_check_mark:The document object containing the original text
indexnumber:heavy_check_mark:Index of the document in the original input list0
relevanceScorenumber:heavy_check_mark:Relevance score of the document to the query0.98