setup-api-key
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseElevenLabs API Key Setup
ElevenLabs API密钥设置
Guide the user through obtaining and configuring an ElevenLabs API key.
指导用户获取并配置ElevenLabs API密钥。
Workflow
操作流程
Step 1: Request the API key
步骤1:获取API密钥
Tell the user:
To set up ElevenLabs, open the API keys page: https://elevenlabs.io/app/settings/api-keys(Need an account? Create one at https://elevenlabs.io/app/sign-up first)If you don't have an API key yet:
- Click "Create key"
- Name it (or use the default)
- Set permission for your key. If you provide a key with "User" permission set to "Read" this skill will automatically verify if your key works
- Click "Create key" to confirm
- Copy the key immediately - it's only shown once!
Paste your API key here when ready.
Then wait for the user's next message which should contain the API key.
告知用户:
要设置ElevenLabs,请打开API密钥页面:https://elevenlabs.io/app/settings/api-keys如果您还没有API密钥:
- 点击“Create key”
- 为其命名(或使用默认名称)
- 设置密钥权限。如果您提供的密钥“User”权限设为“Read”,本技能将自动验证密钥是否可用
- 点击“Create key”确认
- 立即复制密钥 - 该密钥仅会显示一次!
准备好后在此粘贴您的API密钥。
然后等待用户的下一条消息,其中应包含API密钥。
Step 2: Validate and configure
步骤2:验证与配置
Once the user provides the API key:
-
Validate the key by making a request:
GET https://api.elevenlabs.io/v1/user Header: xi-api-key: <the-api-key> -
If validation fails:
- Tell the user the API key appears to be invalid
- Ask them to try again
- Remind them of the URL: https://elevenlabs.io/app/settings/api-keys
- If it fails a second time, display an error and exit
-
If validation succeeds, save the API key in afile:
.envELEVENLABS_API_KEY=<the-api-key> -
Confirm success:Done! Your key is stored as an environment variable in .env Keep the key safe! Don't share it with anyone!
一旦用户提供API密钥:
-
验证密钥:发送以下请求:
GET https://api.elevenlabs.io/v1/user Header: xi-api-key: <the-api-key> -
如果验证失败:
- 告知用户该API密钥似乎无效
- 请他们重试
- 提醒他们访问该URL:https://elevenlabs.io/app/settings/api-keys
- 如果第二次仍失败,显示错误并退出
-
如果验证成功,将API密钥保存到文件中:
.envELEVENLABS_API_KEY=<the-api-key> -
确认成功:完成!您的密钥已作为环境变量存储在.env文件中 请妥善保管密钥!不要与任何人分享!