setup-api-key

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Vapi API Key Setup

Vapi API密钥设置

Guide the user through obtaining and configuring a Vapi API key for the voice AI platform.
指导用户为语音AI平台获取并配置Vapi API密钥。

Workflow

工作流程

Step 1: Request the API key

步骤1:获取API密钥

Tell the user:
To set up Vapi, open the API keys page in the Vapi Dashboard: https://dashboard.vapi.ai/org/api-keys
(Need an account? Create one at https://dashboard.vapi.ai/signup first)
If you don't have an API key yet:
  1. Click "Create Key"
  2. Name your key (e.g., "development")
  3. Copy the key immediately — it is only shown once
Paste your API key here when ready.
Then wait for the user's next message which should contain the API key.
告知用户:
要设置Vapi,请打开Vapi控制台中的API密钥页面:https://dashboard.vapi.ai/org/api-keys
如果还没有API密钥:
  1. 点击**"创建密钥"**
  2. 为密钥命名(例如"开发环境")
  3. 立即复制密钥——它只会显示一次
准备好后在此粘贴您的API密钥。
然后等待用户的下一条消息,其中应包含API密钥。

Step 2: Validate and configure

步骤2:验证与配置

Once the user provides the API key:
  1. Validate the key by making a request:
    bash
    curl -s -o /dev/null -w "%{http_code}" https://api.vapi.ai/assistant \
      -H "Authorization: Bearer <the-api-key>"
  2. If validation fails (non-200 response):
  3. If validation succeeds (200 response), save the API key:
    Check if a
    .env
    file exists. If so, append to it. If not, create one:
    VAPI_API_KEY=<the-api-key>
  4. Confirm success:
    Your Vapi API key is configured and stored in
    .env
    as
    VAPI_API_KEY
    .
    You can now use Vapi's API to create assistants, make calls, and build voice AI agents.
    Keep this key safe — do not commit it to version control.
一旦用户提供API密钥:
  1. 验证密钥:发送如下请求:
    bash
    curl -s -o /dev/null -w "%{http_code}" https://api.vapi.ai/assistant \
      -H "Authorization: Bearer <the-api-key>"
  2. 如果验证失败(返回非200状态码):
  3. 如果验证成功(返回200状态码),保存API密钥:
    检查是否存在
    .env
    文件。如果存在,将密钥追加到文件中;如果不存在,则创建该文件:
    VAPI_API_KEY=<the-api-key>
  4. 确认配置成功
    您的Vapi API密钥已配置并存储在
    .env
    文件中,变量名为
    VAPI_API_KEY
    现在您可以使用Vapi的API创建助手、发起通话并构建语音AI Agent。
    请妥善保管此密钥——不要将其提交到版本控制系统中。

Step 3: Verify .gitignore

步骤3:检查.gitignore

Check if
.gitignore
exists and contains
.env
. If not, add it:
.env
检查是否存在
.gitignore
文件且其中包含
.env
。如果没有,添加以下内容:
.env

Environment Variable

环境变量

All Vapi skills expect the API key in the
VAPI_API_KEY
environment variable. The base URL for all API requests is:
https://api.vapi.ai
Authentication is via Bearer token:
Authorization: Bearer $VAPI_API_KEY
所有Vapi技能都期望API密钥存储在
VAPI_API_KEY
环境变量中。所有API请求的基础URL为:
https://api.vapi.ai
认证方式为Bearer令牌:
Authorization: Bearer $VAPI_API_KEY

Additional Resources

额外资源

This skills repository includes a Vapi documentation MCP server (
vapi-docs
) that gives your AI agent access to the full Vapi knowledge base. Use the
searchDocs
tool to look up anything beyond what this skill covers — advanced configuration, troubleshooting, SDK details, and more.
Auto-configured: If you cloned or installed these skills, the MCP server is already configured via
.mcp.json
(Claude Code),
.cursor/mcp.json
(Cursor), or
.vscode/mcp.json
(VS Code Copilot).
Manual setup: If your agent doesn't auto-detect the config, run:
bash
claude mcp add vapi-docs -- npx -y mcp-remote https://docs.vapi.ai/_mcp/server
See the README for full setup instructions across all supported agents.
本技能仓库包含一个Vapi文档MCP服务器
vapi-docs
),可为您的AI Agent提供完整的Vapi知识库访问权限。如果本技能未涵盖您的需求,可使用
searchDocs
工具查找更多内容——包括高级配置、故障排除、SDK详情等。
自动配置:如果您克隆或安装了这些技能,MCP服务器已通过
.mcp.json
(Claude Code)、
.cursor/mcp.json
(Cursor)或
.vscode/mcp.json
(VS Code Copilot)完成配置。
手动配置:如果您的Agent未自动检测到配置,请运行以下命令:
bash
claude mcp add vapi-docs -- npx -y mcp-remote https://docs.vapi.ai/_mcp/server
如需了解所有支持Agent的完整设置说明,请查看README