Reranking (Cohere)
OpenAI does not offer a reranking endpoint. IG1 AI uses Cohere's API compatible implementation.
Reranker model currently available on IG1 AI is: bge-reranker-v2-m3.
Endpoint
POST/cohere/v2/rerank
Compatible with Cohere Rerank API.
Request
curl -X POST https://api.ig1.ai/cohere/v2/rerank \
-H "Authorization: Bearer $IG1AI_API_KEY" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{
"model": "bge-reranker-v2-m3",
"query": "What is the capital of the United States?",
"top_n": 3,
"documents": [
"Carson City is the capital city of the American state of Nevada.",
"The Commonwealth of the Northern Mariana Islands is a group of islands in the Pacific Ocean. Its capital is Saipan.",
"Washington, D.C. is the capital of the United States. It is a federal district.",
"Capitalization in English grammar is the use of a capital letter at the start of a word.",
"Capital punishment has existed in the United States since before the United States was a country."
]
}'
Request body
| Parameter | Type | Required | Description |
|---|---|---|---|
model | string | ✅ | bge-reranker-v2-m3 |
query | string | ✅ | The search query |
documents | array | ✅ | List of document strings to rerank |
top_n | integer | Number of top results to return |