GoodMemGoodMem
ReferenceAPIREST APIRerankers

Create a new reranker

POST /v1/rerankers: Creates a new reranker configuration for ranking search results.

POST
/v1/rerankers

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 the same effective provider connection and model configuration for this owner after endpoint canonicalization and provider-default resolution. Equivalent credentials participate in the comparison.

DEFAULTS: apiPath defaults to '/v2/rerank' for Cohere and '/rerank' for other providers if omitted; supportedModalities defaults to [TEXT] if omitted.

OWNER DEFAULTS: Owner defaults to the authenticated principal unless ownerId is provided; CREATE_RERANKER is evaluated against the proposed reranker and owner. This operation is NOT idempotent - each request creates a new reranker record.

Authorization

ApiKeyAuth
headerx-api-key<token>

Header Parameters

GoodMem-Timeout-Ms?integer

Optional waiting budget in milliseconds, measured from REST servlet ingress and shared across all internal gRPC calls. Supply one decimal integer from 1 to 86400000. Omission adds no deadline. Existing shorter deadlines still apply. Expiry returns HTTP 504 before streaming starts; after streaming starts, no successful completion event is sent. Use SSE or opt into GoodMem-Stream-Terminal for an explicit terminal outcome. Retrieval work is cooperatively cancelled. An accepted mutation may still commit after timeout or disconnect; a failed response does not imply rollback.

Formatint64
Range1 <= value <= 86400000

Request Body

Reranker configuration details

application/json
  1. body

Request body for creating a new Reranker. A Reranker represents a configuration for reranking search results.

displayName*string

User-facing name of the reranker

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

Description of the reranker

Example"BAAI BGE reranker for cross-encoder semantic ranking"
providerType*ProviderType

Type of reranking provider

Example"TEI"
Value in"VLLM""TEI""LLAMA_CPP""VOYAGE""COHERE""JINA""DASHSCOPE"
endpointUrl*string

API endpoint URL

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

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

Example"/rerank"
modelIdentifier*string

Model identifier

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

Supported content modalities (defaults to TEXT if not provided)

Default
[  "TEXT"]
credentials?||

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?|

User-defined labels for categorization

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

Version information

Example"1.0.0"
monitoringEndpoint?|

Monitoring endpoint URL

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

Optional owner principal UUID. If omitted, defaults to the authenticated principal. CREATE_RERANKER is evaluated against the proposed reranker and owner.

Formatuuid
Example"550e8400-e29b-41d4-a716-446655440000"
rerankerId?|

Optional client-provided UUID for idempotent creation. If not provided, server generates a new UUID. Returns ALREADY_EXISTS if ID is already in use.

Formatuuid
Example"550e8400-e29b-41d4-a716-446655440000"
dashscopeApiDialect?|

DashScope request and response API dialect. Valid only for the DASHSCOPE provider. Omit to infer the dialect from apiPath, the model catalog, or the native reranking default.

Example"RERANK_NATIVE_NESTED"
Value in"RERANK_NATIVE_NESTED""RERANK_COMPATIBLE_FLAT"

Response Body

Successfully created reranker with Location header

application/json
  1. response

Reranker configuration information

rerankerId*string

Unique identifier of the reranker

Formatuuid
Example"550e8400-e29b-41d4-a716-446655440000"
displayName*string

User-facing name of the reranker

Example"BGE Cross-Encoder Reranker"
description?|

Description of the reranker

Example"BAAI BGE reranker for cross-encoder semantic ranking"
providerType*ProviderType

Type of reranking provider

Example"TEI"
Value in"OPENAI""VLLM""TEI""LLAMA_CPP""VOYAGE""COHERE""JINA""DASHSCOPE""GEMINI"
endpointUrl*string

API endpoint URL

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

API path for reranking request

Example"/rerank"
modelIdentifier*string

Model identifier

Example"BAAI/bge-reranker-base"
supportedModalities*array<>

Supported content modalities

credentials?||

Stored credentials; present only when GetReranker explicitly requests them and the caller has READ_RERANKER_CREDENTIALS. Always omitted from create, update, and list responses.

Example
{  "apiKey": {    "inlineSecret": "sk-1234567890abcdef",    "secretRef": {      "uri": "vault://path/to/secret"    },    "headerName": "Authorization",    "prefix": "Bearer "  },  "gcpAdc": {    "scopes": [      "https://www.googleapis.com/auth/cloud-platform"    ],    "quotaProjectId": "my-quota-project"  }}
labels*

User-defined labels for categorization

Example
{  "environment": "production",  "team": "search"}
version?|

Version information

Example"1.0.0"
monitoringEndpoint?|

Monitoring endpoint URL

Example"https://monitoring.example.com/rerankers/status"
ownerId*string

Owner ID of the reranker

Formatuuid
Example"550e8400-e29b-41d4-a716-446655440000"
createdAt*integer

Creation timestamp (milliseconds since epoch)

Formatint64
Example1617293472000
updatedAt*integer

Last update timestamp (milliseconds since epoch)

Formatint64
Example1617293472000
createdById*string

ID of the user who created the reranker

Formatuuid
Example"550e8400-e29b-41d4-a716-446655440000"
updatedById*string

ID of the user who last updated the reranker

Formatuuid
Example"550e8400-e29b-41d4-a716-446655440000"
dashscopeApiDialect?|

Configured DashScope request and response API dialect; present only for DashScope configurations with a persisted dialect.

Example"RERANK_NATIVE_NESTED"
Value in"RERANK_NATIVE_NESTED""RERANK_COMPATIBLE_FLAT"
Example Request
curl -X POST 'https://your-goodmem-server.example.com/v1/rerankers' \  -H 'GoodMem-Timeout-Ms: 30000' \  -H 'Content-Type: application/json' \  -d '{  "displayName": "BGE Cross-Encoder Reranker",  "description": "BAAI BGE reranker for cross-encoder semantic ranking",  "endpointUrl": "http://bge.reranker.goodmem.ai:8010",  "apiPath": "/rerank",  "modelIdentifier": "BAAI/bge-reranker-base",  "supportedModalities": [    "TEXT"  ],  "credentials": {    "apiKey": {      "inlineSecret": "sk-demo-api-key",      "secretRef": {        "uri": "vault://path/to/secret"      },      "headerName": "Authorization",      "prefix": "Bearer "    },    "kind": "CREDENTIAL_KIND_API_KEY"  },  "labels": {    "environment": "production",    "team": "search"  },  "version": "1.0.0",  "monitoringEndpoint": "https://monitoring.example.com/rerankers/status",  "ownerId": "550e8400-e29b-41d4-a716-446655440000",  "rerankerId": "550e8400-e29b-41d4-a716-446655440000",  "dashscopeApiDialect": "RERANK_NATIVE_NESTED",  "providerType": "TEI"}'
Example Response
{  "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": {    "apiKey": {      "inlineSecret": "sk-1234567890abcdef",      "secretRef": {        "uri": "vault://path/to/secret"      },      "headerName": "Authorization",      "prefix": "Bearer "    },    "gcpAdc": {      "scopes": [        "https://www.googleapis.com/auth/cloud-platform"      ],      "quotaProjectId": "my-quota-project"    }  },  "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",  "dashscopeApiDialect": "RERANK_NATIVE_NESTED"}