inference

embed

Embed one or more texts into vectors.

strata inference embed

wire inference_embed

Embeds text with an embedding-capable model and returns one vector per input, in order. The `input` field takes either a single string or an array of strings, so single and batch embedding share one command. The vector dimension is fixed by the model. Local embedding models require a build with the local execution feature; cloud embedding providers (OpenAI, Google) require the matching provider feature and an API key.

To see the complete help for this command, run:

strata inference embed --help

Example

No CLI example in this release.

Parameters

NameTypeRequiredDescription
modelstringyesModel spec.
requestEmbeddingsRequestyesEmbedding request.

Returns

EmbeddingsResponse

  • dataEmbeddingsResponse
  • typestring

Errors

Recover by code. Retry policy and commit outcome come from the shipped error registry.

CodeRetryCommit outcome
failed_precondition.engine.runtime_closednevernot_started
not_found.engine.branchnevernot_applicable
inference.unsupported_operationnevernot_applicable
inference.missing_modelafter_state_changenot_applicable
inference.model_load_failedafter_state_changenot_applicable
inference.local_runtime_failedunknownnot_applicable
inference.missing_api_keyafter_state_changenot_applicable
inference.provider_unavailablesame_requestnot_applicable
inference.provider_malformed_responseunknownnot_applicable
inference.unsupported_providernevernot_applicable
inference.unsupported_parameternevernot_applicable
inference.registry_corruptnevernot_applicable
← All 11 Inference commands

agents: this page as markdown → /docs/reference/inference/embed.md