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

# 获取团队积分余额

> 查询你团队当前的积分余额，包括每个席位的提示积分、附加积分以及计费周期信息。

<div id="overview">
  ## 概述
</div>

获取你团队当前的积分余额信息。其中包括每个席位分配的提示积分、席位数量、附加积分用量以及计费周期日期。

<Warning>
  **此端点仅反映当前计费周期。** 它不会返回之前周期的历史用量。

  特别是，`addOnCreditsAvailable` **不是**累计总量——它会在每个计费周期开始时，根据上一周期的消耗情况重新计算，因此你看到的值会每月变化。如果你的团队在上一个周期使用了附加积分，那么在本周期开始时，`addOnCreditsAvailable` 将低于你最初购买的数量。
</Warning>

<div id="request">
  ## 请求
</div>

<ParamField body="service_key" type="string" required>
  你的拥有“Billing Read”权限的服务密钥
</ParamField>

<div id="example-request">
  ### 请求示例
</div>

```bash theme={null}
curl -X POST --header "Content-Type: application/json" \
--data '{
  "service_key": "your_service_key_here"
}' \
https://server.codeium.com/api/v1/GetTeamCreditBalance
```

<div id="response">
  ## 响应
</div>

<ResponseField name="promptCreditsPerSeat" type="integer">
  当前计费周期内每个席位分配的提示积分数
</ResponseField>

<ResponseField name="numSeats" type="integer">
  团队中的席位数
</ResponseField>

<ResponseField name="addOnCreditsAvailable" type="integer">
  团队在**当前计费周期内**可用的附加积分。该值会在每个计费周期开始时，根据上一周期的用量重新计算，因此会逐月变化，并非已购买附加积分的累计总数。
</ResponseField>

<ResponseField name="addOnCreditsUsed" type="integer">
  团队在**当前计费周期内**截至目前已消耗的附加积分。该计数器会在每个新周期开始时重置，且不包含之前周期的用量。
</ResponseField>

<ResponseField name="billingCycleStart" type="string">
  当前计费周期开始时间 (ISO 8601 时间戳)
</ResponseField>

<ResponseField name="billingCycleEnd" type="string">
  当前计费周期结束时间 (ISO 8601 时间戳)
</ResponseField>

<div id="example-response">
  ### 响应示例
</div>

```json theme={null}
{
  "promptCreditsPerSeat": 500,
  "numSeats": 50,
  "addOnCreditsAvailable": 10000,
  "addOnCreditsUsed": 3500,
  "billingCycleStart": "2026-01-01T00:00:00Z",
  "billingCycleEnd": "2026-02-01T00:00:00Z"
}
```

<div id="error-responses">
  ## 错误响应
</div>

常见错误场景：

* 服务密钥无效或权限不足
* 你的套餐不支持此功能 (需要企业版套餐)
* 超出速率限制
