setup-api-key
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseVapi 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:
- Click "Create Key"
- Name your key (e.g., "development")
- 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密钥:
- 点击**"创建密钥"**
- 为密钥命名(例如"开发环境")
- 立即复制密钥——它只会显示一次
准备好后在此粘贴您的API密钥。
然后等待用户的下一条消息,其中应包含API密钥。
Step 2: Validate and configure
步骤2:验证与配置
Once the user provides the API key:
-
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>" -
If validation fails (non-200 response):
- Tell the user the API key appears to be invalid
- Ask them to double-check and try again
- Remind them of the URL: https://dashboard.vapi.ai/org/api-keys
-
If validation succeeds (200 response), save the API key:Check if afile exists. If so, append to it. If not, create one:
.envVAPI_API_KEY=<the-api-key> -
Confirm success:Your Vapi API key is configured and stored inas
.env.VAPI_API_KEYYou 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密钥:
-
验证密钥:发送如下请求:bash
curl -s -o /dev/null -w "%{http_code}" https://api.vapi.ai/assistant \ -H "Authorization: Bearer <the-api-key>" -
如果验证失败(返回非200状态码):
- 告知用户该API密钥似乎无效
- 请他们仔细检查后重试
- 提醒他们访问URL:https://dashboard.vapi.ai/org/api-keys
-
如果验证成功(返回200状态码),保存API密钥:检查是否存在文件。如果存在,将密钥追加到文件中;如果不存在,则创建该文件:
.envVAPI_API_KEY=<the-api-key> -
确认配置成功:您的Vapi API密钥已配置并存储在文件中,变量名为
.env。VAPI_API_KEY现在您可以使用Vapi的API创建助手、发起通话并构建语音AI Agent。请妥善保管此密钥——不要将其提交到版本控制系统中。
Step 3: Verify .gitignore
步骤3:检查.gitignore
Check if exists and contains . If not, add it:
.gitignore.env.env检查是否存在文件且其中包含。如果没有,添加以下内容:
.gitignore.env.envEnvironment Variable
环境变量
All Vapi skills expect the API key in the environment variable. The base URL for all API requests is:
VAPI_API_KEYhttps://api.vapi.aiAuthentication is via Bearer token:
Authorization: Bearer $VAPI_API_KEY所有Vapi技能都期望API密钥存储在环境变量中。所有API请求的基础URL为:
VAPI_API_KEYhttps://api.vapi.ai认证方式为Bearer令牌:
Authorization: Bearer $VAPI_API_KEYAdditional Resources
额外资源
This skills repository includes a Vapi documentation MCP server () that gives your AI agent access to the full Vapi knowledge base. Use the tool to look up anything beyond what this skill covers — advanced configuration, troubleshooting, SDK details, and more.
vapi-docssearchDocsAuto-configured: If you cloned or installed these skills, the MCP server is already configured via (Claude Code), (Cursor), or (VS Code Copilot).
.mcp.json.cursor/mcp.json.vscode/mcp.jsonManual 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/serverSee the README for full setup instructions across all supported agents.
本技能仓库包含一个Vapi文档MCP服务器(),可为您的AI Agent提供完整的Vapi知识库访问权限。如果本技能未涵盖您的需求,可使用工具查找更多内容——包括高级配置、故障排除、SDK详情等。
vapi-docssearchDocs自动配置:如果您克隆或安装了这些技能,MCP服务器已通过(Claude Code)、(Cursor)或(VS Code Copilot)完成配置。
.mcp.json.cursor/mcp.json.vscode/mcp.json手动配置:如果您的Agent未自动检测到配置,请运行以下命令:
bash
claude mcp add vapi-docs -- npx -y mcp-remote https://docs.vapi.ai/_mcp/server如需了解所有支持Agent的完整设置说明,请查看README。