models
Creates, updates, deletes, gets or lists a models resource.
Overview
| Name | models |
| Type | Resource |
| Id | cloudflare.ai.models |
Fields
The following fields are returned by SELECT queries:
- list
Returns a list of models
| Name | Datatype | Description |
|---|---|---|
id | string | Model identifier (UUID). |
name | string | Model name, e.g. @cf/meta/llama-3.2-1b-instruct - use as model_name in the ai task-family resources. |
created_at | string | |
description | string | |
properties | array | |
source | number | |
tags | array | |
task | object | Task grouping: id, name (e.g. Text Generation), description. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list | select | account_id | per_page, page, task, author, source, hide_experimental, search | Searches Workers AI models by name or description. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
account_id | string | The Cloudflare account ID. |
author | string | Filter by Author |
hide_experimental | boolean | Filter to hide experimental models |
page | integer | |
per_page | integer | |
search | string | Search |
source | number | Filter by Source Id |
task | string | Filter by Task Name |
SELECT examples
- list
Searches Workers AI models by name or description.
SELECT
id,
name,
created_at,
description,
properties,
source,
tags,
task
FROM cloudflare.ai.models
WHERE account_id = '{{ account_id }}' -- required
AND per_page = '{{ per_page }}'
AND page = '{{ page }}'
AND task = '{{ task }}'
AND author = '{{ author }}'
AND source = '{{ source }}'
AND hide_experimental = '{{ hide_experimental }}'
AND search = '{{ search }}'
;