---
title: Logs
---

[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**

# Logs

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

client.aiGateway.logs.list(stringgatewayID, LogListParams { account\_id, cached, direction, 26 more } params, RequestOptionsoptions?): V4PagePaginationArray<[LogListResponse](https://developers.cloudflare.com/api/typescript/resources/ai%5Fgateway#%28resource%29%20ai%5Fgateway.logs%20%3E%20%28model%29%20log%5Flist%5Fresponse%20%3E%20%28schema%29) { id, cached, created\_at, 16 more } \>

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

##### [Get Gateway Log Detail](https://developers.cloudflare.com/api/typescript/resources/ai%5Fgateway/subresources/logs/methods/get)

client.aiGateway.logs.get(stringid, LogGetParams { account\_id, gateway\_id } params, RequestOptionsoptions?): [LogGetResponse](https://developers.cloudflare.com/api/typescript/resources/ai%5Fgateway#%28resource%29%20ai%5Fgateway.logs%20%3E%20%28model%29%20log%5Fget%5Fresponse%20%3E%20%28schema%29) { id, cached, created\_at, 22 more } 

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

##### [Patch Gateway Log](https://developers.cloudflare.com/api/typescript/resources/ai%5Fgateway/subresources/logs/methods/edit)

client.aiGateway.logs.edit(stringid, LogEditParams { account\_id, gateway\_id, feedback, 2 more } params, RequestOptionsoptions?): [LogEditResponse](https://developers.cloudflare.com/api/typescript/resources/ai%5Fgateway#%28resource%29%20ai%5Fgateway.logs%20%3E%20%28model%29%20log%5Fedit%5Fresponse%20%3E%20%28schema%29)

PATCH/accounts/{account\_id}/ai-gateway/gateways/{gateway\_id}/logs/{id}

##### [Delete Gateway Logs](https://developers.cloudflare.com/api/typescript/resources/ai%5Fgateway/subresources/logs/methods/delete)

client.aiGateway.logs.delete(stringgatewayID, LogDeleteParams { account\_id, filters, limit, 2 more } params, RequestOptionsoptions?): [LogDeleteResponse](https://developers.cloudflare.com/api/typescript/resources/ai%5Fgateway#%28resource%29%20ai%5Fgateway.logs%20%3E%20%28model%29%20log%5Fdelete%5Fresponse%20%3E%20%28schema%29) { success } 

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

##### [Get Gateway Log Request](https://developers.cloudflare.com/api/typescript/resources/ai%5Fgateway/subresources/logs/methods/request)

client.aiGateway.logs.request(stringid, LogRequestParams { account\_id, gateway\_id } params, RequestOptionsoptions?): [LogRequestResponse](https://developers.cloudflare.com/api/typescript/resources/ai%5Fgateway#%28resource%29%20ai%5Fgateway.logs%20%3E%20%28model%29%20log%5Frequest%5Fresponse%20%3E%20%28schema%29)

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

##### [Get Gateway Log Response](https://developers.cloudflare.com/api/typescript/resources/ai%5Fgateway/subresources/logs/methods/response)

client.aiGateway.logs.response(stringid, LogResponseParams { account\_id, gateway\_id } params, RequestOptionsoptions?): [LogResponseResponse](https://developers.cloudflare.com/api/typescript/resources/ai%5Fgateway#%28resource%29%20ai%5Fgateway.logs%20%3E%20%28model%29%20log%5Fresponse%5Fresponse%20%3E%20%28schema%29)

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

##### ModelsExpand Collapse 

LogListResponse { id, cached, created\_at, 16 more } 

id: string

cached: boolean

created\_at: string

formatdate-time

duration: number

model: string

path: string

provider: string

success: boolean

tokens\_in: number | null

tokens\_out: number | null

cost?: number

custom\_cost?: boolean

metadata?: string

model\_type?: string

request\_content\_type?: string

request\_type?: string

response\_content\_type?: string

status\_code?: number

step?: number

LogGetResponse { id, cached, created\_at, 22 more } 

id: string

cached: boolean

created\_at: string

formatdate-time

duration: number

model: string

path: string

provider: string

success: boolean

tokens\_in: number | null

tokens\_out: number | null

cost?: number

custom\_cost?: boolean

metadata?: string

model\_type?: string

request\_content\_type?: string

request\_head?: string

request\_head\_complete?: boolean

request\_size?: number

request\_type?: string

response\_content\_type?: string

response\_head?: string

response\_head\_complete?: boolean

response\_size?: number

status\_code?: number

step?: number

LogEditResponse \= unknown

LogDeleteResponse { success } 

success: boolean

LogRequestResponse \= unknown

LogResponseResponse \= unknown