> ## Documentation Index
> Fetch the complete documentation index at: https://docs.trae.cn/llms.txt
> Use this file to discover all available pages before exploring further.

查询指定成员的模型 Token 使用量。
## 请求方式 {#2a5ff28e}
```HTTP
POST /openapi/v1/statistics/user-model-usage
```

## 请求体 {#3fe003ca}
<!-- @cols-width: 183,151,124,404 -->
| | | | | \
|**参数** |**类型** |**是否必填** |**描述** |
|---|---|---|---|
| | | | | \
|`start_time` |int |是 |开始时间（秒时间戳）。 |
| | | | | \
|`end_time` |int |\
| | |是 |结束时间（秒时间戳）。时间跨度最多为 180 天。 |
| | | | | \
|`emails` |string[] |是 |成员的邮箱，多个邮箱用逗号分隔。 |
| | | | | \
|`user_ids` |int[] |是 |成员的 ID，多个 ID 用逗号分隔。 |

:::tip 提示
`emails` 和 `user_ids` 参数只需提供其中一个。
由于 `user_ids` 的优先级高于 `emails`，若同时传入两个参数，`emails` 会被忽略。
:::
## 响应参数 {#19c99c7b}
<!-- @cols-width: 244,200,410 -->
| | | | \
|**参数** |**类型** |**描述** |
|---|---|---|
| | | | \
|`model_name` |string |模型名称。 |
| | | | \
|`model_type` |string |调用模型的功能，包括： |\
| | | |\
| | |* `CUE`：代码自动补全功能 |\
| | |* `Chat`：问答功能 |
| | | | \
|`model_source` |string |模型来源，包括： |\
| | | |\
| | |* `Trae`：系统内置模型 |\
| | |* `Custom`：企业自定义模型 |
| | | | \
|`input_tokens` |uint64 |消耗的输入 Token 总数。 |
| | | | \
|`output_tokens` |uint64 |消耗的输出 Token 总数。 |

## 请求示例 {#5de0bd2b}
```JSON
{
  "start_time": 170000001,
  "end_time": 170000002,
  "emails": ["zhangsan@example.com","lisi@example.com"],
  "user_ids":[3231232,809080]
}
```

## 响应示例 {#dbb31a0b}
```JSON
{
    "code": 0,
    "message": "success",
    "request_id": "req_abc123xyz",
    "data": {
        "items": [
            {
                "email": "a@example.com",
                "model_usage": [
                    {
                        "model_name": "Doubao-Seed-2.0-Code",
                        "model_type": "CUE",
                        "model_source": "Trae",
                        "usage": {
                            "input_tokens": 32312,
                            "output_tokens": 7980090
                        }
                    },
                    {
                        "model_name": "Doubao-Seed-Code",
                        "model_type": "Chat",
                        "model_source": "Trae",
                        "usage": {
                            "input_tokens": 32312,
                            "output_tokens": 7980090
                        }
                    }
                ]
            }
        ]
    }
}
```

