## Get Gateway Log Detail `client.AIGateway.Logs.Get(ctx, gatewayID, id, query) (*LogGetResponse, error)` **get** `/accounts/{account_id}/ai-gateway/gateways/{gateway_id}/logs/{id}` Retrieves detailed information for a specific AI Gateway log entry. ### Parameters - `gatewayID string` gateway id - `id string` - `query LogGetParams` - `AccountID param.Field[string]` ### Returns - `type LogGetResponse struct{…}` - `ID string` - `Cached bool` - `CreatedAt Time` - `Duration int64` - `Model string` - `Path string` - `Provider string` - `Success bool` - `TokensIn int64` - `TokensOut int64` - `Cost float64` - `CustomCost bool` - `Metadata string` - `ModelType string` - `RequestContentType string` - `RequestHead string` - `RequestHeadComplete bool` - `RequestSize int64` - `RequestType string` - `ResponseContentType string` - `ResponseHead string` - `ResponseHeadComplete bool` - `ResponseSize int64` - `StatusCode int64` - `Step int64` ### Example ```go package main import ( "context" "fmt" "github.com/cloudflare/cloudflare-go" "github.com/cloudflare/cloudflare-go/ai_gateway" "github.com/cloudflare/cloudflare-go/option" ) func main() { client := cloudflare.NewClient( option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), ) log, err := client.AIGateway.Logs.Get( context.TODO(), "my-gateway", "id", ai_gateway.LogGetParams{ AccountID: cloudflare.F("0d37909e38d3e99c29fa2cd343ac421a"), }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", log.ID) } ``` #### Response ```json { "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_head": "request_head", "request_head_complete": true, "request_size": 0, "request_type": "request_type", "response_content_type": "response_content_type", "response_head": "response_head", "response_head_complete": true, "response_size": 0, "status_code": 0, "step": 0 }, "success": true } ```