GoodMem
ReferenceAPIREST APIRerankers

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.

POST
/v1/rerankers
x-api-key<token>

In: header

Reranker configuration details

displayNamestring

User-facing name of the reranker

Length1 <= length <= 255
description?string | null

Description of the reranker

providerTypeProviderType

Type of reranking provider

Value in"OPENAI" | "VLLM" | "TEI" | "LLAMA_CPP" | "VOYAGE" | "COHERE" | "JINA"
endpointUrlstring

API endpoint URL

apiPath?string | null

API path for reranking request (defaults: Cohere /v2/rerank, Jina /v1/rerank, others /rerank)

modelIdentifierstring

Model identifier

supportedModalities?array<Modality> | null

Supported content modalities (defaults to TEXT if not provided)

credentials?EndpointAuthentication

Structured credential payload describing how to authenticate with the provider. Required for SaaS providers; optional for local deployments.

labels?object | null

User-defined labels for categorization

Propertiesproperties <= 20

Empty Object

version?string | null

Version information

monitoringEndpoint?string | null

Monitoring endpoint URL

ownerId?string | null

Optional owner ID. If not provided, derived from the authentication context. Requires CREATE_RERANKER_ANY permission if specified.

rerankerId?string | null

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"
}
Empty
Empty
Empty
Empty