# ListUMInferRequestLogs - ListUMInferRequestLogs

## Overview

Log Detail List




## Usage

You can choose any of the following methods to initiate an API request:
- Multi-language OpenSDK / [Go](https://github.com/ucloud/ucloud-sdk-go) / [Java](https://github.com/ucloud/ucloud-sdk-java) / [Python](https://github.com/ucloud/ucloud-sdk-python3) / [JavaScript](https://github.com/ucloud/ucloud-sdk-js) / [PHP](https://github.com/ucloud/ucloud-sdk-php) /
- [CloudShell](https://shell.ucloud.cn/)

## Definition

### Public Parameters

| Parameter Name | Type | Description Information | Required |
|:---|:---|:---|:---|
| **Action**     | string  | Corresponding API command name, the current API is `ListUMInferRequestLogs`.                      | **Yes** |
| **PublicKey**  | string  | The user's public key can be obtained from [Console](https://console.ucloud.cn/uaccount/api_manage)                                             | **Yes** |
| **Signature**  | string  | User signature generated based on public key and API command, see [Signature Algorithm](https://docs.ucloud.cn/api/summary/signature)  | **Yes** |

### Request Parameters

| Parameter Name | Type | Description Information | Required |
|:---|:---|:---|:---|
| **Region** | string | Business region, for example cn-wlcb. Use ListUMInferRegions to get available regions |**Yes**|
| **ProjectId** | string | Project ID. Leave it blank for the default project. Sub-accounts must fill in. Please refer to the GetProjectList API |No|
| **Zone** | string | Zone. See [Region and Zone List](https://docs.ucloud.cn/api/summary/regionlist) |**Yes**|
| **StartTime** | int | Start time, Unix timestamp in milliseconds |**Yes**|
| **EndTime** | int | End time, Unix timestamp in milliseconds, must be greater than or equal to StartTime |**Yes**|
| **ModelNames.N** | string | Model name list for filtering |No|
| **ApiKeyIds.N** | string | API Key ID list for filtering |No|
| **RequestId** | string | Request ID for exact filtering |No|
| **Offset** | int | Offset, default 0 |No|
| **Limit** | int | Limit, default 20 |No|

### Response Field

| Field Name | Type | Description Information | Required |
|:---|:---|:---|:---|
| **RetCode** | int | Return status code. If it is 0, it means successful return. If it is not 0, it means failure. |**Yes**|
| **Action** | string | Operation command name. |**Yes**|
| **Message** | string | Returns an error message, providing detailed description when `RetCode` is non-zero. |No|
| **Data** | [*ListUMInferRequestLogsData*](#listuminferrequestlogsdata) | Request log list response data |**Yes**|

#### Data Model

#### ListUMInferRequestLogsData

| Field Name | Type | Description Information | Required |
|:---|:---|:---|:---|
| **Summary** | [*RequestLogSummary*](#requestlogsummary) | Summary information |No|
| **Items** | array[[*RequestLogItem*](#requestlogitem)] | Request log list, array item is RequestLogItem |No|

#### RequestLogSummary

| Field Name | Type | Description Information | Required |
|:---|:---|:---|:---|
| **TotalRequests** | int | Total requests matching the query |No|
| **FailedRequests** | int | Failed requests matching the query |No|

#### RequestLogItem

| Field Name | Type | Description Information | Required |
|:---|:---|:---|:---|
| **RequestId** | string | Request ID |No|
| **StartTime** | int | Request start time, Unix timestamp in milliseconds |No|
| **StartTimeReadable** | string | Readable request start time |No|
| **Region** | string | Business region |No|
| **ModelName** | string | Model name |No|
| **ApiKeyId** | string | API Key ID |No|
| **ApiKeyName** | string | API Key name |No|
| **Latency** | int | Total latency in milliseconds |No|
| **FirstTokenLatency** | int | First token latency in milliseconds |No|
| **OutputTokenThroughput** | float | Output token throughput |No|
| **HttpStatusCode** | int | HTTP status code |No|
| **ErrorCode** | string | Error code |No|
| **IsSuccess** | boolean | Whether the request succeeded |No|
| **TotalTokens** | int | Total tokens |No|
| **PromptTokens** | int | Prompt tokens |No|
| **CompletionTokens** | int | Completion tokens |No|
| **CacheHitTokens** | int | Cache hit tokens |No|
| **CacheCreationTokens** | int | Cache creation tokens |No|
| **CacheCreation5mTokens** | int | 5-minute cache creation tokens |No|
| **CacheCreation1hTokens** | int | 1-hour cache creation tokens |No|
| **HasInferenceLog** | boolean | Whether inference log exists |No|

## Example

### Request Example
```
https://api.ucloud.cn/?Action=ListUMInferRequestLogs
&Region=cn-wlcb
&Zone=cn-wlcb-01
&ProjectId=org-xxxx
&StartTime=1751299200000
&EndTime=1751385600000
&ModelNames.n=deepseek-r1
&ApiKeyIds.n=uminferapikey-xxxx
&RequestId=request-xxxx
&Offset=0
&Limit=20
```

### Response Example
```json
{
  "Action": "ListUMInferRequestLogsResponse",
  "Data": {
    "Items": [
      {
        "ApiKeyId": "uminferapikey-xxxx",
        "ApiKeyName": "default",
        "CacheCreation1hTokens": 0,
        "CacheCreation5mTokens": 0,
        "CacheCreationTokens": 0,
        "CacheHitTokens": 0,
        "CompletionTokens": 64,
        "ErrorCode": "",
        "FirstTokenLatency": 300,
        "HasInferenceLog": false,
        "HttpStatusCode": 200,
        "IsSuccess": true,
        "Latency": 1200,
        "ModelName": "deepseek-r1",
        "OutputTokenThroughput": 42.5,
        "PromptTokens": 64,
        "Region": "cn-wlcb",
        "RequestId": "request-xxxx",
        "StartTime": 1751299200000,
        "StartTimeReadable": "2025-07-01 00:00:00",
        "TotalTokens": 128
      }
    ],
    "Summary": {
      "FailedRequests": 0,
      "TotalRequests": 1
    }
  },
  "RetCode": 0,
  "TotalCount": 1
}
```
