Skip to content

Llama Nemotron Rerank 1B v2 ​

Preview

Available in Preview since 9 October 2026.

Overview ​

The Rerank API allows you to rerank a list of documents by their relevance to a query. Given a query and a list of documents, the model returns a relevance score for each query-document pair, with results sorted by relevance score descending. These scores can be used in semantic search, retrieval pipelines, and Retrieval-Augmented Generation (RAG) use cases to surface the most relevant documents before passing them to a generative model.

The API is compatible with the Jina AI rerank API and the Cohere rerank API interface, and also provides an endpoint to list available models. For more details on the underlying scoring implementation, consult the vLLM scoring documentation.

Key Features ​

  • Provider: NVIDIA
  • Stage: Preview (available from 9 October 2026)
  • Model: 1B-parameter cross-encoder text reranker
  • API Compatibility: Jina AI and Cohere rerank API interfaces
  • Model Card: nvidia/llama-nemotron-rerank-1b-v2

Endpoints ​

1. Create Rerank ​

POST /v1/rerank

Description ​

Reranks documents by relevance to a query using nvidia/llama-nemotron-rerank-1b-v2. The model returns a relevance score for each query-document pair, sorted by relevance score descending.

Request Body ​

json
{
  "model": "nvidia/llama-nemotron-rerank-1b-v2",
  "query": "What is the capital of France?",
  "documents": [
    "The capital of Brazil is Brasilia.",
    "The capital of France is Paris.",
    "Horses and cows are both animals"
  ],
  "top_n": 2
}
FieldTypeRequiredDescription
modelstringYesID of the model to use. The supported model is nvidia/llama-nemotron-rerank-1b-v2.
querystringYesThe query to rerank documents against.
documentsstring/arrayYesA single document or a list of documents to rerank. Each document is a string.
top_nintegerNoThe number of top results to return after sorting by relevance. 0 (default) means all documents are returned.

Response ​

json
{
  "id": "rerank-fae51b2b664d4ed38f5969b612edff77",
  "model": "nvidia/llama-nemotron-rerank-1b-v2",
  "usage": {
    "prompt_tokens": 56,
    "total_tokens": 56
  },
  "results": [
    {
      "index": 1,
      "document": {
        "text": "The capital of France is Paris."
      },
      "relevance_score": 0.99853515625
    },
    {
      "index": 0,
      "document": {
        "text": "The capital of Brazil is Brasilia."
      },
      "relevance_score": 0.0005860328674316406
    }
  ]
}
FieldTypeDescription
idstringThe unique identifier for the rerank request.
modelstringThe name of the model used for reranking.
usageobjectToken usage details (prompt_tokens, total_tokens).
resultsarrayThe reranked results, sorted by relevance_score descending and truncated to top_n if set.
results[].indexintegerThe original position of the document in the input documents list.
results[].document.textstringThe document text.
results[].relevance_scorenumberThe relevance score of the document for the given query.

2. List Models ​

GET /v1/models

Description ​

Lists all available models and their metadata.

Response ​

json
{
  "object": "list",
  "data": [
    {
      "id": "nvidia/llama-nemotron-rerank-1b-v2",
      "object": "model",
      "created": 1751959070,
      "owned_by": "NVIDIA"
    }
  ]
}
FieldTypeDescription
idstringModel identifier.
objectstringAlways "model".
createdintegerUnix timestamp of model creation.
owned_bystringOrganization owning the model.

Example Code Snippets ​

Note:
The production URL for this API is available in the corresponding plan for this model in the Digital Marketplace. To retrieve the URL:

  1. Navigate to the Digital Marketplace.
  2. Go to the Documentation section.
  3. Select the plan associated with the Llama Nemotron Rerank 1B v2 model.
  4. Locate the production URL provided in the plan details.
  5. Set up the environment variable API_URL to the production URL retrieved.

How to retrieve the production URL

1. Using curl ​

Create Rerank ​

bash
curl -X POST $API_URL/v1/rerank \
-H "Authorization: Bearer $YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
  "model": "nvidia/llama-nemotron-rerank-1b-v2",
  "query": "What is the capital of France?",
  "documents": [
    "The capital of Brazil is Brasilia.",
    "The capital of France is Paris.",
    "Horses and cows are both animals"
  ],
  "top_n": 2
}'

List Models ​

bash
curl -X GET $API_URL/v1/models \
-H "Authorization: Bearer $YOUR_API_KEY"

2. Using Python ​

Create Rerank ​

python
import os
import requests

url = os.getenv("API_URL") + "/v1/rerank"

response = requests.post(
    url,
    headers={
        "Authorization": f"Bearer {os.getenv('YOUR_API_KEY')}",
        "Content-Type": "application/json",
    },
    json={
        "model": "nvidia/llama-nemotron-rerank-1b-v2",
        "query": "What is the capital of France?",
        "documents": [
            "The capital of Brazil is Brasilia.",
            "The capital of France is Paris.",
            "Horses and cows are both animals",
        ],
        "top_n": 2,
    },
)

print(response.json())

List Models ​

python
import os
import requests

url = os.getenv("API_URL") + "/v1/models"

response = requests.get(
    url,
    headers={"Authorization": f"Bearer {os.getenv('YOUR_API_KEY')}"},
)

print(response.json())

Replace $YOUR_API_KEY with your actual API key to authenticate the requests. You can follow the procedure in Inference Endpoints Overview