---
title: API 密钥对象
url: https://runapi.ai/zh-CN/docs/api/management/keys/object.md
canonical: https://runapi.ai/zh-CN/docs/api/management/keys/object
locale: zh-CN
---

# API 密钥对象

可用于验证 RunAPI 请求的 Standard API 密钥。其明文值不属于可复用对象的一部分。

## 对象字段

可复用资源对象共享的稳定字段。

### API 密钥

```json
{
  "allowed_models": {
    "description": "Optional model allowlist.",
    "required": true,
    "type": "array | null"
  },
  "created_at": {
    "description": "Time the key was created.",
    "required": true,
    "type": "string"
  },
  "credit_limit_cents": {
    "description": "Optional key spending cap in USD cents.",
    "required": true,
    "type": "integer | null"
  },
  "credit_limit_reset_interval": {
    "description": "Optional key spending-cap reset cadence.",
    "enum": [
      "daily",
      "weekly",
      "monthly",
      null
    ],
    "required": true,
    "type": "string | null"
  },
  "enabled": {
    "description": "Whether the key can authenticate requests.",
    "required": true,
    "type": "boolean"
  },
  "guardrail_id": {
    "description": "Attached guardrail prefix ID",
    "required": true,
    "type": "string | null"
  },
  "id": {
    "description": "API key prefix ID.",
    "required": true,
    "type": "string"
  },
  "last_used_at": {
    "description": "Time the key was last used",
    "required": true,
    "type": "string | null"
  },
  "masked_token": {
    "description": "Masked API key value.",
    "required": true,
    "type": "string"
  },
  "name": {
    "description": "Friendly API key name.",
    "required": true,
    "type": "string"
  }
}
```

## 相关参考

- [API 密钥](/docs/api/management/keys)
- [列出 API 密钥](/docs/api/management/keys/list)
- [获取 API 密钥](/docs/api/management/keys/retrieve)
- [创建 API 密钥](/docs/api/management/keys/create)
- [更新 API 密钥](/docs/api/management/keys/update)
- [删除 API 密钥](/docs/api/management/keys/delete)
