Infinitalk
Infinitalk 模型通过一个统一的异步任务 API 调用。用 POST /api/generate 发起任务,再轮询 GET /api/generate/{taskId} 直到完成。本系列提供 1 个端点。
概览
每个端点共享相同的外层结构 —— 只有 model 和 input 字段不同。可在模型市场的 playground 中运行任意一个。
认证
在 /api-keys 创建 API 密钥,然后作为 Bearer token 发送。已登录时从浏览器发起的请求也可通过会话 cookie 生效。
Authorization: Bearer <YOUR_API_KEY>创建任务
POST
POST https://api.lithovas.com/api/generate请求体:{ "model": "<slug>", "input": { … } }
响应:{ "taskId": "<id>", "state": "waiting" }
查询结果
GET
GET https://api.lithovas.com/api/generate/<taskId>响应:{ "taskId", "state": "waiting" | "success" | "fail", "resultUrls": [ … ], "creditsConsumed", "failMsg", "balance" }
异步
创建任务返回 200 只表示任务已被接受 —— 并非已完成。请轮询此端点,直到
state 变为 success 或 fail。失败任务不计费。端点
| 模型 | 任务 | model slug |
|---|---|---|
| InfiniTalk | Lip Sync | infinitalk/from-audio |
InfiniTalk · Lip Sync
POSTLip Sync
infinitalk/from-audioinput 字段
image_urlstring必填URL of the input image (resized/center-cropped if needed)
audio_urlstring必填The URL of the audio file for lip-sync generation
promptstring必填Text guidance for video generation (max 5000 chars)
resolutionenum<string>可选Output video resolution option
seednumber可选Random seed for reproducibility (10000-1000000)
示例
cURL
curl -X POST https://api.lithovas.com/api/generate \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "infinitalk/from-audio",
"input": {
"image_url": "https://example.com/input.jpg",
"audio_url": "https://example.com/reference.mp3",
"prompt": "A cinematic red panda surfing through neon rain at dusk.",
"resolution": "480p",
"seed": 42
}
}'