OmniHuman 2.0 是字节跳动的音频驱动数字人模型:一张人像加一段驱动音频(可选提示词),生成口型同步的说话或唱歌视频,表情和肢体动作跟着声音走。在 APIMODELS 上它是统一视频端点里的一个模型名 omnihuman-2.0。成片时长等于音频时长(4-300 秒),画幅跟随人像,约 720p,默认无水印。按驱动音频秒数计费,每秒 $0.091,向上取整到整秒。
| 驱动音频 | 价格 |
|---|---|
| 每秒(向上取整到整秒) | $0.091 |
| 4 秒(最低) | $0.364 |
| 5.36 秒(按 6 秒计) | $0.546 |
| 10 秒 | $0.91 |
| 30 秒 | $2.73 |
| 60 秒 | $5.46 |
| 300 秒(最高) | $27.30 |
计费秒数 = 驱动音频时长向上取整,由我们在建任务时测量(客户端传的时长字段不参与计费)。图片、提示词和水印设置都不影响价格。读不出时长或不在 4-300 秒之间的音频在扣费前返回 400;生成失败不扣费。
所有请求在 Header 携带 API Key:
Authorization: Bearer YOUR_API_KEYhttps://api.apimodels.app/v1/video/generations·GET/v1/video/generations?task_id=# OmniHuman 2.0 — one portrait + one driving audio -> lip-synced talking video.
# image_url and audio_url are required; prompt and enable_watermark are optional.
# The video is as long as the audio; billed $0.091 per audio second, rounded up.
curl -X POST https://api.apimodels.app/v1/video/generations \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "omnihuman-2.0",
"image_url": "https://example.com/presenter.jpg",
"audio_url": "https://example.com/voice.mp3",
"prompt": "She smiles and gestures with her right hand; slow push-in",
"enable_watermark": false
}'
# Response (async — a task is created):
# { "code": 200, "msg": "success", "data": { "taskId": "clxxx", "state": "pending", "model": "omnihuman-2.0" } }
# Poll every 10-15 s until completed (result files are kept 30 days)
curl "https://api.apimodels.app/v1/video/generations?task_id=TASK_ID" \
-H "Authorization: Bearer YOUR_API_KEY"
# { "code": 200, "data": { "state": "completed",
# "resultUrls": ["https://r2.apimodels.app/videos/clxxx.mp4"] } }任务状态依次是 pending → processing → completed 或 failed。completed 时 data.resultUrls[0] 是 MP4(带你的音频音轨);failed 时原因在 data.failMsg,费用自动退回。我们 2026 年 10 月 29 日实测一段 5.36 秒的音频约两分钟完成,这是一次实测,不是承诺;每 10-15 秒轮询一次即可。
不想轮询就在创建请求里传 callback_url。任务到达 completed 或 failed 时,我们向这个地址发一个 HTTP POST(JSON)。投递失败会按指数退避重试,30 分钟内持续重试,直到你的接口返回 2xx。回调地址必须公网可达,localhost 和内网地址在创建时就返回 400。轮询接口照常可用。
POST {your callback_url}
Content-Type: application/json
{
"code": 200,
"msg": "success",
"data": {
"taskId": "clxxx...",
"model": "omnihuman-2.0",
"state": "completed", // or "failed"
"param": "<JSON string>", // your request, JSON.parse once
"resultJson": "<JSON string> | null", // {"resultUrls": ["https://...mp4"]}, JSON.parse once
"failCode": null,
"failMsg": null
}
}| 字段 | 必填 | 类型 | 说明 |
|---|---|---|---|
| model | 是 | string | omnihuman-2.0(omnihuman-2-0、omnihuman-2、omnihuman2 也可) |
| image_url | 是 | string | 人像,公网 URL 或 base64 data URI,只能一张。也接受 image,或只含一项的 image_urls。 |
| audio_url | 是 | string | 驱动音频(说话或唱歌),公网 URL 或 base64 data URI。WAV 或 MP3,4-300 秒,小于 15 MB。它的时长决定成片时长和价格。 |
| prompt | 否 | string | 引导手势、情绪、姿态和运镜,最多 300 个字符;支持中文、英文、日语、韩语、墨西哥西班牙语、印尼语。 |
| enable_watermark | 否 | boolean | 是否加水印,默认 false。 |
| callback_url | 否 | string | 任务完成时我们向该地址 POST 结果;不传就轮询 GET 查询。 |
没有时长和分辨率参数:时长取自音频,画幅取自人像。要竖屏就传竖图,要多长就先把音频剪到那么长。
参数问题在创建时同步返回 400({"code": 400, "msg": "..."}),不会建任务、不扣费。下表 msg 是当前原文(N 为实际数值)。
| msg | 原因 / 怎么改 |
|---|---|
image_url is required: one portrait image (jpeg / png / webp, 300–6000 px per side, aspect ratio between 0.4 and 2.5) | 没传图片。用 image_url(或 image、只含一项的 image_urls)传一张人像。 |
OmniHuman 2.0 takes exactly one image; got N | 传了多张图。只保留一张人像。 |
audio_url is required: the driving audio (wav or mp3, 4–300 seconds, under 15 MB) | 没传驱动音频。 |
Unable to read the driving audio duration — provide a publicly reachable wav or mp3 URL | 我们读不出音频时长:链接需要登录、已过期,或文件不是可识别的 WAV / MP3。换一个公网可直接下载的链接。 |
driving audio is Ns — OmniHuman 2.0 needs at least 4 seconds | 音频短于 4 秒(按向上取整后的秒数判断)。 |
driving audio is Ns — OmniHuman 2.0 accepts up to 300 seconds (5 minutes) | 音频长于 300 秒。剪短,或拆成几段分别生成。 |
prompt is N characters; OmniHuman 2.0 accepts up to 300 | 提示词超过 300 个字符。 |
enable_watermark must be true or false | enable_watermark 传成了字符串或数字;只接受布尔值。 |
试一试:Playground;用例、价格例子以及与 OmniHuman 1.5 的对比见 OmniHuman 2.0 模型页。
按驱动音频每秒 $0.091 计费,向上取整到整秒,在建任务时测量:5.36 秒按 6 秒算,$0.546;最少 4 秒($0.364),最多 300 秒($27.30)。生成失败不扣费。
model(omnihuman-2.0)、image_url(只能一张人像,也接受 image 或只含一项的 image_urls)和 audio_url(驱动音频)。prompt(最多 300 字符)、enable_watermark(默认 false)和 callback_url 可选。没有时长和分辨率字段。
WAV 或 MP3,4 到 300 秒,小于 15 MB,公网 URL 或 base64 data URI 均可。时长在建任务时测量;读不出时长或不在 4-300 秒之间的音频,在扣费前返回 400。
默认没有。APIMODELS 上 enable_watermark 默认 false,传 true 才会加,开不开都不影响价格。
每 10-15 秒轮询一次 GET /v1/video/generations?task_id=,state 为 completed 后从 resultUrls 取 MP4;或者传 callback_url,等任务完成时的 POST 回调。结果文件保留 30 天。