Nebius

Parameters for NebiusEmbedder, an OpenAI-compatible embedder for Nebius Token Factory embedding models.

Nebius Embedder embeds documents using Nebius Token Factory's embedding models. It extends the OpenAI Embedder class and uses a compatible API interface.

Check whether the SDK default, BAAI/bge-en-icl, is available to your account using the Nebius List Models API. When selecting another embedding model, override id and dimensions to match it.

Parameters

ParameterTypeDescriptionDefault
idstrThe model ID to use for embeddings"BAAI/bge-en-icl"
dimensionsintOutput dimensions requested from the selected model1024
encoding_formatLiteral["float", "base64"]Format of the embedding output"float"
userOptional[str]A unique identifier representing your end-userNone
api_keyOptional[str]Nebius API keyEnvironment variable NEBIUS_API_KEY
organizationOptional[str]Organization ID for API requestsNone
base_urlstrBase URL for API requests"https://api.tokenfactory.nebius.com/v1/"
request_paramsOptional[Dict[str, Any]]Additional parameters for embedding requestsNone
client_paramsOptional[Dict[str, Any]]Additional parameters for client initializationNone
openai_clientOptional[OpenAIClient]Pre-configured OpenAI clientNone
async_clientOptional[AsyncOpenAI]Pre-configured async OpenAI client, used for async embedding callsNone
enable_batchboolEnable batch processing to reduce API callsFalse
batch_sizeintNumber of texts to process in each API call100