hapi
hapi copied to clipboard
HTTP 400 : {"allowed":false,"error":"ElevenLabs API key not configured"}
What version of HAPI is running?
hapi version: 0.15.0
What platform is your computer?
No response
What issue are you seeing?
最新版的用语音输入报错,macos
What steps can reproduce the bug?
点击语音按钮
What is the expected behavior?
No response
Additional information
No response
这是 hub 的 /api/voice/token 在未配置 ElevenLabs API key 时返回的 400。代码逻辑:请求体未提供 customApiKey/customAgentId 时,使用环境变量 ELEVENLABS_API_KEY/ELEVENLABS_AGENT_ID;缺少 key 就直接返回 "ElevenLabs API key not configured"。请在启动 hub 的环境里设置 ELEVENLABS_API_KEY(可选设置 ELEVENLABS_AGENT_ID),重启 hub 后再试。
Relevant code:
hub/src/web/routes/voice.ts:120- /voice/token 入口与 customApiKey/customAgentId 优先级hub/src/web/routes/voice.ts:129- 缺少 ELEVENLABS_API_KEY 返回 400hub/README.md:27- ELEVENLABS_API_KEY/AGENT_ID 配置说明
Need more info:
- 你是用
hapi hub还是bun run dev:hub启动的? - 启动该进程的环境里是否已设置
ELEVENLABS_API_KEY?
HAPI Bot