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

# 吊销 API 密钥

> 按 ID 吊销 API 密钥。需要 admin 作用域。返回 { ok: true }。该密钥此后无法再认证请求。

立即吊销 API 密钥。需要 admin 作用域。服务端标记 `revoked_at` 并清除缓存解析，使密钥立刻失效。

## 接口

```http theme={null}
DELETE /v1/api-keys/{id}
```

## 认证

`Authorization: Bearer <api_key>` 或 `Authorization: ApiKey <key>`，且需 admin 作用域。

## 路径参数

<ParamField path="id" type="string" required>
  创建时返回的 API 密钥标识符。
</ParamField>

## 响应

<ResponseField name="ok" type="boolean">
  成功时恒为 `true`。
</ResponseField>

若 id 未知或已吊销返回 `404`；无 admin 作用域返回 `403`。

<RequestExample>
  ```bash cURL theme={null}
  curl -X DELETE https://agent.ariacompute.cn/v1/api-keys/a1b2c3d4-e5f6-7890-abcd-ef1234567890 \
    -H "Authorization: Bearer <admin_api_key>"
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "ok": true
  }
  ```
</ResponseExample>
