GoodMemGoodMem
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

Reranker configuration details

displayNamestring

User-facing name of the reranker

Example"BGE Cross-Encoder Reranker"
Length1 <= length <= 255
description?string | null

Description of the reranker

Example"BAAI BGE reranker for cross-encoder semantic ranking"
providerTypeProviderType

Type of reranking provider

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

API endpoint URL

Example"http://bge.reranker.goodmem.ai:8010"
apiPath?string | null

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

Example"/rerank"
modelIdentifierstring

Model identifier

Example"BAAI/bge-reranker-base"
supportedModalities?array<Modality> | null

Supported content modalities (defaults to TEXT if not provided)

Default["TEXT"]
credentials?EndpointAuthentication | null

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

Example{"kind":"CREDENTIAL_KIND_API_KEY","apiKey":{"inlineSecret":"sk-reranker-api-key"}}
labels?object | null

User-defined labels for categorization

Example{"environment":"production","team":"search"}
Propertiesproperties <= 20

Empty Object

version?string | null

Version information

Example"1.0.0"
monitoringEndpoint?string | null

Monitoring endpoint URL

Example"https://monitoring.example.com/rerankers/status"
ownerId?string | null

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

Example"550e8400-e29b-41d4-a716-446655440000"
Formatuuid
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.

Example"550e8400-e29b-41d4-a716-446655440000"
Formatuuid

Response Body

curl -X POST "https://loading/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"
  ],
  "credentials": {
    "kind": "CREDENTIAL_KIND_UNSPECIFIED",
    "apiKey": {
      "inlineSecret": "sk-1234567890abcdef",
      "secretRef": {
        "uri": "vault://path/to/secret",
        "hints": {
          "property1": "string",
          "property2": "string"
        }
      },
      "headerName": "Authorization",
      "prefix": "Bearer "
    },
    "gcpAdc": {
      "scopes": [
        "https://www.googleapis.com/auth/cloud-platform"
      ],
      "quotaProjectId": "my-quota-project"
    },
    "labels": {
      "property1": "string",
      "property2": "string"
    }
  },
  "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