prompt必填HeyGen Avatar V API — 如何接入并付费
HeyGen Avatar V — 最新的口播数字人引擎:使用现成的 HeyGen 数字人演绎您的配音,动作和唇形同步比 Avatar IV 更自然。需要提供 avatar(现成的 HeyGen 数字人名称,例如“Ann Doctor Standing”)和 audio_url;视频时长与音频相同(最长 5 分钟)。720p / 1080p / 4K。按输出视频的秒数计费。
组合你需要的输出结果
heygen-avatar-v:flow该模型在目录中仅公布最低价格。
什么是 HeyGen Avatar V
HeyGen Avatar V — 最新的口播数字人引擎:使用现成的 HeyGen 数字人演绎您的配音,动作和唇形同步比 Avatar IV 更自然。需要提供 avatar(现成的 HeyGen 数字人名称,例如“Ann Doctor Standing”)和 audio_url;视频时长与音频相同(最长 5 分钟)。720p / 1080p / 4K。按输出视频的秒数计费。
契约概览
- 输入
- text, audio
- 输出
- video
- 模式
- 异步(任务 + 轮询)
- 状态轮询
- 每 3 秒 · 最多 600 秒
优势
- 定价:按秒计费
- 输入:文本、音频
- 3 个可配置选项
- 用于媒体生成的一个 API 密钥
应用场景
- 社交媒体片段
- 宣传片和片头序列
- 静态图像动画
- 故事板和动态分镜
API 契约
生成是异步的:先创建任务,然后轮询状态直至完成。
- 创建任务
- POST /api/media/generate
- 检查状态
- GET /api/media/jobs/{jobId}
- 输入
- text, audio
- 输出
- video
- 轮询
- 每 3 秒 · 最多 600 秒
- 鉴权
- Authorization: Bearer sk-pv-…
请求示例
在 Bearer 请求头中传递密钥。API 会返回 jobId 用于轮询状态。
curl -sS https://getvibeapi.com/api/media/generate \
-H "Authorization: Bearer $GETVIBE_API_KEY" \
-H "Content-Type: application/json" \
--data-binary '{"model":"heygen-avatar-v:flow","opts":{"avatar":"example","audio_url":"https://example.com/audio_url.mp3","resolution":"720p","aspect_ratio":"auto"}}'JavaScript
const response = await fetch('https://getvibeapi.com/api/media/generate', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.GETVIBE_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"model": "heygen-avatar-v:flow",
"opts": {
"avatar": "example",
"audio_url": "https://example.com/audio_url.mp3",
"resolution": "720p",
"aspect_ratio": "auto"
}
}),
});
if (!response.ok) throw new Error(`GetVibe API: ${response.status}`);
const { jobId } = await response.json();
console.log(jobId);API 请求参数
通过 GetVibe API 向 HeyGen Avatar V 发起请求的参数。
audio_urlavatar必填resolutionaspect_ratioaudio_file_idaudio_base64| 参数 | 类型 | 取值 | 默认值 | 价格 |
|---|---|---|---|---|
prompt必填 | text | text description | required | — |
audio_url | URL | Public audio URL | — | — |
avatar必填 | text / number | any value | — | Included in the base price |
resolution | option selection | 720p (default) · 1080p · 4K | 720p | Included in the base price |
aspect_ratio | option selection | Auto (default) · 16:9 · 9:16 · 4:5 · 5:4 · 1:1 | 自动 | Included in the base price |
audio_file_id | text | Alternative to audio_url: the id of your own file from POST /v1/files (file-pv-…) | — | Included in the base price |
audio_base64 | text | Alternative to audio_url: the file inline, as base64 or a data: URI | — | Included in the base price |
请求:POST https://getvibeapi.com/api/media/generate。价格以 USD 计。
HeyGen Avatar V 的价格
HeyGen Avatar V 的费用:从 $0.142857 per second。价格按当前汇率动态计算,最终扣费见 API 响应(priceRub)。以 USD 支付,无订阅。
默认请求的实际费用
若不传参数,请求将使用这些取值:Resolution — 720p, Frame format — Auto。 该请求的费用为 $0.142857。
README
HeyGen Avatar V 的机器可读契约包含请求 schema、操作、限制、轮询和响应示例。
# HeyGen Avatar V
公开模型:heygen-avatar-v:flow
创建任务: POST /api/media/generate
检查状态: GET /api/media/jobs/{jobId}
## 输入参数
- `prompt` (text): text description; 默认: required
- `audio_url` (URL): Public audio URL; 默认: —
- `avatar` (text / number): any value; 默认: —
- `resolution` (option selection): 720p (default) · 1080p · 4K; 默认: 720p
- `aspect_ratio` (option selection): Auto (default) · 16:9 · 9:16 · 4:5 · 5:4 · 1:1; 默认: Auto
- `audio_file_id` (text): Alternative to audio_url: the id of your own file from POST /v1/files (file-pv-…); 默认: —
- `audio_base64` (text): Alternative to audio_url: the file inline, as base64 or a data: URI; 默认: —
## 公开变体
- `heygen-avatar-v:flow`: 默认关于 HeyGen Avatar V API 的常见问题
HeyGen Avatar V 的价格是多少?
HeyGen Avatar V 的价格:从 $0.142857 per second。价格按当前汇率动态计算。
是否兼容 OpenAI SDK?
是的,API 完全兼容 OpenAI。只需将 base_url 改为 https://getvibeapi.com/v1 并设置密钥——其余代码不变。