# Y-API joins Agno as a model provider

> Agno now ships a YAPI model class for Y-API, an OpenAI-compatible gateway that serves models from several vendors behind one endpoint. Use it as YAPI(id=...) or as a 'yapi:<model>' string.

- Published: 2026-09-23
- Author: yeheboo
- Categories: Changelog
- Canonical: https://www.agno.com/articles/y-api-joins-agno-as-a-model-provider
- Markdown: https://www.agno.com/articles/y-api-joins-agno-as-a-model-provider.md

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`:

```python
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](https://github.com/agno-agi/agno/blob/main/cookbook/90_models/yapi/basic.py), and learn more about [OpenAI-compatible providers](https://docs.agno.com/models/providers/openai-like) and [model strings](https://docs.agno.com/models/model-as-string) in the documentation.
