Overview
NebiusLLMService provides chat completion capabilities using Nebius Token Factory’s API with OpenAI-compatible interface. It supports streaming responses and function calling.
Nebius LLM API Reference
Pipecat’s API methods for Nebius integration
Example Implementation
Function calling example with Nebius
Nebius Documentation
Official Nebius documentation
Nebius Token Factory
Access models and manage API keys
Installation
To use Nebius LLM services, install the required dependencies:Prerequisites
Nebius Account Setup
Before using Nebius LLM services, you need:- Nebius Account: Sign up at Nebius
- API Key: Generate an API key from the Token Factory dashboard
- Model Selection: Choose from available models (default:
Qwen/Qwen3-30B-A3B-Instruct-2507)
Required Environment Variables
NEBIUS_API_KEY: Your Nebius API key for authentication
Configuration
The API key for accessing Nebius’s API.
The base URL for the Nebius API. Override if using a different endpoint.
Runtime-configurable model settings. See Settings below.
Settings
Runtime-configurable settings passed via thesettings constructor argument using NebiusLLMService.Settings(...). These can be updated mid-conversation with LLMUpdateSettingsFrame. See Service Settings for details.
NOT_GIVEN values are omitted from the API request entirely, letting the
Nebius API use its own defaults. This is different from None, which would be
sent explicitly.Usage
Basic Setup
With Custom Settings
Updating Settings at Runtime
Model settings can be changed mid-conversation usingLLMUpdateSettingsFrame:
Notes
- OpenAI Compatibility: Nebius’s API is OpenAI-compatible, allowing use of familiar patterns and parameters.
- Function Calling: Supports OpenAI-style tool/function calling format.
- Streaming: Supports streaming responses for real-time interaction.
Event Handlers
NebiusLLMService supports the following event handlers, inherited from LLMService: