---
title: "Get Ranks. Returns a 424 status code if the model is not a Sequence Classification model with"
method: POST
path: "/rerank"
tags: ["Text Embeddings Inference"]
---

# Get Ranks. Returns a 424 status code if the model is not a Sequence Classification model with

`POST /rerank`

a single class.

## Request body

- RerankRequest
  - `query` string, required
  - `raw_scores` boolean
  - `return_text` boolean
  - `texts` string[], required
  - `truncate` boolean, nullable
  - `truncation_direction` 'Left' | 'Right'

## Response `200`

Ranks

- Rank[]
  - `index` integer, required
  - `score` number, float, required
  - `text` string, nullable

## Other responses

- `400` — Batch is empty
- `413` — Batch size error
- `422` — Tokenization error
- `424` — Rerank Error
- `429` — Model is overloaded

---

[API](https://skmtc.net/huggingface/apis/text-embeddings-inference.md) · [All operations](https://skmtc.net/huggingface/apis/text-embeddings-inference/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/huggingface/text-embeddings-inference/revisions/f4c15add6d2b/schema)
