Get Started
Developer Guide
- Supported Models
- Supported APIs
- Cost Tracking
MCP Server
- Overview of MCP
- Registration and Authentication
- MCP Server Chat API
- Playground
- MCP Gateway
- Example MCP Servers
Configure Gateway
- Access Control
- Rate Limiting
- Budget Limiting
- Load Balancing
- Fallback
- Guardrails
Observability
Deployment
Embeddings
Rerank
Responses
Audio
Moderations
Rerank
Rerank Documents
Rerank documents based on the given query and parameters.
POST
/
v2
/
rerank
Copy
Ask AI
curl --request POST \
--url https://{controlPlaneURL}/api/llm/api/inference/openai/v2/rerank \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "<string>",
"messages": [
{
"role": "system",
"content": "<string>",
"name": "<string>"
}
],
"tools": [
{
"type": "<string>",
"function": {
"name": "<string>",
"description": "<string>",
"parameters": {}
}
}
],
"tool_choice": "none",
"temperature": 123,
"top_p": 123,
"top_k": 123,
"n": 123,
"stream": true,
"logprobs": true,
"stop": "<string>",
"max_tokens": 123,
"presence_penalty": 123,
"frequency_penalty": 123,
"logit_bias": {},
"user": "<string>",
"query": "<string>",
"documents": [
"<string>"
],
"top_n": 123,
"max_tokens_per_doc": 123
}'
Copy
Ask AI
{
"id": "<string>",
"results": [
{
"index": 123,
"relevance_score": 123
}
]
}
Authorizations
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Headers
Optional metadata for the request
Body
application/json
Parameters for reranking documents.
The body is of type object
.
Response
200
application/json
Documents reranked successfully.
The response is of type object
.
Was this page helpful?
Copy
Ask AI
curl --request POST \
--url https://{controlPlaneURL}/api/llm/api/inference/openai/v2/rerank \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "<string>",
"messages": [
{
"role": "system",
"content": "<string>",
"name": "<string>"
}
],
"tools": [
{
"type": "<string>",
"function": {
"name": "<string>",
"description": "<string>",
"parameters": {}
}
}
],
"tool_choice": "none",
"temperature": 123,
"top_p": 123,
"top_k": 123,
"n": 123,
"stream": true,
"logprobs": true,
"stop": "<string>",
"max_tokens": 123,
"presence_penalty": 123,
"frequency_penalty": 123,
"logit_bias": {},
"user": "<string>",
"query": "<string>",
"documents": [
"<string>"
],
"top_n": 123,
"max_tokens_per_doc": 123
}'
Copy
Ask AI
{
"id": "<string>",
"results": [
{
"index": 123,
"relevance_score": 123
}
]
}
Assistant
Responses are generated using AI and may contain mistakes.