GoodMemGoodMem
ReferenceAPIREST APIEmbedders

Update an embedder

PUT /v1/embedders/{id}: Updates explicitly supplied embedder fields; at least one mutable field is required.

PUT
/v1/embedders/{id}

Updates explicitly supplied embedder fields; at least one mutable field is required. Field omission and reset semantics are defined by the request schema, and providerType cannot be changed. Returns 412 when model-defining fields or the documentTemplate of inputFormat are changed while the embedder is in use. Requires UPDATE_EMBEDDER on the requested embedder. See the embedder provider guide for provider-specific configuration.

Authorization

ApiKeyAuth
headerx-api-key<token>

Path Parameters

id*string

The unique identifier of the embedder to update

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

Embedder update details

application/json
  1. body

Request body for updating an existing Embedder. Only fields that should be updated need to be included. supportedModalities is creation-time only and cannot be changed here.

displayName?|

User-facing name of the embedder

Length1 <= length <= 255
Example"Updated OpenAI Embedder"
description?|

Description of the embedder

Example"Updated description for OpenAI's text embedding model"
endpointUrl?|

Replacement base HTTP(S) endpoint. Omit to preserve the stored value. Gemini endpoint URLs must not contain query parameters.

Example"https://api.openai.com/v1"
apiPath?|

Replacement provider-relative request path. Omit to preserve the stored value, except that changing the Gemini backend without apiPath selects that backend's default; send blank to restore the provider default. For Gemini, this is an API version: /v1beta for Developer and /v1 for Google Cloud.

Example"/embeddings"
modelIdentifier?|

Model identifier

Example"text-embedding-3-small"
dimensionality?|

Output vector dimensions

Formatint32
Range1 <= value
Example1536
distributionType?|

Type of embedding distribution (DENSE or SPARSE)

Example"DENSE"
maxSequenceLength?|

Maximum input sequence length

Formatint32
Range1 <= value
Example8192
credentials?||

Replace stored credentials. Omit this field to preserve the current credentials; a present empty payload is invalid and never clears them.

Example
{  "kind": "CREDENTIAL_KIND_API_KEY",  "apiKey": {    "inlineSecret": "sk-rotated-api-key"  }}
replaceLabels?|

Replace all existing labels with these (mutually exclusive with mergeLabels)

Propertiesproperties <= 20
Example
{  "environment": "production",  "team": "nlp"}
mergeLabels?|

Merge these labels with existing ones (mutually exclusive with replaceLabels)

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

Version information

Example"1.0.0"
monitoringEndpoint?|

Monitoring endpoint URL

Example"https://monitoring.example.com/embedders/status"
dashscopeApiDialect?|

Update the DashScope request and response API dialect. Valid only for the DASHSCOPE provider. Omit to preserve the stored dialect. Changing apiPath to a recognized canonical DashScope dialect infers its matching dialect; a custom path preserves an existing dialect, while a legacy null dialect is inferred.

Example"EMBEDDING_NATIVE_TEXT"
Value in"EMBEDDING_NATIVE_TEXT""EMBEDDING_NATIVE_CONTENTS""OPENAI_COMPATIBLE"
geminiEndpointConfig?|

When present, atomically replaces the complete Gemini backend routing configuration. Valid only for a GEMINI embedder. Omit to preserve the stored configuration; the gRPC service validates the backend-specific projectId and location contract.

Example
{  "backend": "GOOGLE_CLOUD",  "projectId": "goodmem-production",  "location": "us-central1"}
inputFormat?|

Replacement instruction and templates. Omit to keep the stored value. A supplied value replaces the whole stored input format, and an empty object clears it. Changing documentTemplate, including clearing it, while a space references the embedder returns 412. A nonblank instruction requires a queryTemplate that reads {{ instruction }}; otherwise the request is rejected.

Example
{  "queryTemplate": "query: {{ content }}",  "documentTemplate": "passage: {{ content }}"}

Response Body

Successfully updated embedder

application/json
  1. response

Embedder configuration information

embedderId*string

Unique identifier of the embedder

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

User-facing name of the embedder

Example"OpenAI Ada-2"
description?|

Description of the embedder

Example"OpenAI's text embedding model with 1536 dimensions"
providerType*ProviderType

Type of embedding provider

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

Canonical base HTTP(S) endpoint used for provider requests.

Example"https://api.openai.com/v1"
apiPath?|

Configured provider-relative request path. For Gemini, this is the selected API version: /v1beta for Developer or /v1 for Google Cloud.

Example"/embeddings"
modelIdentifier*string

Model identifier

Example"text-embedding-3-small"
dimensionality*integer

