---
title: Datasets
---

[Skip to content](#%5Ftop) 

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

[AI Gateway](https://developers.cloudflare.com/api/typescript/resources/ai%5Fgateway)

Copy Markdown

Open in **Claude**

Open in **ChatGPT**

Open in **Cursor**

---

**Copy Markdown**

**View as Markdown**

# Datasets

##### [List Datasets](https://developers.cloudflare.com/api/typescript/resources/ai%5Fgateway/subresources/datasets/methods/list)

client.aiGateway.datasets.list(stringgatewayID, DatasetListParams { account\_id, enable, name, 3 more } params, RequestOptionsoptions?): V4PagePaginationArray<[DatasetListResponse](https://developers.cloudflare.com/api/typescript/resources/ai%5Fgateway#%28resource%29%20ai%5Fgateway.datasets%20%3E%20%28model%29%20dataset%5Flist%5Fresponse%20%3E%20%28schema%29) { id, created\_at, enable, 4 more } \>

GET/accounts/{account\_id}/ai-gateway/gateways/{gateway\_id}/datasets

##### [Fetch a Dataset](https://developers.cloudflare.com/api/typescript/resources/ai%5Fgateway/subresources/datasets/methods/get)

client.aiGateway.datasets.get(stringid, DatasetGetParams { account\_id, gateway\_id } params, RequestOptionsoptions?): [DatasetGetResponse](https://developers.cloudflare.com/api/typescript/resources/ai%5Fgateway#%28resource%29%20ai%5Fgateway.datasets%20%3E%20%28model%29%20dataset%5Fget%5Fresponse%20%3E%20%28schema%29) { id, created\_at, enable, 4 more } 

GET/accounts/{account\_id}/ai-gateway/gateways/{gateway\_id}/datasets/{id}

##### [Create a new Dataset](https://developers.cloudflare.com/api/typescript/resources/ai%5Fgateway/subresources/datasets/methods/create)

client.aiGateway.datasets.create(stringgatewayID, DatasetCreateParams { account\_id, enable, filters, name } params, RequestOptionsoptions?): [DatasetCreateResponse](https://developers.cloudflare.com/api/typescript/resources/ai%5Fgateway#%28resource%29%20ai%5Fgateway.datasets%20%3E%20%28model%29%20dataset%5Fcreate%5Fresponse%20%3E%20%28schema%29) { id, created\_at, enable, 4 more } 

POST/accounts/{account\_id}/ai-gateway/gateways/{gateway\_id}/datasets

##### [Update a Dataset](https://developers.cloudflare.com/api/typescript/resources/ai%5Fgateway/subresources/datasets/methods/update)

client.aiGateway.datasets.update(stringid, DatasetUpdateParams { account\_id, gateway\_id, enable, 2 more } params, RequestOptionsoptions?): [DatasetUpdateResponse](https://developers.cloudflare.com/api/typescript/resources/ai%5Fgateway#%28resource%29%20ai%5Fgateway.datasets%20%3E%20%28model%29%20dataset%5Fupdate%5Fresponse%20%3E%20%28schema%29) { id, created\_at, enable, 4 more } 

PUT/accounts/{account\_id}/ai-gateway/gateways/{gateway\_id}/datasets/{id}

##### [Delete a Dataset](https://developers.cloudflare.com/api/typescript/resources/ai%5Fgateway/subresources/datasets/methods/delete)

client.aiGateway.datasets.delete(stringid, DatasetDeleteParams { account\_id, gateway\_id } params, RequestOptionsoptions?): [DatasetDeleteResponse](https://developers.cloudflare.com/api/typescript/resources/ai%5Fgateway#%28resource%29%20ai%5Fgateway.datasets%20%3E%20%28model%29%20dataset%5Fdelete%5Fresponse%20%3E%20%28schema%29) { id, created\_at, enable, 4 more } 

DELETE/accounts/{account\_id}/ai-gateway/gateways/{gateway\_id}/datasets/{id}

##### ModelsExpand Collapse 

DatasetListResponse { id, created\_at, enable, 4 more } 

id: string

created\_at: string

formatdate-time

enable: boolean

filters: Array<Filter\>

key: "created\_at" | "request\_content\_type" | "response\_content\_type" | 10 more

One of the following:

"created\_at"

"request\_content\_type"

"response\_content\_type"

"success"

"cached"

"provider"

"model"

"cost"

"tokens"

"tokens\_in"

"tokens\_out"

"duration"

"feedback"

operator: "eq" | "contains" | "lt" | "gt"

One of the following:

"eq"

"contains"

"lt"

"gt"

value: Array<string | number | boolean\>

One of the following:

string

number

boolean

gateway\_id: string

gateway id

maxLength64

minLength1

modified\_at: string

formatdate-time

name: string

DatasetGetResponse { id, created\_at, enable, 4 more } 

id: string

created\_at: string

formatdate-time

enable: boolean

filters: Array<Filter\>

key: "created\_at" | "request\_content\_type" | "response\_content\_type" | 10 more

One of the following:

"created\_at"

"request\_content\_type"

"response\_content\_type"

"success"

"cached"

"provider"

"model"

"cost"

"tokens"

"tokens\_in"

"tokens\_out"

"duration"

"feedback"

operator: "eq" | "contains" | "lt" | "gt"

One of the following:

"eq"

"contains"

"lt"

"gt"

value: Array<string | number | boolean\>

One of the following:

string

number

boolean

gateway\_id: string

gateway id

maxLength64

minLength1

modified\_at: string

formatdate-time

name: string

DatasetCreateResponse { id, created\_at, enable, 4 more } 

id: string

created\_at: string

formatdate-time

enable: boolean

filters: Array<Filter\>

key: "created\_at" | "request\_content\_type" | "response\_content\_type" | 10 more

One of the following:

"created\_at"

"request\_content\_type"

"response\_content\_type"

"success"

"cached"

"provider"

"model"

"cost"

"tokens"

"tokens\_in"

"tokens\_out"

"duration"

"feedback"

operator: "eq" | "contains" | "lt" | "gt"

One of the following:

"eq"

"contains"

"lt"

"gt"

value: Array<string | number | boolean\>

One of the following:

string

number

boolean

gateway\_id: string

gateway id

maxLength64

minLength1

modified\_at: string

formatdate-time

name: string

DatasetUpdateResponse { id, created\_at, enable, 4 more } 

id: string

created\_at: string

formatdate-time

enable: boolean

filters: Array<Filter\>

key: "created\_at" | "request\_content\_type" | "response\_content\_type" | 10 more

One of the following:

"created\_at"

"request\_content\_type"

"response\_content\_type"

"success"

"cached"

"provider"

"model"

"cost"

"tokens"

"tokens\_in"

"tokens\_out"

"duration"

"feedback"

operator: "eq" | "contains" | "lt" | "gt"

One of the following:

"eq"

"contains"

"lt"

"gt"

value: Array<string | number | boolean\>

One of the following:

string

number

boolean

gateway\_id: string

gateway id

maxLength64

minLength1

modified\_at: string

formatdate-time

name: string

DatasetDeleteResponse { id, created\_at, enable, 4 more } 

id: string

created\_at: string

formatdate-time

enable: boolean

filters: Array<Filter\>

key: "created\_at" | "request\_content\_type" | "response\_content\_type" | 10 more

One of the following:

"created\_at"

"request\_content\_type"

"response\_content\_type"

"success"

"cached"

"provider"

"model"

"cost"

"tokens"

"tokens\_in"

"tokens\_out"

"duration"

"feedback"

operator: "eq" | "contains" | "lt" | "gt"

One of the following:

"eq"

"contains"

"lt"

"gt"

value: Array<string | number | boolean\>

One of the following:

string

number

boolean

gateway\_id: string

gateway id

maxLength64

minLength1

modified\_at: string

formatdate-time

name: string