---
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`

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

## Request body

- RerankRequest
  - `query` string, required
  - `raw_scores` boolean
  - `return_text` boolean
  - `texts` string[], required
  - `truncate` boolean

## Response `200`

Ranks

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

## Other responses

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

## Changes

- **2023-11-20** `d2b376630853` — 1 breaking, 3 warning, 2 info
  - added the new required request property `texts`
  - removed the request property `passages`
  - removed the request property `return_passages`
  - removed the optional property `items/passage` from the response with the `200` status
  - …2 more
- **2023-11-20** `0a226ee52ce3` — 1 info
  - endpoint added
- **2023-10-13** `8c00768ef703` — 1 breaking
  - api path removed without deprecation

[Change history](https://skmtc.dev/huggingface/apis/text-embeddings-inference/changes/rerank/post.md)

---

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