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

# Qwen3 Reranker

> Rank search results and score relevance with Qwen3 Reranker 0.6B hosted on Prime Inference

Qwen3 Reranker 0.6B is Qwen's open-weights reranking model. It reads a query and a document and returns the probability that the document is relevant. Use it to reorder the results of a keyword or embedding search before you show them or pass them to a language model. Prime Inference serves it on Prime infrastructure as a [hosted model](https://docs.primeintellect.ai/inference/overview.md#hosted-and-gateway-models).

| | Qwen3 Reranker 0.6B on Prime Inference |
| - | - |
| Model ID | `qwen/qwen3-reranker-0.6b` |
| Input | Text |
| Output | A relevance probability per document |
| Context window | 32,768 tokens per prompt, which holds the instruction, the query, one document and the prompt template |
| Endpoints | [Rerank API](https://docs.primeintellect.ai/api-reference/inference-rerank.md) and [Classify API](https://docs.primeintellect.ai/api-reference/inference-classify.md) |

The model scores each document in its own prompt, together with the query and an instruction. A request can rank up to 1,000 documents. See the [model catalog](https://app.primeintellect.ai/dashboard/inference?tab=models) or the [Models API](https://docs.primeintellect.ai/api-reference/inference-models.md) for current pricing and availability.

## Use Prime Inference

The model doesn't take Chat Completions requests. Create a Prime API key with **Inference** permission in the [API keys guide](https://docs.primeintellect.ai/api-reference/api-keys.md), then call the Rerank API:

```bash theme={null}
export PRIME_API_KEY="your-api-key"

curl https://api.pinference.ai/api/v1/rerank \
  -H "Authorization: Bearer $PRIME_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "qwen/qwen3-reranker-0.6b",
    "query": "How do I rotate an API key?",
    "documents": [
      "To rotate a key, create a new key, update your clients, then delete the old key.",
      "API keys can be scoped to a single team."
    ]
  }'
```

The response lists the documents most relevant first, each with its `index` in the request and a `relevance_score` from 0 to 1. To charge a team instead of your personal account, add `-H "X-Prime-Team-ID: your-team-id"`. Keep API keys server-side.

## Write an instruction

The model reads a one-line instruction with every document. The default, `Given a web search query, retrieve relevant passages that answer the query`, suits search. For a different task, set `instruction` in the same pattern, `Given a <kind of query>, retrieve <kind of document> that <relation to the query>`:

```json theme={null}
{
  "model": "qwen/qwen3-reranker-0.6b",
  "instruction": "Given a bug report, retrieve past issues that describe the same bug",
  "query": "Checkout returns a 500 error after the card is charged.",
  "documents": ["...", "..."]
}
```

To change the rest of the prompt as well, format the prompts yourself and send them to the [Classify API](https://docs.primeintellect.ai/api-reference/inference-classify.md).


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