Registry / llm-agents / nebius

nebius

JSON →
library0.6.2pypypi✓ verified 23d ago

Nebius provides an AI Cloud platform with a Python SDK (nebius) to interact with its various services, including AI Studio for large language models and embeddings, Compute for virtual machines and GPUs, and Object Storage. The SDKs are built on gRPC and Protocol Buffers, offering programmatic access to the Nebius AI Cloud. As of January 24, 2025, the Python SDKs are generally available. The project maintains an active development pace with frequent updates, as indicated by its current version 0.3.55.

pip install nebius
INSTALL
IMPORT
SIG · NEBIUS
N
nebius
llm-agentspythonv0.6.2
Install
6.4s avg
Import
Disk
83MB
Pass rate
8/ 10
Env Coverage8 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.6.2 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
glibc
py 3.10
✓ —
✓ 8.6s
py 3.11
✓ —
✓ 6.4s
py 3.12
✓ —
✓ 5s
py 3.13
✓ —
✓ 5.6s
py 3.9
✕ build_error
✕ build_error
83MB installed
● package 83MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

IamServiceStub
from nebius.iam.v1 import IamServiceStub
from nebius.iam.v1.iam_service_pb2_grpc import IamServiceStub

This quickstart demonstrates how to interact with Nebius AI Studio using its OpenAI-compatible API. You will need an API key from Nebius AI Studio, preferably set as an environment variable (NEBIUS_API_KEY). The `openai` Python library is used, with the `base_url` configured to point to the Nebius AI Studio endpoint. Replace `Qwen/Qwen3-30B-A3B-fast` with an actual model available in your Nebius AI Studio account.

import os from openai import OpenAI # Ensure NEBIUS_API_KEY is set in your environment variables # Example: export NEBIUS_API_KEY='YOUR_API_KEY' # You can obtain an API key from Nebius AI Studio. nebius_api_key = os.environ.get('NEBIUS_API_KEY', 'sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx') if not nebius_api_key: print("Error: NEBIUS_API_KEY environment variable not set.") print("Please get your API key from Nebius AI Studio and set it.") else: try: client = OpenAI( base_url="https://api.tokenfactory.nebius.com/v1/", # Or your specific Nebius AI Studio endpoint api_key=nebius_api_key, ) chat_completion = client.chat.completions.create( model="Qwen/Qwen3-30B-A3B-fast", # Replace with an available model from Nebius AI Studio messages=[ {"role": "user", "content": "Hello, what is your name?"} ] ) print(chat_completion.choices[0].message.content) except Exception as e: print(f"An error occurred: {e}")
Debug
Known issues
gotchaAuthentication to Nebius AI Cloud services (including AI Studio) requires an API key or an IAM access token. It is crucial to store these credentials securely, typically using environment variables, and never hardcode them in your codebase.
fix
Store API keys as environment variables (e.g., `NEBIUS_API_KEY`) or retrieve IAM tokens dynamically using the Nebius CLI (`nebius iam get-access-token`) for secure authentication. Use `os.environ.get('YOUR_KEY_NAME')` to access them.
affects: All versions
gotchaWhen provisioning Compute resources (VMs, GPUs), users may encounter 'Not enough resources' errors due to high demand in specific regions or for particular configurations. This is a common operational challenge in cloud environments.
fix
If encountering this error, consider trying a different region, selecting a VM type or GPU with different specifications, or requesting a capacity reservation through Nebius support. Nebius is also releasing a capacity dashboard for transparency.
affects: All versions
breakingThe `Update` method for Nebius AI Cloud API resources is designed to perform a 'full-replace' of resource fields, not a 'patch' operation. To maintain compatibility and prevent unintentional modifications of unknown fields, it uses a 'Reset Mask' mechanism.
fix
Be aware that calling an `Update` method will replace the entire resource object with the provided data. Use the 'Reset Mask' if available via the SDK (often handled automatically by the SDK) to selectively update fields and preserve others, or ensure your update payload contains all desired final states for the resource.
affects: All versions (API design choice)
gotchaFor Nebius AI Studio, while the native `nebius` SDK is available, many AI-focused integrations and quickstarts leverage OpenAI API compatibility. This means interacting through the standard `openai` Python client by setting a custom `base_url`.
fix
If integrating with Nebius AI Studio for LLMs/embeddings, refer to documentation or examples that use the `openai` library with `base_url` pointing to `https://api.tokenfactory.nebius.com/v1/` (or your specific endpoint) and provide your Nebius API key.
affects: All versions
Upgrade
Version history
0.6.2latest on PyPI · released Aug 27, 2026
Audit
Dependencies
grpciorequiredUnderlying communication protocol for Nebius SDKs.
protobufrequiredUsed for defining service interfaces and data structures.
openaioptionalRecommended for interacting with Nebius AI Studio's OpenAI-compatible API.
Agent activity
46 hits · last 30 days
node
40
OpenAI (training)
1
Resources
nebius — pip install nebius · libregistry