---
title: Logs
---

[Skip to content](#_top)

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

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

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/go/resources/ai_gateway/subresources/logs/methods/list)

client.AIGateway.Logs.List(ctx, gatewayID, params) (\*V4PagePaginationArray\[[LogListResponse](<https://developers.cloudflare.com/api/go/resources/ai_gateway#(resource)%20ai_gateway.logs%20%3E%20(model)%20LogListResponse%20%3E%20(schema)>)], error)

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

##### [Get Gateway Log Detail](https://developers.cloudflare.com/api/go/resources/ai_gateway/subresources/logs/methods/get)

client.AIGateway.Logs.Get(ctx, gatewayID, id, query) (\*[LogGetResponse](<https://developers.cloudflare.com/api/go/resources/ai_gateway#(resource)%20ai_gateway.logs%20%3E%20(model)%20LogGetResponse%20%3E%20(schema)>), error)

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

##### [Patch Gateway Log](https://developers.cloudflare.com/api/go/resources/ai_gateway/subresources/logs/methods/edit)

client.AIGateway.Logs.Edit(ctx, gatewayID, id, params) (\*[LogEditResponse](<https://developers.cloudflare.com/api/go/resources/ai_gateway#(resource)%20ai_gateway.logs%20%3E%20(model)%20LogEditResponse%20%3E%20(schema)>), error)

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

##### [Delete Gateway Logs](https://developers.cloudflare.com/api/go/resources/ai_gateway/subresources/logs/methods/delete)

client.AIGateway.Logs.Delete(ctx, gatewayID, params) (\*[LogDeleteResponse](<https://developers.cloudflare.com/api/go/resources/ai_gateway#(resource)%20ai_gateway.logs%20%3E%20(model)%20LogDeleteResponse%20%3E%20(schema)>), error)

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

##### [Get Gateway Log Request](https://developers.cloudflare.com/api/go/resources/ai_gateway/subresources/logs/methods/request)

client.AIGateway.Logs.Request(ctx, gatewayID, id, query) (\*[LogRequestResponse](<https://developers.cloudflare.com/api/go/resources/ai_gateway#(resource)%20ai_gateway.logs%20%3E%20(model)%20LogRequestResponse%20%3E%20(schema)>), error)

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

##### [Get Gateway Log Response](https://developers.cloudflare.com/api/go/resources/ai_gateway/subresources/logs/methods/response)

client.AIGateway.Logs.Response(ctx, gatewayID, id, query) (\*[LogResponseResponse](<https://developers.cloudflare.com/api/go/resources/ai_gateway#(resource)%20ai_gateway.logs%20%3E%20(model)%20LogResponseResponse%20%3E%20(schema)>), error)

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