介绍
# Pamela Calls
立即进行 AI 电话呼叫。无延迟、无需设置、无限扩展。**[ThisIsPamela](https://thisispamela.com)** 是一个用于外呼电话、电话树导航以及通过 SDK、Webhooks 和 MCP 进行集成的语音 AI 平台。
**跳转至:**[安装](#installation) · [快速开始](#quick-start) · [示例](#examples) · [SDK 参考](#sdk-reference)
**ClawHub 技能发布:** `v1.1.11`
## 前置条件
- API 订阅(访问 API 所必需) - 来自您的 API 账户的 API 密钥 - Node.js 18+、Bun 或 Python 3.8+(使用 Python 时)
## 安装
**JavaScript/TypeScript:** (npm, yarn 或 bun) ```bash npm install @thisispamela/sdk # or: yarn add @thisispamela/sdk # or: bun add @thisispamela/sdk ```
**Python:** ```bash pip install thisispamela ```
**React:** (npm, yarn 或 bun) ```bash npm install @thisispamela/react @thisispamela/sdk # or: bun add @thisispamela/react @thisispamela/sdk ```
**CLI:** ```bash npm install -g @thisispamela/cli ```
**MCP (用于基于 MCP 的代理):** ```bash npm install @thisispamela/mcp ```
**Widget (可嵌入,无框架):** ```bash npm install @thisispamela/widget ```
最新版本:SDK / CLI / Widget / MCP / Python `1.1.4`,React `1.1.5`。
## 获取您的 API 密钥
1. 在 [developer.thisispamela.com](https://developer.thisispamela.com) 注册 API 订阅 2. 前往 Settings → API Access 3. 通过 Stripe 设置账单支付 4. 点击 "Create API Key" 5. 立即保存 - 完整密钥(以 `pk_live_` 开头)仅显示一次
## 信任与安全
- **官方包:** npm [@thisispamela](https://www.npmjs.com/org/thisispamela),PyPI [thisispamela](https://pypi.org/project/thisispamela/) —— 请验证这些确切的名称以避免抢注攻击。 - **上线前:** 在试用该技能时使用受限或测试 API 密钥;在您的账户中启用账单提醒;请勿将生产密钥(`pk_live_...`)放入公共配置或日志中。 - **Webhooks:** 始终验证 `X-Pamela-Signature` 标头并保护您的端点;请参阅 [SDK 文档](https://docs.thisispamela.com/sdk/javascript#verifywebhooksignature)了解验证方法。 - **数据:** 通话音频和转录内容将发送至 Pamela,并可能被存储或转发至您的 webhooks;请查阅[隐私和数据实践](https://thisispamela.com)(或联系 [email protected])。 - **费用:** 启用后监控使用情况和账单;仅对连接时长计费,费率为 $0.10/分钟。
## 快速开始
**注意:** 电话号码必须采用 E.164 格式(例如 `+1234567890`)。
### JavaScript
```typescript import { PamelaClient } from '@thisispamela/sdk';
const client = new PamelaClient({ apiKey: 'pk_live_...' });
const call = await client.createCall({ to: '+1234567890', task: 'Call the pharmacy and check if my prescription is ready', voice: 'female', agent_name: 'Pamela', });
const status = await client.getCall(call.id); console.log(status.transcript); ```
### Python
```python from pamela import PamelaClient
client = PamelaClient(api_key="pk_live_...")
call = client.create_call( to="+1234567890", task="Call the pharmacy and check if my prescription is ready", voice="female", agent_name="Pamela", )
status = client.get_call(call["id"]) print(status["transcript"]) ```
### CLI
```bash export PAMELA_API_KEY="pk_live_..."
thisispamela create-call \ --to "+1234567890" \ --task "Call the pharmacy and check if my prescription is ready" ```
## 示例
| 场景 | 示例任务 | |----------|--------------| | 预约安排 | "致电牙医并预约下周的洗牙服务" | | 订单状态 | "致电药房并检查我的处方是否已准备好" | | 客户支持 | "导航 IVR 菜单以到达计费部门" | | 信息收集 | "致电餐厅并询问素食选项" | | 后续跟进 | "致电确认明天下午 2 点的预约" | | IVR 导航 | "导航电话菜单以转接人工代表" |
## 主要功能
- **电话树导航** - 自动导航 IVR 菜单,处理等待和转接 - **自定义工具** - 注册 AI 可以在对话中途调用的工具 - **实时转录** - 通话过程中的 Webhook 更新 - **React 组件** - 用于通话状态和转录的预构建 UI
## SDK 参考
详细的 SDK 文档:
- **[JavaScript SDK](https://docs.thisispamela.com/sdk/javascript)** - 完整的 JS/TS 参考 - **[Python SDK](https://docs.thisispamela.com/sdk/python)** - 完整的 Python 参考 - **[React Components](https://docs.thisispamela.com/sdk/react)** - 组件库 (v1.1.5) - **[Widget](https://docs.thisispamela.com/sdk/widget)** - 适用于任何网站的可嵌入小组件 - **[MCP Server](https://docs.thisispamela.com/sdk/mcp)** - 用于 AI 助手的 MCP 工具 - **[CLI](https://docs.thisispamela.com/sdk/cli)** - 命令行参考
## Webhooks
Pamela 会针对通话生命周期事件发送 webhooks:
- `call.queued` - 通话已创建并排队 - `call.started` - 通话已接通 - `call.completed` - 通话成功结束 - `call.failed` - 通话失败 - `call.transcript_update` - 新的转录条目
唯一需要的凭证是您的 API 密钥。对于 webhooks,请始终验证 `X-Pamela-Signature` 标头;请参阅 SDK 文档了解验证方法。
## 计费
- API 使用费为 **$0.10/分钟** - 每次通话 **最低 1 分钟** - 仅对 **已接通的通话** 计费 - 需要 API 订阅
## 故障排除
**"Invalid API key"** - 验证密钥以 `pk_live_` 开头 - 检查密钥在 API 设置面板中是否处于活动状态
**"403 Forbidden"** - 需要 API 订阅 - 在 developer.thisispamela.com 检查订阅状态
**"Invalid phone number"** - 使用带国家代码的 E.164 格式:`+1234567890`
## 资源
- **网站:** https://thisispamela.com - **文档:** https://docs.thisispamela.com - **演示:** https://demo.thisispamela.com - **API:** https://api.thisispamela.com - **Discord (实时支持):** https://discord.gg/cJj5CK8V - **邮箱:** [email protected]