GoodMemGoodMem

Embedders

Embedder management.

Methods on this page are called through client.embedders.

client.embedders.create

client.embedders.create(request: EmbeddersCreateRequest, requestOptions?: ProviderApiKeyOptions): Promise<EmbedderResponseShape>

Creates a new embedder configuration for vectorizing content. Embedders represent connections to different embedding API services (like OpenAI, vLLM, etc.) and include all the necessary configuration to use them with memory spaces. DUPLICATE DETECTION: Returns HTTP 409 Conflict (ALREADY_EXISTS) if another embedder exists with identical {ownerId, providerType, endpointUrl, apiPath, modelIdentifier, dimensionality, distributionType, 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. The apiPath field defaults to '/v2/embed' for Cohere, '/embed' for TEI, and '/embeddings' for other providers when omitted. Requires CREATE_EMBEDDER_OWN permission (or CREATE_EMBEDDER_ANY for admin users).

HTTP: POST /v1/embedders

Parameters

ParameterTypeDescription
requestEmbeddersCreateRequestCreation request. Known modelIdentifier values fill provider, endpoint, dimensionality, and modality defaults.
requestOptionsProviderApiKeyOptions optionalProvider API key plus per-call signal, timeout, or headers.

Returns: Promise&lt;EmbedderResponseShape&gt;

Example

const embedder = await client.embedders.create(
  {
    displayName: "Doc Embedder",
    modelIdentifier: "text-embedding-3-small",
    labels: { env: "docs" },
  },
  { apiKey: "sk-..." },
);

client.embedders.delete

client.embedders.delete(id: string, requestOptions?: RequestOptions): Promise<void>

Permanently deletes an embedder configuration. This operation cannot be undone and removes the embedder record and securely deletes stored credentials. IMPORTANT: This does NOT invalidate or delete embeddings previously created with this embedder - existing embeddings remain accessible. CONFLICT: Returns HTTP 409 Conflict if the embedder is still referenced by a space. Requires DELETE_EMBEDDER_OWN permission for embedders you own (or DELETE_EMBEDDER_ANY for admin users).

HTTP: DELETE /v1/embedders/&#123;id&#125;

Parameters

ParameterTypeDescription
idstringThe unique identifier of the embedder to delete
requestOptionsRequestOptions optionalPer-call signal, timeout, or headers.

Returns: Promise&lt;void&gt;

Example

await client.embedders.delete("your-embedder-id");

client.embedders.get

client.embedders.get(id: string, requestOptions?: RequestOptions): Promise<EmbedderResponseShape>

Retrieves the details of a specific embedder configuration by its unique identifier. Requires READ_EMBEDDER_OWN permission for embedders you own (or READ_EMBEDDER_ANY for admin users to view any user's embedders). This is a read-only operation with no side effects.

HTTP: GET /v1/embedders/&#123;id&#125;

Parameters

ParameterTypeDescription
idstringThe unique identifier of the embedder to retrieve
requestOptionsRequestOptions optionalPer-call signal, timeout, or headers.

Returns: Promise&lt;EmbedderResponseShape&gt;

Example

const fetchedEmbedder = await client.embedders.get("your-embedder-id");
console.log(fetchedEmbedder.displayName);

client.embedders.list

client.embedders.list(options?: EmbeddersListOptions, requestOptions?: RequestOptions): Promise<Array<EmbedderResponseShape>>

Retrieves a list of embedder configurations accessible to the caller, with optional filtering. LABEL FILTERS: Label filters accept either label.<key>=<value> or label[key]=value (for example, label.environment=production or label[environment]=production). PERMISSION-BASED FILTERING: With LIST_EMBEDDER_OWN permission, you can only see your own embedders (ownerId filter is ignored if set to another user). With LIST_EMBEDDER_ANY permission, you can see all embedders or filter by any ownerId. This is a read-only operation with no side effects.

HTTP: GET /v1/embedders

Parameters

ParameterTypeDescription
optionsEmbeddersListOptions optionalOptional query parameters.
requestOptionsRequestOptions optionalPer-call signal, timeout, or headers.

Returns: Promise&lt;Array&lt;EmbedderResponseShape&gt;&gt;

Example

for (const emb of await client.embedders.list()) {
  console.log(emb.embedderId, emb.displayName);
}

client.embedders.update

client.embedders.update(id: string, request: UpdateEmbedderRequest, requestOptions?: RequestOptions): Promise<EmbedderResponseShape>

Updates an existing embedder configuration including display information, endpoint configuration, model parameters, credentials, and labels. All fields are optional - only specified fields will be updated. IMPORTANT: providerType is IMMUTABLE after creation and cannot be changed. CRITICAL: Returns HTTP 412 Precondition Failed (FAILED_PRECONDITION) if attempting to update core fields (dimensionality, distributionType, modelIdentifier) while the embedder is actively referenced by spaces or ingestion jobs. DUPLICATE DETECTION: Returns HTTP 409 Conflict (ALREADY_EXISTS) if the update would create a duplicate embedder with the same provider, endpoint, model, dimensionality, distribution, and credentials for this owner. Requires UPDATE_EMBEDDER_OWN permission for embedders you own (or UPDATE_EMBEDDER_ANY for admin users).

HTTP: PUT /v1/embedders/&#123;id&#125;

Parameters

ParameterTypeDescription
idstringThe unique identifier of the embedder to update
requestUpdateEmbedderRequestRequest body.
requestOptionsRequestOptions optionalPer-call signal, timeout, or headers.

Returns: Promise&lt;EmbedderResponseShape&gt;

Example

const updatedEmbedder = await client.embedders.update("your-embedder-id", {
  displayName: "Doc Embedder (updated)",
  mergeLabels: { version: "2" },
});
console.log(updatedEmbedder.embedderId);

Data Models

Enum Values

DistributionType

DENSE, SPARSE

Interfaces

EmbedderCreationRequest

Request body for creating a new Embedder. An Embedder represents a configuration for vectorizing content.

FieldTypeRequiredDescription
displayNamestringyesUser-facing name of the embedder
descriptionstring | nullnoDescription of the embedder
providerTypeProviderTypeyesType of embedding provider
endpointUrlstringyesAPI endpoint URL
apiPathstring | nullnoAPI path for embeddings request (defaults: Cohere /v2/embed, TEI /embed, others /embeddings)
modelIdentifierstringyesModel identifier
dimensionalitynumberyesOutput vector dimensions
distributionTypeDistributionTypeyesType of embedding distribution (DENSE or SPARSE)
maxSequenceLengthnumber | nullnoMaximum input sequence length
supportedModalitiesArray&lt;Modality&gt; | nullnoSupported content modalities (defaults to TEXT if not provided)
credentialsEndpointAuthentication | nullnoStructured credential payload describing how to authenticate with the provider. Required for SaaS providers; optional for local or proxy providers.
labelsRecord&lt;string, string&gt; | nullnoUser-defined labels for categorization
versionstring | nullnoVersion information
monitoringEndpointstring | nullnoMonitoring endpoint URL
ownerIdstring | nullnoOptional owner ID. If not provided, derived from the authentication context. Requires CREATE_EMBEDDER_ANY permission if specified.
embedderIdstring | nullnoOptional client-provided UUID for idempotent creation. If not provided, server generates a new UUID. Returns ALREADY_EXISTS if ID is already in use.

EmbedderResponse

Embedder configuration information

FieldTypeRequiredDescription
embedderIdstringyesUnique identifier of the embedder
displayNamestringyesUser-facing name of the embedder
descriptionstring | nullnoDescription of the embedder
providerTypeProviderTypeyesType of embedding provider
endpointUrlstringyesAPI endpoint URL
apiPathstring | nullnoAPI path for embeddings request
modelIdentifierstringyesModel identifier
dimensionalitynumberyesOutput vector dimensions
distributionTypeDistributionTypeyesType of embedding distribution (DENSE or SPARSE)
maxSequenceLengthnumber | nullnoMaximum input sequence length
supportedModalitiesArray&lt;Modality&gt;yesSupported content modalities
credentialsEndpointAuthentication | nullnoStructured credential payload used for upstream authentication
labelsRecord&lt;string, string&gt;yesUser-defined labels for categorization
versionstring | nullnoVersion information
monitoringEndpointstring | nullnoMonitoring endpoint URL
ownerIdstringyesOwner ID of the embedder
createdAtnumberyesCreation timestamp (milliseconds since epoch)
updatedAtnumberyesLast update timestamp (milliseconds since epoch)
createdByIdstringyesID of the user who created the embedder
updatedByIdstringyesID of the user who last updated the embedder

ListEmbeddersResponse

Response containing a list of embedders

FieldTypeRequiredDescription
embeddersArray&lt;EmbedderResponse&gt;yesList of embedder configurations

UpdateEmbedderRequest

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.

FieldTypeRequiredDescription
displayNamestring | nullnoUser-facing name of the embedder
descriptionstring | nullnoDescription of the embedder
endpointUrlstring | nullnoAPI endpoint URL
apiPathstring | nullnoAPI path for embeddings request
modelIdentifierstring | nullnoModel identifier
dimensionalitynumber | nullnoOutput vector dimensions
distributionTypeDistributionType | nullnoType of embedding distribution (DENSE or SPARSE)
maxSequenceLengthnumber | nullnoMaximum input sequence length
credentialsEndpointAuthentication | nullnoStructured credential payload describing how to authenticate with the provider
replaceLabelsRecord&lt;string, string&gt; | nullnoReplace all existing labels with these (mutually exclusive with mergeLabels)
mergeLabelsRecord&lt;string, string&gt; | nullnoMerge these labels with existing ones (mutually exclusive with replaceLabels)
versionstring | nullnoVersion information
monitoringEndpointstring | nullnoMonitoring endpoint URL

Response Shapes

Response shape types model values returned by the SDK after forward-compatible unknown enum strings are coerced to null.

EmbedderResponseShape

FieldTypeRequiredDescription
embedderIdstringyesUnique identifier of the embedder
displayNamestringyesUser-facing name of the embedder
descriptionstring | nullnoDescription of the embedder
providerTypeProviderType | nullyesType of embedding provider
endpointUrlstringyesAPI endpoint URL
apiPathstring | nullnoAPI path for embeddings request
modelIdentifierstringyesModel identifier
dimensionalitynumberyesOutput vector dimensions
distributionTypeDistributionType | nullyesType of embedding distribution (DENSE or SPARSE)
maxSequenceLengthnumber | nullnoMaximum input sequence length
supportedModalitiesArray&lt;Modality | null&gt;yesSupported content modalities
credentialsEndpointAuthenticationResponseShape | nullnoStructured credential payload used for upstream authentication
labelsRecord&lt;string, string&gt;yesUser-defined labels for categorization
versionstring | nullnoVersion information
monitoringEndpointstring | nullnoMonitoring endpoint URL
ownerIdstringyesOwner ID of the embedder
createdAtnumberyesCreation timestamp (milliseconds since epoch)
updatedAtnumberyesLast update timestamp (milliseconds since epoch)
createdByIdstringyesID of the user who created the embedder
updatedByIdstringyesID of the user who last updated the embedder

ListEmbeddersResponseShape

FieldTypeRequiredDescription
embeddersArray&lt;EmbedderResponseShape&gt;yesList of embedder configurations