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
| Field | Type | Required | Description |
|---|---|---|---|
input | components.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. |
model | string | ✔️ | 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. |
dimensions | number | ➖ | The number of dimensions the resulting output embeddings should have. Only supported in certain models. |
encodingFormat | components.EncodingFormat | ➖ | The format to return the embeddings in. Can be either 'float' (array of numbers) or 'base64' (base64-encoded binary). |
user | string | ➖ | A unique identifier representing your end-user. |