Output vector dimensions

Formatint32
Range1 <= value
Example1536
distributionType*DistributionType

Type of embedding distribution (DENSE or SPARSE)

Example"DENSE"
Value in"DENSE""SPARSE"
maxSequenceLength?|

Maximum input sequence length

Formatint32
Range1 <= value
Example8192
supportedModalities*array<>

Supported content modalities

credentials?||

Stored credentials; present only when GetEmbedder explicitly requests them and the caller has READ_EMBEDDER_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": "nlp"}
version?|

Version information

Example"1.0.0"
monitoringEndpoint?|

Monitoring endpoint URL

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

Owner ID of the embedder

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 embedder

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

ID of the user who last updated the embedder

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"EMBEDDING_NATIVE_TEXT"
Value in"EMBEDDING_NATIVE_TEXT""EMBEDDING_NATIVE_CONTENTS""OPENAI_COMPATIBLE"
geminiEndpointConfig?|

Persisted Gemini backend routing; present only for Gemini embedder resources.

Example
{  "backend": "DEVELOPER",  "projectId": "goodmem-production",  "location": "us-central1"}
inputFormat?|

Instruction and templates applied to query and document text before embedding. Absent when the embedder sends text unchanged.

Example
{  "instruction": "Given a web search query, retrieve relevant passages that answer the query",  "queryTemplate": "Instruct: {{ instruction }}\nQuery: {{ content }}",  "documentTemplate": "title: {{ memory.metadata.title | default('none') }} | text: {{ content }}"}
Example Request
curl -X PUT 'https://your-goodmem-server.example.com/v1/embedders/550e8400-e29b-41d4-a716-446655440000' \  -H 'GoodMem-Timeout-Ms: 30000' \  -H 'Content-Type: application/json' \  -d '{  "displayName": "Updated Production Embedder",  "description": "Updated OpenAI embedding model with enhanced configuration for production use",  "endpointUrl": "https://api.openai.com/v1",  "apiPath": "/embeddings",  "modelIdentifier": "text-embedding-3-large",  "dimensionality": 3072,  "distributionType": "DENSE",  "maxSequenceLength": 8192,  "credentials": {    "apiKey": {      "inlineSecret": "sk-updated-api-key-here",      "secretRef": {        "uri": "vault://path/to/secret"      },      "headerName": "Authorization",      "prefix": "Bearer "    },    "kind": "CREDENTIAL_KIND_API_KEY"  },  "replaceLabels": {    "environment": "production",    "team": "ml-platform",    "cost-center": "ai-infrastructure"  },  "mergeLabels": {    "environment": "production",    "team": "nlp"  },  "version": "2.0.1",  "monitoringEndpoint": "https://monitoring.company.com/embedders/status",  "dashscopeApiDialect": "EMBEDDING_NATIVE_TEXT",  "geminiEndpointConfig": {    "projectId": "goodmem-production",    "location": "us-central1"  },  "inputFormat": {    "instruction": "Given a web search query, retrieve relevant passages that answer the query",    "queryTemplate": "Instruct: {{ instruction }}\nQuery: {{ content }}",    "documentTemplate": "title: {{ memory.metadata.title | default('\''none'\'') }} | text: {{ content }}"  }}'
Example Response
{  "embedderId": "550e8400-e29b-41d4-a716-446655440000",  "displayName": "OpenAI Ada-2",  "description": "OpenAI's text embedding model with 1536 dimensions",  "providerType": "OPENAI",  "endpointUrl": "https://api.openai.com/v1",  "apiPath": "/embeddings",  "modelIdentifier": "text-embedding-3-small",  "dimensionality": 1536,  "distributionType": "DENSE",  "maxSequenceLength": 8192,  "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": "nlp"  },  "version": "1.0.0",  "monitoringEndpoint": "https://monitoring.example.com/embedders/status",  "ownerId": "550e8400-e29b-41d4-a716-446655440000",  "createdAt": 1617293472000,  "updatedAt": 1617293472000,  "createdById": "550e8400-e29b-41d4-a716-446655440000",  "updatedById": "550e8400-e29b-41d4-a716-446655440000",  "dashscopeApiDialect": "EMBEDDING_NATIVE_TEXT",  "geminiEndpointConfig": {    "backend": "DEVELOPER",    "projectId": "goodmem-production",    "location": "us-central1"  },  "inputFormat": {    "instruction": "Given a web search query, retrieve relevant passages that answer the query",    "queryTemplate": "Instruct: {{ instruction }}\nQuery: {{ content }}",    "documentTemplate": "title: {{ memory.metadata.title | default('none') }} | text: {{ content }}"  }}