SiliconFlow
Use SiliconFlow models with Agno agents.
SiliconFlow is a platform for providing endpoints for large language models.
Explore the SiliconFlow model catalog.
Authentication
These examples use the SiliconFlow global service: create a key in the global console and use https://api.siliconflow.com/v1. Choose a model available to that account. For a China-region account, use its key, model catalog and https://api.siliconflow.cn/v1 instead. The Agno adapter defaults to the China endpoint when base_url is omitted.
Set your SILICONFLOW_API_KEY environment variable:
export SILICONFLOW_API_KEY=***Example
Install the openai package:
uv pip install -U agno openaiUse Siliconflow with your Agent:
from agno.agent import Agent
from agno.models.siliconflow import Siliconflow
agent = Agent(model=Siliconflow(id="openai/gpt-oss-120b", base_url="https://api.siliconflow.com/v1"), markdown=True)
# Print the response in the terminal
agent.print_response("Share a 2 sentence horror story")
Pass an available model ID explicitly. The SDK default Qwen/QwQ-32B was deprecated by SiliconFlow on April 29, 2026.
Params
| Parameter | Type | Default | Description |
|---|---|---|---|
id | str | "Qwen/QwQ-32B" | The id of the SiliconFlow model to use |
name | str | "Siliconflow" | The name of the model |
provider | str | "Siliconflow" | The provider of the model |
api_key | Optional[str] | None | The API key for SiliconFlow (defaults to SILICONFLOW_API_KEY env var) |
base_url | str | "https://api.siliconflow.cn/v1" | The base URL for the SiliconFlow API |
Siliconflow also supports the params of OpenAI.