跳转到内容
打开 Castaly控制台

视频

happyhorse-1.1-t2v API

通过 Modelflare 异步视频入口使用精确的 happyhorse-1.1-t2v 模型 ID。

使用精确模型 ID happyhorse-1.1-t2v。请求中的模型名必须与本页完全一致。

示例输出happyhorse-1.1-t2vPOST /v1/videos5.2s

请求参数:duration=5resolution=1080pratio=16:9

提示词:One continuous take, no cuts. An arcade after closing, cabinets still on, carpet glowing under blacklight. A figure in a holographic windbreaker slaps the side of one cabinet and its picture comes off the screen: the pixels lift as solid coloured tiles, swarm out across the aisle and pull the pictures off every other machine with them, until the whole room is a moving cloud of cyan and hot pink squares. The camera tracks sideways down the aisle and turns into the swarm as it builds. One hard cyan key from the nearest screen, deep violet ambient. Real weight and inertia, each tile catching light separately, no text.

生成该示例的请求
{
"model": "happyhorse-1.1-t2v",
"prompt": "One continuous take, no cuts. An arcade after closing, cabinets still on, carpet glowing under blacklight. A figure in a holographic windbreaker slaps the side of one cabinet and its picture comes off the screen: the pixels lift as solid coloured tiles, swarm out across the aisle and pull the pictures off every other machine with them, until the whole room is a moving cloud of cyan and hot pink squares. The camera tracks sideways down the aisle and turns into the swarm as it builds. One hard cyan key from the nearest screen, deep violet ambient. Real weight and inertia, each tile catching light separately, no text.",
"seconds": "5",
"duration": 5,
"resolution": "1080p",
"ratio": "16:9",
"aspect_ratio": "16:9"
}

使用 Modelflare API Key,通过 https://modelflare.dev/v1 发送请求。网关入口为 POST /v1/videos。

HTTP
Authorization: Bearer YOUR_MODELFLARE_API_KEY
终端窗口bash
curl https://modelflare.dev/v1/videos \
-H "Authorization: Bearer YOUR_MODELFLARE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "happyhorse-1.1-t2v",
"input": {"prompt": "一只白猫在雨夜霓虹街道上奔跑,电影感跟拍"},
"parameters": {"resolution": "1080P", "ratio": "16:9", "duration": 5, "watermark": false}
}'

提交成功后保存任务 ID。使用 GET /v1/videos/{task_id} 轮询,完成后使用 GET /v1/videos/{task_id}/content 下载;结果地址可能过期,应及时转存。

终端窗口bash
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 T2V 使用 input.prompt 生成视频。

字段 必填 说明
model 是 happyhorse-1.1-t2v
input.prompt 是 Optional motion and camera description, up to 5,000 non-Chinese or 2,500 Chinese characters
input.media[] 否 —
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 的可选随机种子

T2V 只需要 input.prompt;提示词最多 5,000 个非中文字符或 2,500 个中文字符;输出 720P/1080P,比例有九种枚举,时长 3–15 秒。

参数不符合模型契约时,创建接口会返回带 request ID 的 4xx。异步任务也可能在创建成功后进入 failed;轮询响应中的 error_code 和 error_message 才是该任务的最终原因。不要把同一请求改成另一种 JSON 结构重试。

本页只覆盖 Modelflare 的模型生成/编辑调用。搜索或地图增强、声音管理、元素库管理等资源型接口不属于本页的公开调用范围,也不需要作为模型请求字段传入。

本模型按视频秒计费。请查看模型价格页查看当前销售价、参考原价和完整规格。

媒体契约 · v1

契约 ID: media.happyhorse-1-1-t2v.v1Adapter: video.happyhorse.v1@v1指纹: 4f3b6a3c628a981b1d15070759d8f96df185c43c684a22bba802349f85e3e6f9

官方来源: Alibaba Cloud Model Studio

契约参数

Intent 字段控件选项
ratioselect16:9 / 9:16 / 1:1 / 4:3 / 3:4 / 4:5 / 5:4 / 21:9 / 9:21
resolutionselect720p / 1080p
durationselect3 / 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:21
  • allowed_values · resolution · 720p, 1080p
  • allowed_values · duration · 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15

结构化请求示例

text

Intent

{
  "duration": 3,
  "prompt": "A red paper kite over a quiet harbour at dusk.",
  "ratio": "16:9",
  "resolution": "720p"
}

上游请求

{
  "duration": 3,
  "model": "happyhorse-1.1-t2v",
  "prompt": "A red paper kite over a quiet harbour at dusk.",
  "ratio": "16:9",
  "resolution": "720p",
  "seconds": "3"
}