List Gateway Logs
GET/accounts/{account_id}/ai-gateway/gateways/{gateway_id}/logs
List Gateway Logs
Security
API Token
The preferred authorization scheme for interacting with the Cloudflare API. Create a token.
Example:
API Email + API Key
The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key.
Example:
The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys.
Example:
Accepted Permissions (at least one required)
Query Parameters
List Gateway Logs
curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/ai-gateway/gateways/$GATEWAY_ID/logs \
-H "Authorization: Bearer $CLOUDFLARE_API_TOKEN"{
"result": [
{
"id": "id",
"cached": true,
"created_at": "2019-12-27T18:11:19.117Z",
"duration": 0,
"model": "model",
"path": "path",
"provider": "provider",
"success": true,
"tokens_in": 0,
"tokens_out": 0,
"cost": 0,
"custom_cost": true,
"metadata": "metadata",
"model_type": "model_type",
"request_content_type": "request_content_type",
"request_type": "request_type",
"response_content_type": "response_content_type",
"status_code": 0,
"step": 0
}
],
"result_info": {
"count": 0,
"max_cost": 0,
"max_duration": 0,
"max_tokens_in": 0,
"max_tokens_out": 0,
"max_total_tokens": 0,
"min_cost": 0,
"min_duration": 0,
"min_tokens_in": 0,
"min_tokens_out": 0,
"min_total_tokens": 0,
"page": 0,
"per_page": 0,
"total_count": 0
},
"success": true
}Returns Examples
{
"result": [
{
"id": "id",
"cached": true,
"created_at": "2019-12-27T18:11:19.117Z",
"duration": 0,
"model": "model",
"path": "path",
"provider": "provider",
"success": true,
"tokens_in": 0,
"tokens_out": 0,
"cost": 0,
"custom_cost": true,
"metadata": "metadata",
"model_type": "model_type",
"request_content_type": "request_content_type",
"request_type": "request_type",
"response_content_type": "response_content_type",
"status_code": 0,
"step": 0
}
],
"result_info": {
"count": 0,
"max_cost": 0,
"max_duration": 0,
"max_tokens_in": 0,
"max_tokens_out": 0,
"max_total_tokens": 0,
"min_cost": 0,
"min_duration": 0,
"min_tokens_in": 0,
"min_tokens_out": 0,
"min_total_tokens": 0,
"page": 0,
"per_page": 0,
"total_count": 0
},
"success": true
}