curl --request POST \
--url https://api.evolink.ai/v1/videos/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "happyhorse-1.0-video-edit",
"prompt": "让视频中的角色穿上图片中的条纹毛衣",
"video_urls": [
"https://cdn.example.com/source.mp4"
],
"image_urls": [
"https://cdn.example.com/sweater.jpg"
],
"quality": "720p",
"keep_original_sound": true
}
'{
"created": 1761313744,
"id": "task-unified-1761313744-h1edgh12",
"model": "happyhorse-1.0-video-edit",
"object": "video.generation.task",
"progress": 0,
"status": "pending",
"task_info": {
"can_cancel": true,
"estimated_time": 2400,
"video_duration": 6
},
"type": "video",
"usage": {
"billing_rule": "per_second",
"credits_reserved": 1608660
}
}{
"error": {
"code": "missing_video_urls",
"message": "happyhorse-1.0-video-edit requires video_urls or video_url",
"type": "invalid_request_error"
}
}{
"error": {
"code": "unauthorized",
"message": "Invalid or expired token",
"type": "authentication_error"
}
}{
"error": {
"code": "insufficient_quota",
"message": "Insufficient quota. Please top up your account.",
"type": "insufficient_quota"
}
}{
"error": {
"code": "model_access_denied",
"message": "Token does not have access to model: happyhorse-1.0-video-edit",
"type": "invalid_request_error"
}
}{
"error": {
"code": "rate_limit_exceeded",
"message": "Too many requests, please try again later",
"type": "rate_limit_error"
}
}{
"error": {
"code": "internal_error",
"message": "Internal server error",
"type": "api_error"
}
}HappyHorse 1.0
HappyHorse 1.0 Video-Edit 视频编辑
- HappyHorse 1.0 视频编辑,输入 1 个源视频 + 文本指令完成风格变换、局部替换等
- 可选传入 0~5 张参考图,用于风格 / 主体引导
- 不支持
duration:输出视频时长 =min(输入视频时长, 15),由模型决定 - 不支持
aspect_ratio:输出宽高比与源视频一致 - 计费规则特殊:
(输入视频时长 + 输出视频时长) × 分辨率单价;模型会对超过 15 秒的输入截断按 15 秒计算 - 异步处理模式,使用返回的任务ID 进行查询
- 生成的视频链接,有效期为7天,请尽快保存
- 极少数情况下,生成结果会以官方原始链接交付,有效期可能短于 7 天,请及时下载保存。
POST
/
v1
/
videos
/
generations
curl --request POST \
--url https://api.evolink.ai/v1/videos/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "happyhorse-1.0-video-edit",
"prompt": "让视频中的角色穿上图片中的条纹毛衣",
"video_urls": [
"https://cdn.example.com/source.mp4"
],
"image_urls": [
"https://cdn.example.com/sweater.jpg"
],
"quality": "720p",
"keep_original_sound": true
}
'{
"created": 1761313744,
"id": "task-unified-1761313744-h1edgh12",
"model": "happyhorse-1.0-video-edit",
"object": "video.generation.task",
"progress": 0,
"status": "pending",
"task_info": {
"can_cancel": true,
"estimated_time": 2400,
"video_duration": 6
},
"type": "video",
"usage": {
"billing_rule": "per_second",
"credits_reserved": 1608660
}
}{
"error": {
"code": "missing_video_urls",
"message": "happyhorse-1.0-video-edit requires video_urls or video_url",
"type": "invalid_request_error"
}
}{
"error": {
"code": "unauthorized",
"message": "Invalid or expired token",
"type": "authentication_error"
}
}{
"error": {
"code": "insufficient_quota",
"message": "Insufficient quota. Please top up your account.",
"type": "insufficient_quota"
}
}{
"error": {
"code": "model_access_denied",
"message": "Token does not have access to model: happyhorse-1.0-video-edit",
"type": "invalid_request_error"
}
}{
"error": {
"code": "rate_limit_exceeded",
"message": "Too many requests, please try again later",
"type": "rate_limit_error"
}
}{
"error": {
"code": "internal_error",
"message": "Internal server error",
"type": "api_error"
}
}授权
##所有接口均需要使用Bearer Token进行认证##
获取 API Key:
访问 API Key 管理页面 获取您的 API Key
使用时在请求头中添加:
Authorization: Bearer YOUR_API_KEY
请求体
application/json
待编辑的源视频 URL,必填,仅 1 个(取数组第 1 个)
输入视频要求:
- 支持格式:MP4、MOV(建议 H.264 编码)
- 时长:
3~60秒 - 模型会对超过
15秒的输入自动截取前15秒 - 分辨率:长边 ≤
2160像素,短边 ≥320像素 - 宽高比:
1:2.5~2.5:1 - 文件大小:≤
100MB - 帧率:>
8fps - 视频 URL 必须公网可访问(HTTP 或 HTTPS),不支持私有 OSS、内网或需要鉴权的链接
兼容字段: 也接受 video_url / video(优先级低于 video_urls)
Required array length:
1 element示例:
["https://cdn.example.com/source.mp4"]
任务完成后的 HTTPS 回调地址
回调时机:
- 任务完成(completed)、失败(failed)或取消(cancelled)时触发
- 在计费确认完成后发送
安全限制:
- 仅支持 HTTPS 协议
- 禁止回调到内网 IP 地址(127.0.0.1、10.x.x.x、172.16-31.x.x、192.168.x.x 等)
- URL 长度不超过
2048字符
回调机制:
- 超时时间:
10秒 - 失败后最多重试
3次(分别在失败后1/2/4秒重试) - 回调响应体格式与任务查询接口返回格式一致
- 返回 2xx 状态码视为成功,其他状态码触发重试
示例:
"https://your-domain.com/webhooks/video-task-completed"
响应
视频生成任务创建成功