---
title: Model Search
---

[Skip to content](#_top)

[API Reference](https://developers.cloudflare.com/api/go)

[AI](https://developers.cloudflare.com/api/go/resources/ai)

[Models](https://developers.cloudflare.com/api/go/resources/ai/subresources/models)

Copy Markdown

Open in **Claude**Open in **ChatGPT**Open in **Cursor**

---

**Copy Markdown****View as Markdown**

# Model Search

client.AI.Models.List(ctx, params) (\*V4PagePaginationArray\[[ModelListResponse](<https://developers.cloudflare.com/api/go/resources/ai#(resource)%20ai.models%20%3E%20(model)%20ModelListResponse%20%3E%20(schema)>)], error)

GET/accounts/{account\_id}/ai/models/search

Searches Workers AI models by name or description.

##### Security

<details>

<summary>API Token</summary>



The preferred authorization scheme for interacting with the Cloudflare API. <a href="https://developers.cloudflare.com/fundamentals/api/get-started/create-token/">Create a token</a>.

**Example:**<code>Authorization: Bearer Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY</code>

</details>

<details>

<summary>API Email + API Key</summary>



The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key.

**Example:**<code>X-Auth-Email: user@example.com</code>

The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys.

**Example:**<code>X-Auth-Key: 144c9defac04969c7bfad8efaa8ea194</code>

</details>

##### Accepted Permissions (at least one required)

`Workers AI Write``Workers AI Read`

##### ParametersExpand Collapse

<details>

<summary>

params ModelListParams

</summary>

AccountID param.Field\[string]

Path param

<a href="#(resource)%20ai.models%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20account_id">Link to this property</a>

Author param.Field\[string]Optional

Query param: Filter by Author.

<a href="#(resource)%20ai.models%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20author">Link to this property</a>

<details>

<summary>

Format param.Field\[<a href="https://developers.cloudflare.com/api/go/resources/ai/subresources/models/methods/list#(resource)%20ai.models%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20format%20%3E%20(schema)">ModelListParamsFormat</a>]Optional

Query param: If set, return models in the requested marketplace format instead of the default response.

</summary>

const ModelListParamsFormatOpenrouter <a href="https://developers.cloudflare.com/api/go/resources/ai/subresources/models/methods/list#(resource)%20ai.models%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20format%20%3E%20(schema)">ModelListParamsFormat</a> = "openrouter"

<a href="#(resource)%20ai.models%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20format%20%3E%20(schema)%20%3E%20(member)%200">Link to this property</a>

</details>

<a href="#(resource)%20ai.models%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20format">Link to this property</a>

HideExperimental param.Field\[bool]Optional

Query param: Filter to hide experimental models.

<a href="#(resource)%20ai.models%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20hide_experimental">Link to this property</a>

IncludeDeprecated param.Field\[bool]Optional

Query param: If true, include models for up to three months after their deprecation date. Defaults to false.

<a href="#(resource)%20ai.models%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20include_deprecated">Link to this property</a>

Page param.Field\[int64]Optional

Query param

<a href="#(resource)%20ai.models%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20page">Link to this property</a>

PerPage param.Field\[int64]Optional

Query param

<a href="#(resource)%20ai.models%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20per_page">Link to this property</a>

Search param.Field\[string]Optional

Query param: Search.

<a href="#(resource)%20ai.models%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20search">Link to this property</a>

Source param.Field\[float64]Optional

Query param: Filter by Source Id.

<a href="#(resource)%20ai.models%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20source">Link to this property</a>

Task param.Field\[string]Optional

Query param: Filter by Task Name.

<a href="#(resource)%20ai.models%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20task">Link to this property</a>

</details>

[Link to this property](<#(resource)%20ai.models%20%3E%20(method)%20list%20%3E%20(params)%20default>)

##### ReturnsExpand Collapse

type ModelListResponse interface{…}

[Link to this property](<#(resource)%20ai.models%20%3E%20(model)%20ModelListResponse%20%3E%20(schema)>)

### Model Search

Go

HTTPTypeScriptPythonGoTerraform

```
package main

import (
  "context"
  "fmt"

  "github.com/cloudflare/cloudflare-go"
  "github.com/cloudflare/cloudflare-go/ai"
  "github.com/cloudflare/cloudflare-go/option"
)

func main() {
  client := cloudflare.NewClient(
    option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"),
  )
  page, err := client.AI.Models.List(context.TODO(), ai.ModelListParams{
    AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"),
  })
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", page)
}
```

200 example

```
{
  "errors": [
    {}
  ],
  "messages": [
    "string"
  ],
  "result": [
    {}
  ],
  "success": true
}
```

##### Returns Examples

200 example

```
{
  "errors": [
    {}
  ],
  "messages": [
    "string"
  ],
  "result": [
    {}
  ],
  "success": true
}
```