---
title: "GET /v1/console/usage/apikeys/stats"
method: GET
path: "/v1/console/usage/apikeys/stats"
tags: ["UsageService"]
---

# GET /v1/console/usage/apikeys/stats

`GET /v1/console/usage/apikeys/stats`

ListAPIKeyStats 按 API Key 维度汇总计费/用量统计。

 scope=self（默认）：汇总当前用户名下各 API Key 的用量（按 user_id 归属）。
 scope=team：企业管理员视角，汇总其拥有的团队下各 API Key 的用量（按 team_id 归属，
            付费方为团队 owner，即当前管理员）。仅企业管理员可用，且只返回本人拥有的团队。

## Query parameters

- `scope` string
- `startTime` string, date-time
- `endTime` string, date-time

## Response `200`

OK

- UsageV1ListAPIKeyStatsReply
  - `endTime` string, date-time
  - `items` UsageV1APIKeyStatItem[]
    - `apiKeyId` string
    - `apiKeyName` string
    - `billedMicros` string
    - `completionTokens` string
    - `failedCount` string
    - `promptTokens` string
    - `requestCount` string
    - `successCount` string
    - `teamId` string
    - `totalTokens` string
  - `startTime` string, date-time

---

[API](https://skmtc.dev/apiqik/apis/apiqik-api.md) · [All operations](https://skmtc.dev/apiqik/apis/apiqik-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/apiqik/apiqik-api/revisions/e06b96127408/schema)
