---
title: "Rerank documents (Vertex Rank)"
method: POST
path: "/genai/v1/rank"
tags: ["GenAI Integration"]
---

# Rerank documents (Vertex Rank)

`POST /genai/v1/rank`

Reranks records using Google Vertex AI's Ranking API. The request body
follows the Vertex `rankRecords` schema.

## Request body

- object
  - `model` string — Vertex ranking model identifier.
  - `query` string
  - `records` object[]
    - `id` string
    - `title` string
    - `content` string
  - `topN` integer
  - `ignoreRecordDetailsInResponse` boolean

## Response `200`

Successful response

- object

## Other responses

- `400` — Bad request
- `500` — Internal server error

---

[API](https://skmtc.net/getbifrost/apis/bifrost-api.md) · [All operations](https://skmtc.net/getbifrost/apis/bifrost-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/getbifrost/bifrost-api/versions/f8cab88f64ea/schema)
