视频
happyhorse-1.1-i2v API
通过 Modelflare 异步视频入口使用精确的 happyhorse-1.1-i2v 模型 ID。
使用精确模型 ID happyhorse-1.1-i2v。请求中的模型名必须与本页完全一致。
请求参数:duration=5resolution=1080pratio=16:9输入图片
提示词:One continuous take, no cuts. The braided steam keeps thickening until the ribbons lock into one coral and ultraviolet serpent that uncoils along the ceiling, drops down past the stools and pours out through the open door into the rain, the cook in the orange jacket stepping back to let it pass. The camera holds at counter height, then tracks with the serpent to the doorway and tilts to watch it leave. One hard tungsten bulb overhead stays the only warm source. Real weight and inertia, visible density in the steam, no text.
{ "model": "happyhorse-1.1-i2v", "prompt": "One continuous take, no cuts. The braided steam keeps thickening until the ribbons lock into one coral and ultraviolet serpent that uncoils along the ceiling, drops down past the stools and pours out through the open door into the rain, the cook in the orange jacket stepping back to let it pass. The camera holds at counter height, then tracks with the serpent to the doorway and tilts to watch it leave. One hard tungsten bulb overhead stays the only warm source. Real weight and inertia, visible density in the steam, no text.", "seconds": "5", "duration": 5, "resolution": "1080p", "ratio": "16:9", "aspect_ratio": "16:9", "image": "https://example.com/input-image.png"}使用 Modelflare API Key,通过 https://modelflare.dev/v1 发送请求。网关入口为 POST /v1/videos。
Authorization: Bearer YOUR_MODELFLARE_API_KEYcurl https://modelflare.dev/v1/videos \ -H "Authorization: Bearer YOUR_MODELFLARE_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "happyhorse-1.1-i2v", "input": {"prompt": "小猫在草地上奔跑,镜头平滑跟随。", "media": [{"type": "first_frame", "url": "https://example.com/cat.png"}]}, "parameters": {"resolution": "1080P", "duration": 5, "watermark": false} }'任务查询与下载
Section titled “任务查询与下载”提交成功后保存任务 ID。使用 GET /v1/videos/{task_id} 轮询,完成后使用 GET /v1/videos/{task_id}/content 下载;结果地址可能过期,应及时转存。
curl https://modelflare.dev/v1/videos/TASK_ID \ -H "Authorization: Bearer YOUR_MODELFLARE_API_KEY"HappyHorse 使用 input.prompt,并根据 t2v、i2v 或 r2v 模型 ID 选择对应的 input.media 结构。
HappyHorse I2V 在 input.media 中放置一个 first_frame。
| 字段 | 必填 | 说明 |
|---|---|---|
model |
是 | happyhorse-1.1-i2v |
input.prompt |
否 | 可选的运动与镜头描述,最多 5,000 个非中文字符或 2,500 个中文字符 |
input.media[] |
是 | 恰好一个 first_frame;支持公开 URL 或 Base64 data URL,图片小于 20 MB,短边至少 300 px,宽高比 1:2.5–2.5:1 |
parameters.resolution |
否 | 720P / 1080P,默认 1080P |
parameters.ratio |
否 | 不支持;输出跟随首帧图片比例 |
parameters.duration |
否 | 3–15 秒,默认 5 秒 |
parameters.watermark |
否 | 是否添加 HappyHorse 水印 |
parameters.seed |
否 | 0–2,147,483,647 的可选随机种子 |
输入与输出限制
Section titled “输入与输出限制”I2V 使用一个 first_frame 图片;支持公开 URL 或 Base64 data URL,图片小于 20 MB、短边至少 300 px、宽高比 1:2.5–2.5:1;输出大致保持输入图片的画面比例。
错误与失败任务
Section titled “错误与失败任务”参数不符合模型契约时,创建接口会返回带 request ID 的 4xx。异步任务也可能在创建成功后进入 failed;轮询响应中的 error_code 和 error_message 才是该任务的最终原因。不要把同一请求改成另一种 JSON 结构重试。
本页只覆盖 Modelflare 的模型生成/编辑调用。搜索或地图增强、声音管理、元素库管理等资源型接口不属于本页的公开调用范围,也不需要作为模型请求字段传入。
本模型按视频秒计费。请查看模型价格页查看当前销售价、参考原价和完整规格。
媒体契约 · v1
官方来源: Alibaba Cloud Model Studio
契约参数
| Intent 字段 | 控件 | 选项 |
|---|---|---|
resolution | select | 720p / 1080p |
duration | select | 3 / 4 / 5 / 6 / 7 / 8 / 9 / 10 / 11 / 12 / 13 / 14 / 15 |
支持能力
allowed_values·resolution· 720p, 1080pallowed_values·duration· 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15required_assets·reference_asset_idsmax_assets·reference_asset_ids· 1
结构化请求示例
reference
Intent
{
"duration": 3,
"prompt": "A red paper kite over a quiet harbour at dusk.",
"reference_asset_ids": [
"asset_example"
],
"resolution": "720p"
}上游请求
{
"duration": 3,
"image": "https://example.com/reference.png",
"model": "happyhorse-1.1-i2v",
"prompt": "A red paper kite over a quiet harbour at dusk.",
"resolution": "720p",
"seconds": "3"
}