Workflows2026年5月7日·1 分钟阅读

Vapi — Voice AI Agent Platform with STT, LLM & TTS

Vapi glues STT, LLM, TTS, turn-taking into one voice agent API. Build phone agents in minutes. Twilio + Deepgram + ElevenLabs + GPT-4o stack.

Agent 就绪

这个资产可以被 Agent 直接读取和安装

TokRepo 同时提供通用 CLI 命令、安装契约、metadata JSON、按适配器生成的安装计划和原始内容链接,方便 Agent 判断适配度、风险和下一步动作。

Stage only · 17/100Stage only
Agent 入口
任意 MCP/CLI Agent
类型
Skill
安装
Stage only
信任
信任等级:New
入口
Asset
通用 CLI 安装命令
npx tokrepo install 1cea9022-eb14-4c9d-ae40-dbf5948c9139

简介

Vapi 是语音 AI agent 平台 —— STT(Deepgram / Whisper)、LLM(GPT-4o / Claude / 自定义)、TTS(ElevenLabs / Cartesia / PlayHT)、轮次切换胶水都通过一个 API 露出。5 分钟起一个外呼或内呼电话 agent。适合不想自己拼 5 个供应商 SDK 的语音产品创业者。兼容 Twilio 号码、Vonage、自定义 SIP。装机时间 5 分钟(注册 + 一个电话号)。


创建第一个语音 agent

curl -X POST https://api.vapi.ai/assistant \
  -H "Authorization: Bearer $VAPI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Acme Concierge",
    "firstMessage": "Hi, this is Acme. How can I help you today?",
    "model": {
      "provider": "openai",
      "model": "gpt-4o",
      "messages": [
        {
          "role": "system",
          "content": "You are a concierge for Acme Hotels. Greet the caller, ask how you can help, and stay friendly. If they want to book, ask for dates and party size. Speak naturally and concisely."
        }
      ]
    },
    "voice": {
      "provider": "11labs",
      "voiceId": "21m00Tcm4TlvDq8ikWAM"
    },
    "transcriber": {
      "provider": "deepgram",
      "model": "nova-2"
    }
  }'

发外呼电话

curl -X POST https://api.vapi.ai/call/phone \
  -H "Authorization: Bearer $VAPI_API_KEY" \
  -d '{
    "phoneNumberId": "your-twilio-number-id",
    "customer": { "number": "+15551234567" },
    "assistantId": "assistant-id-from-step-1"
  }'

Vapi 拨用户号码、播放 firstMessage、实时转录用户讲话、发给 GPT-4o、把响应流式推过 ElevenLabs 回播。亚秒级轮次切换。

加自定义工具

{
  "tools": [
    {
      "type": "function",
      "function": {
        "name": "check_availability",
        "description": "Check room availability for given dates and party size",
        "parameters": {
          "type": "object",
          "properties": {
            "checkin": { "type": "string", "format": "date" },
            "checkout": { "type": "string", "format": "date" },
            "guests": { "type": "integer" }
          },
          "required": ["checkin", "checkout", "guests"]
        }
      },
      "server": {
        "url": "https://your-backend.example.com/check-availability"
      }
    }
  ]
}

LLM 决定调 check_availability 时,Vapi POST 到你的后端,拿到结果后 LLM 用结果继续通话。

为啥用 Vapi 而不是自己拼

手动搭这套:Twilio Media Streams + Deepgram WebSocket + 你的 LLM + ElevenLabs 流式 WebSocket + VAD 状态机 + barge-in。Vapi 打包好了。代价:音频管道厂商锁定。


FAQ

Q: Vapi 免费吗? A: Vapi 有免费试用包含一些通话分钟。之后按分钟付费(根据 STT/LLM/TTS 组合大约 $0.05-0.20/分钟)。也能用自己的 provider key 绕过 Vapi 加价。价格见 vapi.ai/pricing。

Q: 能用 Claude 而不是 GPT-4o 吗? A: 能 —— Vapi 支持 OpenAI / Anthropic / Google / Groq / Together / Together 的 Llama / 自定义 OpenAI 兼容端点(所以能通过 Mistral 或 LiteLLM proxy 接 Codestral)。切换 model.provider 字段就行。

Q: 轮次切换多快? A: Vapi 目标端到端首字节延迟约 500-800ms。最大变量是 LLM —— GPT-4o-mini 最快、Claude Sonnet 质量最高。模型用 OpenAI Realtime 延迟降到 300-400ms。


🙏

来源与感谢

Built by Vapi. Commercial product with free trial.

vapi.ai — API documentation

讨论

登录后参与讨论。
还没有评论,来写第一条吧。

相关资产