Nebius Token Factory

Use Nebius Token Factory models with Agno agents.

Nebius Token Factory provides OpenAI-compatible inference for hosted models. Browse the model catalog, query the model-list API, and check function-calling support before selecting a model.

Install

uv pip install -U agno openai

Authentication

Create an API key in the Nebius Token Factory console, then export the key and a current text-generation model ID.

export NEBIUS_API_KEY="your_nebius_api_key"
export NEBIUS_MODEL_ID="your_current_text_model_id"

Example

Use Nebius with your Agent:

import os

from agno.agent import Agent
from agno.models.nebius import Nebius

agent = Agent(
    model=Nebius(
        id=os.environ["NEBIUS_MODEL_ID"],
    ),
    markdown=True
)

# Print the response in the terminal
agent.print_response("Share a 2 sentence horror story.")

See the Nebius usage examples.

The current adapter default is openai/gpt-oss-20b. A default in the SDK does not guarantee availability in your account. Set id to an explicit current text-generation model ID from the Nebius model-list API.

Params

ParameterTypeDefaultDescription
idstr"openai/gpt-oss-20b"The id of the Nebius model to use
namestr"Nebius"The name of the model
providerstr"Nebius"The provider of the model
api_keyOptional[str]NoneThe API key for Nebius (defaults to NEBIUS_API_KEY env var)
base_urlstr"https://api.tokenfactory.nebius.com/v1/"The base URL for the Nebius API