> ## Documentation Index
> Fetch the complete documentation index at: https://docs.novita.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Create rerank

Creates a rerank request.

## Request Headers

**Content-Type** `string` *required*

Enum: `application/json`

**Authorization** `string` *required*

Bearer authentication format, for example: Bearer \{\{API Key}}.

## Request Body

**model** `string` *required*

The name of the model to use.

**query** `string` *required*

The search query.

**documents** `string[]` *required*

Document List.

**top\_n** `integer`

Number of most relevant documents or indices to return.

## Response

**id** `string` *required*

ID

**results** `object[]` *required*

**properties**

**document** `object`

Original document content.

**properties**

**text** `string`

**index** `integer`

The index value of the position in the input candidate doc array.

**relevance\_score** `number`

Similarity score.

**usage** `object`

Token usage statistics.

**properties**

**completion\_tokens** `integer` *required*

The number of tokens in the generated completion.

**prompt\_tokens** `integer` *required*

The number of tokens in the prompt.

**total\_tokens** `integer` *required*

The total number of tokens used in the request (prompt + completion).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.