Embedder
Embedder service API reference
Services
EmbedderService Service
Service for managing Embedder configurations in the GoodMem system.
Authentication: gRPC metadata authorization: Bearer <api-key>
Global errors: All RPCs may return DEADLINE_EXCEEDED, CANCELLED, UNAVAILABLE, RESOURCE_EXHAUSTED, INTERNAL.
Permissions model:
*_OWN: operate on caller-owned embedders*_ANY: operate on any user's embedders (requires elevated role)
CreateEmbedder
Creates a new embedder configuration.
| Type | |
|---|---|
| Request | goodmem.v1.CreateEmbedderRequest |
| Response | goodmem.v1.Embedder |
Auth: gRPC metadata authorization: Bearer <api-key>
Permissions Required: CREATE_EMBEDDER_OWN or CREATE_EMBEDDER_ANY
Summary:
- Owner defaults to the authenticated user unless
owner_idis provided (requires*_ANYif differs) ALREADY_EXISTS: another embedder exists with identical{owner_id, provider_type, endpoint_url, api_path, model_identifier, credentials_fingerprint}after URL canonicalization: trailing slash stripped; default ports removed; host comparison case-insensitive; credentials_fingerprint is SHA-256 hash of normalized credentials
Side Effects:
- Persists embedder; encrypts
credentials; sets audit fields
Error Codes:
UNAUTHENTICATED: missing/invalid authPERMISSION_DENIED: lacksCREATE_EMBEDDER_*INVALID_ARGUMENT: bad URL(s); empty/invalid fields;dimensionality <= 0;UNSPECIFIEDenums; labels exceed limits/charset; unsupported modalityALREADY_EXISTS: matching embedder as defined aboveINTERNAL: unexpected server error
Idempotency: Non-idempotent; clients SHOULD NOT blindly retry on unknown failures.
Examples:
grpcurl -plaintext \
-H 'authorization: Bearer gm_xxx' \
-d '{
"display_name": "OpenAI TE",
"provider_type": "PROVIDER_TYPE_OPENAI",
"endpoint_url": "https://api.openai.com",
"api_path": "/embeddings",
"model_identifier": "text-embedding-3-small",
"dimensionality": 1536,
"distribution_type": "DISTRIBUTION_TYPE_DENSE",
"credentials": "sk-***",
"labels": {"env":"dev","team":"ml"}
}' \
localhost:8080 goodmem.v1.EmbedderService/CreateEmbedderNote: bytes fields in JSON must be base64.
GetEmbedder
Retrieves details of a specific embedder.
| Type | |
|---|---|
| Request | goodmem.v1.GetEmbedderRequest |
| Response | goodmem.v1.Embedder |
Auth: gRPC metadata authorization: Bearer <api-key>
Permissions Required: READ_EMBEDDER_OWN or READ_EMBEDDER_ANY
Side Effects: None
Error Codes:
UNAUTHENTICATED: missing/invalid authPERMISSION_DENIED: lacksREAD_EMBEDDER_*INVALID_ARGUMENT: invalid embedder ID formatNOT_FOUND: embedder does not existINTERNAL: unexpected server error
Idempotency: Read-only; safe to retry; results may change over time.
Examples:
grpcurl -plaintext \
-H 'authorization: Bearer gm_xxx' \
-d '{ "embedder_id": "BASE64_UUID_BYTES_HERE" }' \
localhost:8080 goodmem.v1.EmbedderService/GetEmbedderNote: bytes fields in JSON must be base64.
ListEmbedders
Lists embedders accessible to the authenticated user.
| Type | |
|---|---|
| Request | goodmem.v1.ListEmbeddersRequest |
| Response | goodmem.v1.ListEmbeddersResponse |
Auth: gRPC metadata authorization: Bearer <api-key>
Permissions Required: LIST_EMBEDDER_OWN or LIST_EMBEDDER_ANY
Request Parameters:
owner_id(optional, bytes UUID): filter by owner. If caller hasLIST_EMBEDDER_ANYandowner_idis omitted, all embedders visible to the role are returned; otherwise only caller-owned embedders are returnedprovider_type(optional):UNSPECIFIEDignoredlabel_selectors(optional): AND of exact key=value matches (case-sensitive)
Note: bytes fields in JSON must be base64.
Side Effects: None
Error Codes:
UNAUTHENTICATED: missing/invalid authPERMISSION_DENIED: lacksLIST_EMBEDDER_*INVALID_ARGUMENT: invalid filters or parametersINTERNAL: unexpected server error
Idempotency: Read-only; safe to retry; results may change over time.
Examples:
grpcurl -plaintext \
-H 'authorization: Bearer gm_xxx' \
-d '{ "provider_type":"PROVIDER_TYPE_OPENAI", "label_selectors":{"env":"prod"} }' \
localhost:8080 goodmem.v1.EmbedderService/ListEmbeddersUpdateEmbedder
Updates mutable properties of an embedder.
| Type | |
|---|---|
| Request | goodmem.v1.UpdateEmbedderRequest |
| Response | goodmem.v1.Embedder |
Auth: gRPC metadata authorization: Bearer <api-key>
Permissions Required: UPDATE_EMBEDDER_OWN or UPDATE_EMBEDDER_ANY
Side Effects:
- Persists changes; updates
updated_atandupdated_by_id
Error Codes:
UNAUTHENTICATED: missing/invalid authPERMISSION_DENIED: lacksUPDATE_EMBEDDER_*INVALID_ARGUMENT: invalid fields or formatsNOT_FOUND: embedder does not existFAILED_PRECONDITION: changes todimensionality,distribution_type, ormodel_identifierare rejected while the embedder is referenced by active spaces/collections or ingestion jobs are running; try again after detaching or completing jobsINTERNAL: unexpected server error
Idempotency: Idempotent with identical input; safe to retry.
Examples:
grpcurl -plaintext \
-H 'authorization: Bearer gm_xxx' \
-d '{
"embedder_id": "BASE64_UUID_BYTES_HERE",
"replace_labels": { "items": {} }
}' \
localhost:8080 goodmem.v1.EmbedderService/UpdateEmbedderNote: bytes fields in JSON must be base64.
DeleteEmbedder
Permanently deletes an embedder configuration.
| Type | |
|---|---|
| Request | goodmem.v1.DeleteEmbedderRequest |
| Response | google.protobuf.Empty |
Auth: gRPC metadata authorization: Bearer <api-key>
Permissions Required: DELETE_EMBEDDER_OWN or DELETE_EMBEDDER_ANY
Side Effects:
- Removes the embedder record; securely deletes stored credentials
- Does not invalidate or delete embeddings previously created with this embedder
Error Codes:
UNAUTHENTICATED: missing/invalid authPERMISSION_DENIED: lacksDELETE_EMBEDDER_*INVALID_ARGUMENT: invalid embedder ID formatNOT_FOUND: embedder does not existINTERNAL: unexpected server error
Idempotency: Safe to retry; may return NOT_FOUND if already deleted or never existed.
Examples:
grpcurl -plaintext \
-H 'authorization: Bearer gm_xxx' \
-d '{ "embedder_id": "BASE64_UUID_BYTES_HERE" }' \
localhost:8080 goodmem.v1.EmbedderService/DeleteEmbedderNote: bytes fields in JSON must be base64.
Messages
Embedder
Represents a connection to an embedding API service for vectorization.
Embedders provide semantic vector representations of text, images, or other content by interfacing with external AI services. Each embedder configuration includes connection details, model parameters, and access credentials.
Security:
- credentials is INPUT_ONLY and is omitted from all responses.
Notes:
- All timestamps are UTC (
google.protobuf.Timestamp). provider_typeis IMMUTABLE after creation.
See also: goodmem.v1.ProviderType, goodmem.v1.Modality
| Field | Type | Description |
|---|---|---|
embedder_id | bytes | OUTPUT_ONLY UUID (16 bytes); immutable primary identifier |
display_name | string | REQUIRED on create; ≤255 chars; leading/trailing whitespace trimmed; cannot be empty |
description | string | OPTIONAL |
provider_type | goodmem.v1.ProviderType | REQUIRED on create; IMMUTABLE thereafter. See: goodmem.v1.ProviderType |
endpoint_url | string | REQUIRED HTTP(S) URL; server strips trailing slash; duplicate detection uses canonical form |
api_path | string | OPTIONAL; if empty on create, defaults to "/v2/embed" (Cohere), "/embed" (TEI), otherwise "/embeddings" |
model_identifier | string | REQUIRED on create; non-empty after trimming |
dimensionality | int32 | REQUIRED on create; >0 |
distribution_type | goodmem.v1.DistributionType | REQUIRED; UNSPECIFIED invalid on writes |
max_sequence_length | int32 | OPTIONAL; >0 if set; omitted = no enforced limit |
supported_modalities | goodmem.v1.Modality | OUTPUT semantics: server-stored set; default TEXT if omitted at create. See: goodmem.v1.Modality |
credentials | ...dmem.v1.EndpointAuthentication | INPUT_ONLY; optional when upstream allows anonymous access; never returned in responses |
labels | ...oodmem.v1.Embedder.LabelsEntry | ≤20 entries; keys/values ≤255 chars; keys [a-z0-9._-], case-sensitive; merge overwrites on exact key match |
version | string | OPTIONAL |
monitoring_endpoint | string | OPTIONAL http(s) URL for health/metrics |
owner_id | bytes | OUTPUT_ONLY owner UUID (16 bytes); set at create; not updatable |
created_at | google.protobuf.Timestamp | OUTPUT_ONLY creation timestamp (UTC). See: `google.protobuf.Timestamp` |
updated_at | google.protobuf.Timestamp | OUTPUT_ONLY last modification timestamp (UTC). See: `google.protobuf.Timestamp` |
created_by_id | bytes | OUTPUT_ONLY creator user UUID (16 bytes); derived from auth context at creation |
updated_by_id | bytes | OUTPUT_ONLY last modifier user UUID (16 bytes); derived from auth context on update |
Embedder.LabelsEntry
| Field | Type | Description |
|---|---|---|
key | string | |
value | string |
CreateEmbedderRequest
| Field | Type | Description |
|---|---|---|
embedder_id | bytes | Optional client-provided UUID (16 bytes); server generates if omitted; returns ALREADY_EXISTS if ID exists |
display_name | string | Required: User-facing name (≤255 chars; leading/trailing whitespace trimmed; cannot be empty) |
description | string | Optional description of the embedder's purpose |
provider_type | goodmem.v1.ProviderType | Required: Provider type; `PROVIDER_TYPE_UNSPECIFIED` → `INVALID_ARGUMENT`. See: `goodmem.v1.ProviderType` |
endpoint_url | string | Required: HTTP(S) URL; server strips trailing slash; duplicate detection uses canonical form |
api_path | string | Optional API path; if empty, defaults to "/embeddings" |
model_identifier | string | Required: Model identifier string (non-empty after trimming) |
dimensionality | int32 | Required: Output vector dimensions (>0) |
distribution_type | goodmem.v1.DistributionType | Required: Embedding type; DISTRIBUTION_TYPE_UNSPECIFIED → INVALID_ARGUMENT |
max_sequence_length | int32 | Optional maximum input sequence length in tokens (>0 if set) |
supported_modalities | goodmem.v1.Modality | Optional supported modalities; empty defaults to TEXT only. See: goodmem.v1.Modality |
credentials | ...dmem.v1.EndpointAuthentication | Optional structured credentials; required only for providers that mandate authentication |
labels | ...ateEmbedderRequest.LabelsEntry | Optional labels (≤20 entries; keys/values ≤255 chars; keys [a-z0-9._-], case-sensitive) |
version | string | Optional version information for the model/service |
monitoring_endpoint | string | Optional http(s) URL for health/metrics |
owner_id | bytes | Optional owner ID (16 bytes UUID); if omitted → authenticated user; requires CREATE_EMBEDDER_ANY if different from caller |
CreateEmbedderRequest.LabelsEntry
| Field | Type | Description |
|---|---|---|
key | string | |
value | string |
GetEmbedderRequest
| Field | Type | Description |
|---|---|---|
embedder_id | bytes | Required: Embedder ID (16 bytes UUID) |
ListEmbeddersRequest
| Field | Type | Description |
|---|---|---|
owner_id | bytes | Optional filters Optional: Filter by owner (16 bytes UUID) |
provider_type | goodmem.v1.ProviderType | Optional: Filter by provider type; PROVIDER_TYPE_UNSPECIFIED ignored |
label_selectors | ...ersRequest.LabelSelectorsEntry | Optional: conjunction (AND) of exact key=value matches |
ListEmbeddersRequest.LabelSelectorsEntry
| Field | Type | Description |
|---|---|---|
key | string | |
value | string |
ListEmbeddersResponse
| Field | Type | Description |
|---|---|---|
embedders | goodmem.v1.Embedder | List of embedders matching filters and permissions |
UpdateEmbedderRequest
| Field | Type | Description |
|---|---|---|
embedder_id | bytes | Required: ID of the embedder to update (16 bytes UUID) |
display_name | string | Optional fields to update (if omitted → unchanged) Update display name (≤255 chars; cannot be empty) |
description | string | Update description |
endpoint_url | string | Update endpoint URL (must be valid HTTP/HTTPS URL) |
api_path | string | Update API path |
model_identifier | string | Update model identifier (cannot be empty) |
dimensionality | int32 | Update dimensionality (must be positive integer) |
distribution_type | goodmem.v1.DistributionType | Update distribution type; DISTRIBUTION_TYPE_UNSPECIFIED → INVALID_ARGUMENT |
max_sequence_length | int32 | Update max sequence length in tokens |
supported_modalities | goodmem.v1.Modality | Updates to supported_modalities: Proto3 cannot distinguish an omitted repeated field from an empty one. In v1, updates to supported_modalities are NOT supported and the field is ignored. (If/when presence is added, setting an empty set would clear all modalities.) See note above. See: goodmem.v1.Modality |
credentials | ...dmem.v1.EndpointAuthentication | Update credentials; omit to leave unchanged; replaces stored payload when set |
version | string | Update version information |
monitoring_endpoint | string | Update monitoring endpoint URL |
replace_labels | goodmem.v1.StringMap | Replace all existing labels with this set. Empty StringMap clears all labels. See: goodmem.v1.StringMap |
merge_labels | goodmem.v1.StringMap | Merge with existing labels: upserts with overwrite. Labels not mentioned are preserved. See: goodmem.v1.StringMap |
DeleteEmbedderRequest
| Field | Type | Description |
|---|---|---|
embedder_id | bytes | Required: ID of the embedder to delete (16 bytes UUID) |
Enums
DistributionType
Embedding distribution type for neural vectorization models.
DISTRIBUTION_TYPE_UNSPECIFIED= 0: Invalid distribution type; never used in practiceDISTRIBUTION_TYPE_DENSE= 1: Dense embeddings (traditional floating-point vectors)DISTRIBUTION_TYPE_SPARSE= 2: Sparse embeddings (high-dimensional sparse vectors)
| Name | Value | Description |
|---|---|---|
DISTRIBUTION_TYPE_UNSPECIFIED | 0 | Invalid distribution type; `INVALID_ARGUMENT` on writes |
DISTRIBUTION_TYPE_DENSE | 1 | Dense embeddings with floating-point values in all dimensions |
DISTRIBUTION_TYPE_SPARSE | 2 | Sparse embeddings with values in a subset of dimensions |