# Models ## Model Search `ai.models.list(ModelListParams**kwargs) -> SyncV4PagePaginationArray[object]` **get** `/accounts/{account_id}/ai/models/search` Searches Workers AI models by name or description. ### Parameters - `account_id: str` - `author: Optional[str]` Filter by Author - `hide_experimental: Optional[bool]` Filter to hide experimental models - `page: Optional[int]` - `per_page: Optional[int]` - `search: Optional[str]` Search - `source: Optional[float]` Filter by Source Id - `task: Optional[str]` Filter by Task Name ### Returns - `object` ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) page = client.ai.models.list( account_id="023e105f4ecef8ad9ca31a8372d0c353", ) page = page.result[0] print(page) ``` #### Response ```json { "errors": [ {} ], "messages": [ "string" ], "result": [ {} ], "success": true } ``` # Schema ## Get Model Schema `ai.models.schema.get(SchemaGetParams**kwargs) -> SchemaGetResponse` **get** `/accounts/{account_id}/ai/models/schema` Retrieves the input and output JSON schema definition for a Workers AI model. ### Parameters - `account_id: str` - `model: str` Model Name ### Returns - `class SchemaGetResponse: …` - `input: Input` - `additional_properties: bool` - `description: str` - `type: str` - `output: Output` - `additional_properties: bool` - `description: str` - `type: str` ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) schema = client.ai.models.schema.get( account_id="023e105f4ecef8ad9ca31a8372d0c353", model="model", ) print(schema.input) ``` #### Response ```json { "result": { "input": { "additionalProperties": true, "description": "JSON Schema definition for the model's input parameters", "type": "object" }, "output": { "additionalProperties": true, "description": "JSON Schema definition for the model's output format", "type": "object" } }, "success": true } ``` ## Domain Types ### Schema Get Response - `class SchemaGetResponse: …` - `input: Input` - `additional_properties: bool` - `description: str` - `type: str` - `output: Output` - `additional_properties: bool` - `description: str` - `type: str`