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

# 更新 API Key 预算配置

## 请求头

<ParamField header="Content-Type" type="string" required={true}>
  枚举值: `application/json`
</ParamField>

<ParamField header="Authorization" type="string" required={true}>
  Bearer 身份验证格式，例如：Bearer \{\{API 密钥}}。
</ParamField>

## 请求体

<ParamField body="member_id" type="string" required={true}>
  目标 API Key 所属成员的子用户账号 ID。
</ParamField>

<ParamField body="key_id" type="string" required={true}>
  目标 API Key ID。
</ParamField>

<ParamField body="budget_type" type="string" required={true}>
  预算类型。取值：`Unlimited`（无限制）、`One-time`（一次性）、`Recurring`（循环）。
</ParamField>

<ParamField body="budget_limit" type="int64" required={false}>
  预算上限，单位为 1/10000 元（即 10000 = 1 元）。当 `budget_type` 不为 `Unlimited` 时必填，最低值为 10000（即 1 元）。
</ParamField>

<ParamField body="cycle" type="string" required={false}>
  重置周期。当 `budget_type=Recurring` 时必填，当前仅支持 `Monthly`（按月）。
</ParamField>

## 响应

请求成功后返回 HTTP 200，响应体为空。

<RequestExample>
  ```bash theme={null}
  curl --request PUT \
    --url https://api.ppio.com/openapi/v1/user/team/key-budget \
    --header 'Authorization: Bearer <API_KEY>' \
    --header 'Content-Type: application/json' \
    --data '{"member_id": "<string>", "key_id": "<string>", "budget_type": "Recurring", "budget_limit": 100000, "cycle": "Monthly"}'
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {}
  ```
</ResponseExample>
