# 获取套餐 AFP 额度

> 全部文档的索引见 [llms.txt](https://ark.volcengine.com/llms.txt)；在任一文档页面地址后追加 `.md` 可获取该页的 Markdown 版本。

`POST https://ark.cn-beijing.volcengineapi.com/?Action=GetAFPUsage&Version=2024-01-01`

查询个人版 `AgentPlan` 套餐的 AFP（Agent Frame Point）额度用量，包含 5 小时、近一天、近一周、近一月四个滚动窗口的配额与已用量。企业版席位用量请改用 *GetSeatAFPUsage* 接口。

> **说明：注意**
>
> 仅适用于个人版 Agent Plan 套餐；企业版席位用量请改用 GetSeatAFPUsage。返回的 Quota / Used 单位为 AFP，时间戳为 epoch 毫秒。

## 鉴权

本接口支持鉴权方式如下，详情请参见 [Base URL 及鉴权](/docs/base-url-and-authentication)。

* Access Key 鉴权，请在 [Access Key 管理](https://console.volcengine.com/iam/keymanage) 页面，获取 Access Key。本接口仅支持 Access Key 鉴权。

---

<span id="request-parameters"></span>
## 请求参数

## 响应参数

**AFPDaily** `object` | 近一天用量

近 1 天滚动窗口的 AFP 用量。

**Quota** `string` | 窗口总配额

`AFPDaily.Quota`

该窗口内的 AFP 总配额。

**ResetTime** `integer` | 下次重置时间

`AFPDaily.ResetTime`

下一次额度重置的时间，Unix 毫秒时间戳。

**SubscribeTime** `integer` | 窗口起始时间

`AFPDaily.SubscribeTime`

当前计费窗口的起始时间，Unix 毫秒时间戳。

**Used** `string` | 窗口已用量

`AFPDaily.Used`

该窗口内已消耗的 AFP 配额。

**AFPFiveHour** `object` | 5 小时用量

近 5 小时滚动窗口的 AFP 用量。

**Quota** `string` | 窗口总配额

`AFPFiveHour.Quota`

该窗口内的 AFP 总配额。

**ResetTime** `integer` | 下次重置时间

`AFPFiveHour.ResetTime`

下一次额度重置的时间，Unix 毫秒时间戳。

**SubscribeTime** `integer` | 窗口起始时间

`AFPFiveHour.SubscribeTime`

当前计费窗口的起始时间，Unix 毫秒时间戳。

**Used** `string` | 窗口已用量

`AFPFiveHour.Used`

该窗口内已消耗的 AFP 配额。

**AFPMonthly** `object` | 近一月用量

近 1 个月滚动窗口的 AFP 用量。

**Quota** `string` | 窗口总配额

`AFPMonthly.Quota`

该窗口内的 AFP 总配额。

**ResetTime** `integer` | 下次重置时间

`AFPMonthly.ResetTime`

下一次额度重置的时间，Unix 毫秒时间戳。

**SubscribeTime** `integer` | 窗口起始时间

`AFPMonthly.SubscribeTime`

当前计费窗口的起始时间，Unix 毫秒时间戳。

**Used** `string` | 窗口已用量

`AFPMonthly.Used`

该窗口内已消耗的 AFP 配额。

**AFPWeekly** `object` | 近一周用量

近 1 周滚动窗口的 AFP 用量。

**Quota** `string` | 窗口总配额

`AFPWeekly.Quota`

该窗口内的 AFP 总配额。

**ResetTime** `integer` | 下次重置时间

`AFPWeekly.ResetTime`

下一次额度重置的时间，Unix 毫秒时间戳。

**SubscribeTime** `integer` | 窗口起始时间

`AFPWeekly.SubscribeTime`

当前计费窗口的起始时间，Unix 毫秒时间戳。

**Used** `string` | 窗口已用量

`AFPWeekly.Used`

该窗口内已消耗的 AFP 配额。

**PlanType** `string` | 套餐档位

当前个人版套餐档位。取值：`Small`、`Medium`、`Large`、`Max`。


## 代码示例

## 默认

### cURL

#### Request

```bash
curl 'https://ark.cn-beijing.volcengineapi.com/?Action=GetAFPUsage&Version=2024-01-01' \
  -H 'Content-Type: application/json' \
  -H 'X-Date: <X-Date>' \
  -H 'X-Content-Sha256: <X-Content-Sha256>' \
  -H 'Authorization: HMAC-SHA256 Credential=<AK>/<X-Date>/cn-beijing/ark/request, SignedHeaders=content-type;host;x-content-sha256;x-date, Signature=<Signature>' \
  -d '{}
'
```

#### Response

```
{
  "ResponseMetadata": {
    "RequestId": "20260511034034F809E27C4B1D3A6E52",
    "Action": "GetAFPUsage",
    "Version": "2024-01-01",
    "Service": "ark",
    "Region": "cn-beijing"
  },
  "Result": {
    "PlanType": "Large",
    "AFPFiveHour": {
      "Quota": "50.0",
      "Used": "12.5",
      "SubscribeTime": 1778788800000,
      "ResetTime": 1778806800000
    },
    "AFPDaily": {
      "Quota": "100.0",
      "Used": "22.5",
      "SubscribeTime": 1778716800000,
      "ResetTime": 1778803200000
    },
    "AFPWeekly": {
      "Quota": "500.0",
      "Used": "150.0",
      "SubscribeTime": 1778457600000,
      "ResetTime": 1779062400000
    },
    "AFPMonthly": {
      "Quota": "2000.0",
      "Used": "850.5",
      "SubscribeTime": 1777939200000,
      "ResetTime": 1780531200000
    }
  }
}
```
