list_models
Browse all available AI generation models for image, video, and music, along with their credit costs.
Instructions
List all available AI generation models and their credit costs.
Returns a list of models with their mode identifier, description, credit cost, and type (image/video/music).
Useful for understanding what you can generate and how much it costs. No credits are charged for this operation.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/yaparai/tools/models.py:8-19 (handler)The main handler function for the 'list_models' tool. It creates a YaparAIClient and calls client.get_models() to fetch the list of available AI generation models with their credit costs.
async def list_models() -> dict: """ List all available AI generation models and their credit costs. Returns a list of models with their mode identifier, description, credit cost, and type (image/video/music). Useful for understanding what you can generate and how much it costs. No credits are charged for this operation. """ client = YaparAIClient() return await client.get_models() - src/yaparai/client.py:138-140 (helper)The client method `get_models()` that makes the actual HTTP GET request to /v1/public/models to retrieve model listings.
async def get_models(self) -> dict: """List available models and their credit costs.""" return await self._request("GET", "/v1/public/models") - src/yaparai/server.py:105-105 (registration)Import of the list_models function from yaparai.tools.models into the server module.
from yaparai.tools.models import list_models - src/yaparai/server.py:186-186 (registration)Registration of list_models as an MCP tool via mcp.tool(list_models), placed under the '# Utility' section.
mcp.tool(list_models)