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": "Have the character in the video wear the striped sweater from the image",
"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": "Have the character in the video wear the striped sweater from the image",
"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"
}
}承認
##すべてのAPIはBearer Tokenによる認証が必要です##
APIキーの取得:
APIキー管理ページ にアクセスしてAPIキーを取得してください
リクエストヘッダーに以下を追加:
Authorization: Bearer YOUR_API_KEY
ボディ
application/json
編集対象のソース動画URL、必須、1個のみ(配列の最初の要素を使用)
動画要件:
- 対応フォーマット:MP4、MOV(H.264エンコード推奨)
- 再生時間:
3~60秒 - モデルは
15秒を超える入力を自動的に最初の15秒に切り詰め - 解像度:長辺 ≤
2160px、短辺 ≥320px - アスペクト比:
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 コールバックアドレス
コールバックタイミング:
- タスク完了、失敗、またはキャンセル時にトリガー
- 課金確認完了後に送信
セキュリティ制限:
- 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秒でそれぞれリトライ) - コールバックレスポンスボディのフォーマットはタスク照会APIの返却フォーマットと同一
- 2xx ステータスコードを成功とみなし、その他のステータスコードでリトライをトリガー
例:
"https://your-domain.com/webhooks/video-task-completed"
レスポンス
動画生成タスクの作成に成功