Skip to content

EmbeddingsRequest

Request parameters for creating embeddings. Generates vector representations of the input text(s).

Example Usage

typescript
import { EmbeddingsRequest } from "@meetkai/mka1/models/components";

let value: EmbeddingsRequest = {
  input: "The quick brown fox jumps over the lazy dog.",
  model: "openai:text-embedding-3-small",
};

Fields

FieldTypeRequiredDescription
inputcomponents.Input✔️The input text or array of texts to generate embeddings for. Can be a single string or an array of strings. Note: batch size and input length limits vary by model. See GET /embeddings/models for model-specific limits.
modelstring✔️ID of the model to use for generating embeddings. Use provider:model format (e.g., 'openai:text-embedding-3-small'). See GET /embeddings/models for available models and their limits.
dimensionsnumberThe number of dimensions the resulting output embeddings should have. Only supported in certain models.
encodingFormatcomponents.EncodingFormatThe format to return the embeddings in. Can be either 'float' (array of numbers) or 'base64' (base64-encoded binary).
userstringA unique identifier representing your end-user.