[Image 1]、[Image 2] 等占位符引用对应图片。POST https://api.onelinkai.cloud/v1/videos/generations| 参数 | 值 |
|---|---|
| Content-Type | application/json |
| Authorization | Bearer <ApiKey> |
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
| model | string | 是 | 模型名称,固定为 happyhorse-1.0-r2v |
| prompt | string | 是 | 视频描述。可用 [Image 1]、[Image 2] … [Image 9] 引用 images 数组中对应位置的参考图片 |
| images | array | 是 | 参考图片 URL 列表,1–9 张,顺序与提示词中的占位符对应 |
| extra.parameters.resolution | string | 否 | 输出分辨 率,默认 720P,可选 480P / 720P |
| extra.parameters.ratio | string | 否 | 画面比例,默认 16:9,可选 16:9 / 9:16 / 1:1 |
| extra.parameters.duration | integer | 否 | 视频时长(秒),默认 5,可选 5 / 10 |
| extra.parameters.watermark_switch | boolean | 否 | 是否添加水印,默认 false |
| extra.parameters.seed | integer | 否 | 随机种子,范围 0–2147483647 |
status: "pending",需轮询查询接口获取最终结果。{
"id": "task-abc123",
"object": "video.generation",
"created_at": 1746000000,
"model": "happyhorse-1.0-r2v",
"status": "pending",
"progress": 0,
"data": null,
"usage": null
}GET https://api.onelinkai.cloud/v1/videos/generations/{task_id}| 参数 | 值 |
|---|---|
| Authorization | Bearer <ApiKey> |
status 枚举值| 值 | 说明 |
|---|---|
| pending | 任务排队中 |
| running | 生成中 |
| completed | 生成完成 |
| failed | 生成失败 |
{
"id": "task-abc123",
"object": "video.generation",
"created_at": 1746000000,
"model": "happyhorse-1.0-r2v",
"status": "running",
"progress": 60,
"data": null,
"usage": null
}{
"id": "task-abc123",
"object": "video.generation",
"created_at": 1746000000,
"model": "happyhorse-1.0-r2v",
"status": "completed",
"progress": 100,
"data": {
"url": "https://cdn.example.com/output/task-abc123.mp4",
"expires_at": 1746086400
},
"usage": {
"duration": 5
}
}{
"id": "task-abc123",
"object": "video.generation",
"created_at": 1746000000,
"model": "happyhorse-1.0-r2v",
"status": "failed",
"progress": 0,
"data": null,
"usage": null,
"error": {
"code": "content_policy_violation",
"message": "输入内容不符合使用规范"
}
}[Image 1]…[Image 9] 占位符一一对应。data.url)有效期有限,请在过期前下载保存。