视频
happyhorse-1.1-r2v API
通过 Modelflare 异步视频入口使用精确的 happyhorse-1.1-r2v 模型 ID。
使用精确模型 ID happyhorse-1.1-r2v。请求中的模型名必须与本页完全一致。
请求参数:duration=5resolution=1080pratio=16:9输入图片
提示词:One continuous take, no cuts. Keep the woman in the crimson satin coat and the peeling carpet ribbons from the reference and move the event outdoors: she walks out of a revolving door onto a wet plaza and the patterned ribbons keep tearing up behind her, now lifting off the paving stones and streaming out across the square in a long coloured wake. The camera tracks backward ahead of her at waist height and cranes up as the wake spreads. One hard green sign light above the door, warm street lamps across the plaza. Real weight and inertia, satin and wet stone, no text.
{ "model": "happyhorse-1.1-r2v", "prompt": "One continuous take, no cuts. Keep the woman in the crimson satin coat and the peeling carpet ribbons from the reference and move the event outdoors: she walks out of a revolving door onto a wet plaza and the patterned ribbons keep tearing up behind her, now lifting off the paving stones and streaming out across the square in a long coloured wake. The camera tracks backward ahead of her at waist height and cranes up as the wake spreads. One hard green sign light above the door, warm street lamps across the plaza. Real weight and inertia, satin and wet stone, 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-r2v", "input": {"prompt": "[Image 1] 中的人拿起 [Image 2] 中的折扇。", "media": [{"type": "reference_image", "url": "https://example.com/person.jpg"}, {"type": "reference_image", "url": "https://example.com/object.jpg"}]}, "parameters": {"resolution": "1080P", "ratio": "16:9", "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 R2V 在 input.media 中放置 1–9 个 reference_image,并在提示词中按顺序引用。
| 字段 | 必填 | 说明 |
|---|---|---|
model |
是 | happyhorse-1.1-r2v |
input.prompt |
是 | Optional motion and camera description, up to 5,000 non-Chinese or 2,500 Chinese characters |
input.media[] |
是 | 1–9 个 reference_image;公开 URL 或 Base64,单张小于 20 MB,短边至少 400 px |
parameters.resolution |
否 | 720P / 1080P,默认 1080P |
parameters.ratio |
否 | 16:9 / 9:16 / 1:1 / 4:3 / 3:4 / 4:5 / 5:4 / 9:21 / 21:9,默认 16:9 |
parameters.duration |
否 | 3–15 秒,默认 5 秒 |
parameters.watermark |
否 | 是否添加 HappyHorse 水印 |
parameters.seed |
否 | 0–2,147,483,647 的可选随机种子 |
输入与输出限制
Section titled “输入与输出限制”R2V 使用 1–9 个 reference_image;提示词按数组顺序引用 Image 1、Image 2 等。提示词最多 5,000 个非中文字符或 2,500 个中文字符,图片小于 20 MB 且短边至少 400 px。
错误与失败任务
Section titled “错误与失败任务”参数不符合模型契约时,创建接口会返回带 request ID 的 4xx。异步任务也可能在创建成功后进入 failed;轮询响应中的 error_code 和 error_message 才是该任务的最终原因。不要把同一请求改成另一种 JSON 结构重试。
本页只覆盖 Modelflare 的模型生成/编辑调用。搜索或地图增强、声音管理、元素库管理等资源型接口不属于本页的公开调用范围,也不需要作为模型请求字段传入。
本模型按视频秒计费。请查看模型价格页查看当前销售价、参考原价和完整规格。
媒体契约 · v1
官方来源: Alibaba Cloud Model Studio
契约参数
| Intent 字段 | 控件 | 选项 |
|---|---|---|
ratio | select | 16:9 / 9:16 / 1:1 / 4:3 / 3:4 / 4:5 / 5:4 / 21:9 / 9:21 |
resolution | select | 720p / 1080p |
duration | select | 3 / 4 / 5 / 6 / 7 / 8 / 9 / 10 / 11 / 12 / 13 / 14 / 15 |
支持能力
allowed_values·ratio· 16:9, 9:16, 1:1, 4:3, 3:4, 4:5, 5:4, 21:9, 9:21allowed_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· 9
结构化请求示例
reference
Intent
{
"duration": 3,
"prompt": "A red paper kite over a quiet harbour at dusk.",
"ratio": "16:9",
"reference_asset_ids": [
"asset_example"
],
"resolution": "720p"
}上游请求
{
"duration": 3,
"image": "https://example.com/reference.png",
"model": "happyhorse-1.1-r2v",
"prompt": "A red paper kite over a quiet harbour at dusk.",
"ratio": "16:9",
"resolution": "720p",
"seconds": "3"
}