TypeScript SDKAPI ReferenceOperations
CreateEmbeddingsRequestBody - TypeScript SDK
CreateEmbeddingsRequestBody - TypeScript SDK
CreateEmbeddingsRequestBody type definition
Embeddings request input
Example Usage
1 import { CreateEmbeddingsRequestBody } from "@openrouter/sdk/models/operations"; 2 3 let value: CreateEmbeddingsRequestBody = { 4 input: "The quick brown fox jumps over the lazy dog", 5 model: "openai/text-embedding-3-small", 6 };
Fields
| Field | Type | Required | Description | Example |
|---|---|---|---|---|
dimensions | number | ➖ | The number of dimensions for the output embeddings | 1536 |
encodingFormat | operations.EncodingFormat | ➖ | The format of the output embeddings | float |
input | operations.InputUnion | ✔️ | Text, token, or multimodal input(s) to embed | The quick brown fox jumps over the lazy dog |
inputType | string | ➖ | The type of input (e.g. search_query, search_document) | search_query |
model | string | ✔️ | The model to use for embeddings | openai/text-embedding-3-small |
provider | models.ProviderPreferences | ➖ | N/A | {"allow_fallbacks": true} |
user | string | ➖ | A unique identifier for the end-user | user-1234 |