Nebius
Legacy NebiusTools reference for the discontinued Token Factory image-generation service.
Nebius disabled its Text-to-Image API and UI on April 13, 2026. NebiusTools remains in Agno, but its hosted image example no longer works. Selecting a different Nebius image model does not restore the discontinued service. For a current image tool, see OpenAITools.
Legacy Requirements
The following examples require the openai library:
uv pip install -U agno openaiSet the NEBIUS_API_KEY environment variable:
export NEBIUS_API_KEY="your-nebius-api-key"The former outer Agent also used OPENAI_API_KEY; the Nebius key authenticated only image generation.
Legacy Example
The following code records the former image-generation integration and is not a runnable hosted example:
from agno.agent import Agent
from agno.tools.models.nebius import NebiusTools
agent = Agent(
instructions=[
"You are an AI image generation assistant using Nebius Token Factory",
"Create high-quality images based on user descriptions",
"Provide detailed information about the generated images",
"Help users refine their prompts for better results",
],
tools=[NebiusTools()],
)
agent.print_response("Generate an image of a futuristic city with flying cars at sunset", stream=True)Toolkit Params
| Parameter | Type | Default | Description |
|---|---|---|---|
api_key | Optional[str] | None | Nebius API key. Uses NEBIUS_API_KEY if not set. |
base_url | str | "https://api.tokenfactory.nebius.com/v1" | Nebius API base URL. |
image_model | str | "black-forest-labs/flux-schnell" | Default image generation model. |
image_quality | Optional[str] | "standard" | Image quality setting. |
image_size | Optional[str] | "1024x1024" | Default image dimensions. |
image_style | Optional[str] | None | Image style preference. |
enable_generate_image | bool | True | Enable image generation functionality. |
all | bool | False | Enable all available functions. |
Toolkit Functions
| Function | Description |
|---|---|
generate_image | Generate images from text descriptions using Nebius Token Factory AI models. |