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

# 身份验证

> 使用限定权限范围的凭据验证 API 请求和 MCP 客户端。

# 身份验证

在 `x-api-key` 请求头中传入 API 密钥，或使用 `Authorization: Bearer` 凭据。远程 MCP 客户端也可以通过 OAuth 登录。OAuth 访问令牌仅对 MCP 资源有效；REST 调用请使用 API 密钥。

## 创建限定权限范围的密钥

打开[集成](https://app.voicecheap.ai/page-api)，创建密钥，选择权限，并按需设置到期日期。完整密钥只显示一次。请将其保存在安全的机密存储中。之后可以重命名、修改权限或到期日期，也可以撤销密钥。

## 权限

[操作目录](https://api-docs.voicecheap.ai/docs/zh/api-reference/actions.md)中列出了每项操作所需的权限。一项操作可能需要多个权限。读取权限不包含创建、修改或删除权限。未明确设置权限的现有密钥仅保留原有的项目和转录访问权限；如需启用新功能，请编辑或更换密钥。

| 领域 | 读取 | 写入或删除 |
| - | - | - |
| 账户 | `account:read` | — |
| 使用情况 | `usage:read` | — |
| 设置 | `settings:read` | `settings:write` |
| 团队 | `team:read` | `team:write` |
| 项目 | `projects:read` | `projects:write`, `projects:delete` |
| 翻译 | — | `translations:write` |
| 转录 | `transcription:read` | `transcription:write` |
| 字幕 | `subtitles:read` | `subtitles:write` |
| 文本转语音 | `tts:read` | `tts:write` |
| 声音 | `voices:read` | `voices:write` |
| 图片 | `images:read` | `images:write` |
| 缩略图 | `thumbnails:read` | `thumbnails:write` |
| 文件夹 | `folders:read` | `folders:write` |
| 术语表 | `glossary:read` | `glossary:write` |
| Webhook | `webhooks:read` | `webhooks:write` |
| 发布 | `publishing:read` | `publishing:write` |

权限用于限制凭据，不会更改订阅、团队角色、项目所有权或可用的媒体积分。团队管理相关的更改仍仅限团队所有者执行。

## 请求头示例

此发现请求只会列出密钥获准使用的操作。请勿将 API 密钥放在浏览器端代码或公开代码仓库中。

```bash theme={null}
curl "https://api.voicecheap.ai/v1/actions" \
  -H "x-api-key: vc_your-api-key"
```

```bash theme={null}
curl "https://api.voicecheap.ai/v1/actions" \
  -H "Authorization: Bearer vc_your-api-key"
```

## OAuth 连接

对于兼容的助手，请使用[远程 MCP 连接](https://api-docs.voicecheap.ai/docs/zh/ai/model-context-protocol.md)并登录 VoiceCheap。在授权页面查看权限。你可以在集成页面撤销各个连接，而无需删除 API 密钥。

## 现有 REST 端点

现有的上传、翻译、项目和转录文本路由仍支持 API 密钥，并开始强制检查对应权限。参数请参阅 [API 参考](https://api-docs.voicecheap.ai/docs/zh/api-reference/introduction.md)，使用规则请参阅[限制说明](https://api-docs.voicecheap.ai/docs/zh/api-reference/limits.md)。


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.