Nebius
NebiusTools provides access to Nebius Token Factory's text-to-image generation capabilities with advanced AI models.
Example
The following agent can generate images using Nebius Token Factory:
1from kern.agent import Agent2from kern.tools.models.nebius import NebiusTools34agent = Agent(5 instructions=[6 "You are an AI image generation assistant using Nebius Token Factory",7 "Create high-quality images based on user descriptions",8 "Provide detailed information about the generated images",9 "Help users refine their prompts for better results",10 ],11 tools=[NebiusTools()],12)1314agent.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. |
Toolkit Functions
| Function | Description |
|---|---|
generate_image | Generate images from text descriptions using Nebius Token Factory AI models. |