Reranking
Reranks documents based on their relevance to a query.
Changed onGiven a query and a list of documents, returns the documents ranked by their relevance to the query. The documents are scored and sorted in descending order of relevance.
post/openai/v1/reranking
Request
- Base URLhttps://api.groq.com
- URLhttps://api.groq.com/openai/v1/reranking
- AuthHTTP bearer
Request body
Example request
{
"model": "qwen3-reranker-4b",
"query": "artificial intelligence research",
"docs": [
"Machine learning is a subset of artificial intelligence",
"The weather forecast predicts rain tomorrow",
"Deep learning uses neural networks with multiple layers"
],
"instruction": "Find the most relevant document about AI research"
}Response
OK
Example response
{
"results": [
{
"doc": "Machine learning is a subset of artificial intelligence",
"score": 0.92
}
]
}Changes
- info
endpoint added
- info