APIMPAPIMP
用户指南AI 接口图片接口视频接口公共接口

happyhorse-1.0

提交 HappyHorse 1.0 异步视频生成任务。单一模型 ID happyhorse-1.0,四种模式(text-to-video / image-to-video / reference-to-video / video-edit)由请求中的 image / images / metadata.video_url 自动判定。返回 task_id 后通过状态查询接口轮询直到 status=finished

POST
/api/generate/submit

Authorization

BearerAuth

AuthorizationBearer <token>

使用 Bearer Token 认证。 格式: Authorization: Bearer sk-xxxxxx

In: header

Request Body

application/json

model*string

固定值 happyhorse-1.0

Value in"happyhorse-1.0"
prompt?string

视频描述,最多 2500 字符。T2V/R2V/EDIT 必填;I2V 可省。

size?string

视频比例,默认 16:9

Value in"16:9" | "9:16" | "1:1" | "4:3" | "3:4"
duration?integer

视频时长,单位为秒。范围 3..15,默认 5。

Range3 <= value <= 15
image?string

单图生视频使用的首帧图片,支持 URL 或 Base64。

images?array<string>

参考图列表,参考图生视频最多 9 张;视频编辑最多 5 张。

Itemsitems <= 9
resolution?string

视频清晰度,默认 1080P

Value in"720P" | "1080P"
watermark?boolean

是否给生成视频打上水印,默认 false

seed?integer

随机种子,范围 [0, 2147483647]。同 seed + 同请求得到相似(非严格相同)结果。

Range0 <= value <= 2147483647
video_url?string

视频编辑使用的源视频 URL,仅支持 HTTP/HTTPS,时长 3~60 秒。

Formaturi
audio_setting?string

EDIT 模式专属音轨策略,默认 autoauto 重新生成音轨,origin 保留源视频音轨。

Value in"auto" | "origin"
callback_url?string

任务终态时由平台主动 POST 的 HTTPS 回调地址(可选)。

Formaturi
[key: string]?never

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://api.apimp.ai/api/generate/submit" \  -H "Content-Type: application/json" \  -d '{    "model": "happyhorse-1.0",    "prompt": "A brown horse galloping across a golden meadow at sunset"  }'
{
  "code": 200,
  "data": {
    "task_id": "task_2BvCWmHzG6sJxK4tQpAr8M9nZyYfRdLs",
    "status": "not_started",
    "created_time": "2026-06-27T09:21:26",
    "error_message": null
  }
}

{
  "code": 400,
  "error": {
    "message": "prompt is required unless `image` (I2V) / `images` (R2V) / `video_url` (EDIT) is provided",
    "type": "invalid_request_error"
  }
}

{
  "code": 400,
  "error": {
    "message": "string",
    "type": "invalid_request_error"
  }
}
{
  "code": 400,
  "error": {
    "message": "string",
    "type": "invalid_request_error"
  }
}
{
  "code": 400,
  "error": {
    "message": "string",
    "type": "invalid_request_error"
  }
}
{
  "code": 400,
  "error": {
    "message": "string",
    "type": "invalid_request_error"
  }
}

这篇文档对您有帮助吗?

最后更新于