Create a new reranker
Creates a new reranker configuration for ranking search results. Rerankers represent connections to different reranking API services (like TEI, OpenAI, etc.) and include all the necessary configuration to use them for result ranking.
DUPLICATE DETECTION: Returns HTTP 409 Conflict (ALREADY_EXISTS) if another reranker exists with identical {ownerId, providerType, endpointUrl, apiPath, modelIdentifier, credentialsFingerprint} after URL canonicalization. Uniqueness is enforced per-owner, allowing different users to have identical configurations. Credentials are hashed (SHA-256) for uniqueness while remaining encrypted.
DEFAULTS: apiPath defaults to '/v2/rerank' for Cohere and '/rerank' for other providers if omitted; supportedModalities defaults to [TEXT] if omitted. Requires CREATE_RERANKER_OWN permission (or CREATE_RERANKER_ANY for admin users). This operation is NOT idempotent - each request creates a new reranker record.
In: header
Reranker configuration details
User-facing name of the reranker
1 <= length <= 255Description of the reranker
Type of reranking provider
"OPENAI" | "VLLM" | "TEI" | "LLAMA_CPP" | "VOYAGE" | "COHERE" | "JINA"API endpoint URL
API path for reranking request (defaults: Cohere /v2/rerank, Jina /v1/rerank, others /rerank)
Model identifier
Supported content modalities (defaults to TEXT if not provided)
Structured credential payload describing how to authenticate with the provider. Required for SaaS providers; optional for local deployments.
User-defined labels for categorization
properties <= 20Empty Object
Version information
Monitoring endpoint URL
Optional owner ID. If not provided, derived from the authentication context. Requires CREATE_RERANKER_ANY permission if specified.
Optional client-provided UUID for idempotent creation. If not provided, server generates a new UUID. Returns ALREADY_EXISTS if ID is already in use.
Response Body
curl -X POST "http://localhost:8080/v1/rerankers" \ -H "Content-Type: application/json" \ -d '{ "displayName": "BGE Cross-Encoder Reranker", "description": "BAAI BGE reranker for cross-encoder semantic ranking", "providerType": "TEI", "endpointUrl": "http://bge.reranker.goodmem.ai:8010", "apiPath": "/rerank", "modelIdentifier": "BAAI/bge-reranker-base", "supportedModalities": [ "TEXT" ], "credentials": { "kind": "CREDENTIAL_KIND_API_KEY", "apiKey": { "inlineSecret": "sk-demo-api-key" } }, "labels": { "environment": "production", "team": "search" } }'{
"rerankerId": "550e8400-e29b-41d4-a716-446655440000",
"displayName": "BGE Cross-Encoder Reranker",
"description": "BAAI BGE reranker for cross-encoder semantic ranking",
"providerType": "TEI",
"endpointUrl": "http://bge.reranker.goodmem.ai:8010",
"apiPath": "/rerank",
"modelIdentifier": "BAAI/bge-reranker-base",
"supportedModalities": [
"TEXT"
],
"labels": "{\"environment\": \"production\", \"team\": \"search\"}",
"version": "1.0.0",
"monitoringEndpoint": "https://monitoring.example.com/rerankers/status",
"ownerId": "550e8400-e29b-41d4-a716-446655440000",
"createdAt": "1617293472000",
"updatedAt": "1617293472000",
"createdById": "550e8400-e29b-41d4-a716-446655440000",
"updatedById": "550e8400-e29b-41d4-a716-446655440000"
}