Agno's YAPI model class builds on OpenAILike, so your agents, tools and streaming work with Y-API the same way they do with any other OpenAI-compatible provider. People had asked how to drive the gateway from Agno.
Import the class from agno.models.yapi and set YAPI_API_KEY:
from agno.agent import Agent
from agno.models.yapi import YAPI
agent = Agent(model=YAPI(id="deepseek/deepseek-v4-flash"), markdown=True)
# The provider string resolves to the same class
agent = Agent(model="yapi:deepseek/deepseek-v4-flash", markdown=True)
agent.print_response("Explain quantum computing in simple terms")YAPI defaults to the model deepseek/deepseek-v4-flash and sends requests to https://api.y-api.bestvirtualgoods.com/v1. Y-API model ids carry the vendor as a prefix, such as z-ai/glm-5.3 or moonshotai/kimi-k3. When YAPI_API_KEY is missing, YAPI raises ModelAuthenticationError with the message YAPI_API_KEY not set.
The openai/gpt-5.6-* and openai/gpt-6-astra ids on Y-API need an explicit reasoning_effort when the request carries tools. Without it, the endpoint answers Function tools with reasoning_effort are not supported. Set reasoning_effort="low" on the model, or use another id. The default deepseek/deepseek-v4-flash supports tool calls with no extra settings.
See the cookbook, and learn more about OpenAI-compatible providers and model strings in the documentation.
Frequently asked questions
Import YAPI from agno.models.yapi, set YAPI_API_KEY, and pass model=YAPI(id="deepseek/deepseek-v4-flash") to your Agent. The string "yapi:deepseek/deepseek-v4-flash" resolves to the same class.
Agno's YAPI model uses deepseek/deepseek-v4-flash as its default id and sends requests to https://api.y-api.bestvirtualgoods.com/v1. It reads the API key from YAPI_API_KEY.
Y-API's openai/gpt-5.6-* and openai/gpt-6-astra ids reject a request with tools unless it sets reasoning_effort. Pass reasoning_effort="low" on the YAPI model, or pick another id such as the default deepseek/deepseek-v4-flash.




