Skip to main content
This page will help you get started with Nebius Token Factory chat models. Nebius Token Factory provides API access to a wide range of state-of-the-art Large Language Models and embedding models for various use cases.

Overview

Integration details

Model features

Setup

To access Nebius models you’ll need to create a Nebius account, get an API key, and install the langchain-nebius integration package.

Installation

The Nebius integration can be installed via pip:

Credentials

Nebius requires an API key that can be passed as an initialization parameter api_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

Now we can instantiate our model object to generate chat completions:

Invocation

You can use the invoke method to get a completion from the model:

Streaming

You can also stream the response using the stream method:

Chat messages

You can use different message types to structure your conversations with the model:

Parameters

You can customize the chat model behavior using various parameters:
You can also pass parameters at invocation time:

Async support

ChatNebius supports async operations:

Available models

The full list of supported models can be found in the Nebius Token Factory Models Page.

Chaining

You can use ChatNebius in LangChain chains and agents:

API reference

For more details about the Nebius Token Factory API, visit the Nebius Token Factory Documentation.