{{base_url}} and {{api_key}}, review the parameters, and send the request.Authorization: Bearer ********************{ "model": "qwen3-rerank", "documents": [ "textsample textmodelsample text and sample text,sample texttextsample texttextsample text", "sample text", "sample textmodelsample texttextsample textmodelsample text" ], "query": "sample texttextsample textmodel", "top_n": 2, "instruct": "Given a web search query, retrieve relevant passages that answer the query." }curl --location '/v1/rerank' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "model": "qwen3-rerank", "documents": [ "textsample textmodelsample text and sample text,sample texttextsample texttextsample text", "sample text", "sample textmodelsample texttextsample textmodelsample text" ], "query": "sample texttextsample textmodel", "top_n": 2, "instruct": "Given a web search query, retrieve relevant passages that answer the query." }'{
"id": "chatcmpl-123",
"object": "chat.completion",
"created": 1677652288,
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "\n\nHello there, how may I assist you today?"
},
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 9,
"completion_tokens": 12,
"total_tokens": 21
}
}