Overview
TheNebiusEmbeddings class provides access to Nebius Token Factory’s embedding models through LangChain. These embeddings can be used for semantic search, document similarity, and other NLP tasks requiring vector representations of text.
Integration details
- Provider: Nebius Token Factory
- Model Type: Text embedding models
- Primary Use Case: Generate vector representations of text for semantic similarity and retrieval
- Currently Highlighted Model:
Qwen/Qwen3-Embedding-8B - Embedding Dimensions: 4,096 (for
Qwen/Qwen3-Embedding-8B)
Setup
Installation
The Nebius integration can be installed via pip:Credentials
Nebius requires an API key that can be passed as an initialization parameterapi_key or set as the environment variable NEBIUS_API_KEY. You can obtain an API key by creating an account on Nebius Token Factory.
Instantiation
TheNebiusEmbeddings class can be instantiated with optional parameters for the API key and model name:
Available models
The list of supported models is available at Nebius Token Factory Models PageIndexing and retrieval
Embedding models are often used in retrieval-augmented generation (RAG) flows, both for indexing data and later retrieving it. The following example demonstrates how to useNebiusEmbeddings with a vector store for document retrieval.
Using with InMemoryVectorStore
You can also use theInMemoryVectorStore for lightweight applications:
Direct usage
You can directly use theNebiusEmbeddings class to generate embeddings for text without using a vector store.
Embedding a single text
You can use theembed_query method to embed a single piece of text:
Embedding multiple texts
You can embed multiple texts at once using theembed_documents method:
Async support
NebiusEmbeddings supports async operations:Document similarity example
API reference
For more details about the Nebius Token Factory API, visit the Nebius Token Factory Documentation.Connect these docs to Claude, VSCode, and more via MCP for real-time answers.

