Docs menu · Reference

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.

Parameters

NameTypeRequiredDescription
modelstringyesModel spec.
dimensionsintegernoTruncate to this many dimensions (matryoshka), then renormalize.
inputEmbedInputyesText(s) to embed.
input_typeInputTypenoQuery vs document role for instruction-tuned embedders.
instructionstringnoExplicit instruction prefix override.
normalizebooleannoForce L2 normalization on/off (default per-model).

Returns

EmbeddingsResponse.

Errors

Invocation

  • CLI: strata inference embed
  • Wire type: inference_embed

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