# AI 网关数据分析

数据分析用于展示 AI 网关的使用情况，帮助你了解 Token 消耗模式、模型使用情况以及整体使用趋势。

<div align="left" data-with-frame="true"><figure><img src="/files/kDWrJJl0mZyV5nOhuIEm" alt=""><figcaption></figcaption></figure></div>

#### 可用指标

以下指标可帮助你从模型维度分析使用情况：

* **按模型统计的 Token 使用量**\
  显示在所选时间范围内，每个模型消耗的 Token 总量。
* **按模型统计的请求次数**\
  显示每个模型接收到的 API 请求数量，有助于分析流量分布。
* **输入 Token**\
  表示请求输入所消耗的 Token，用于分析 Prompt 长度和请求复杂度。
* **输出 Token**\
  表示模型响应生成的 Token，用于评估响应长度及其对成本的影响。

你可以选择指定的 AI 网关，并按时间范围筛选数据（例如最近 6 小时或自定义时间区间）。

{% hint style="info" %} <mark style="color:blue;">**注意**</mark>

* <mark style="color:blue;">只有支持上报输入和输出 Token 使用量的模型才会纳入统计分析。</mark>
* <mark style="color:blue;">使用数据可能会有数分钟的延迟，无法保证实时展示。</mark>
  {% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.console.zenlayer.com/welcome/cn/ai-gateway/ai-gateway-usage-analytics.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
