curl --request POST \
--url https://api.evolink.ai/v1/videos/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "kling-v4-video-edit",
"prompt": "Adjust the color to warm tones and add a cinematic feel",
"video_urls": [
"https://example.com/original.mp4"
],
"quality": "720p"
}
'{
"created": 1757169743,
"id": "task-unified-1757169743-7cvnl5zw",
"model": "kling-v4-video-edit",
"object": "video.generation.task",
"progress": 0,
"status": "pending",
"task_info": {
"can_cancel": true,
"estimated_time": 300,
"video_duration": 9
},
"type": "video",
"usage": {
"billing_rule": "per_second",
"credits_reserved": 63.92,
"user_group": "default"
}
}{
"error": {
"code": "invalid_request",
"message": "Invalid request parameters",
"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: kling-v4-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"
}
}Kling-4.0 動画編集
- Kling-4.0 Video Edit(kling-v4-video-edit)は元の動画を編集します
- 出力動画は元のアスペクト比と音声を維持します。長さはデフォルトで元の動画と同じですが、
durationで指定することもできます - テキスト指示や参照画像を組み合わせて編集できます
- 非同期処理モード、返されたタスクIDを使用してステータスを照会してください
- 生成された動画リンクは24時間有効です。速やかに保存してください
curl --request POST \
--url https://api.evolink.ai/v1/videos/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "kling-v4-video-edit",
"prompt": "Adjust the color to warm tones and add a cinematic feel",
"video_urls": [
"https://example.com/original.mp4"
],
"quality": "720p"
}
'{
"created": 1757169743,
"id": "task-unified-1757169743-7cvnl5zw",
"model": "kling-v4-video-edit",
"object": "video.generation.task",
"progress": 0,
"status": "pending",
"task_info": {
"can_cancel": true,
"estimated_time": 300,
"video_duration": 9
},
"type": "video",
"usage": {
"billing_rule": "per_second",
"credits_reserved": 63.92,
"user_group": "default"
}
}{
"error": {
"code": "invalid_request",
"message": "Invalid request parameters",
"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: kling-v4-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
ボディ
動画生成モデル名
kling-v4-video-edit "kling-v4-video-edit"
編集指示。最大2500文字
参照構文: プロンプト内で<<<xxx>>>を使用して画像や動画を参照できます。例:<<<video_1>>>の人物のコートを<<<image_1>>>のデザインに変更する
2500"Adjust the color to warm tones and add a cinematic feel"
編集対象の動画URLの配列。1本のみ指定でき、プロンプト内の<<<video_1>>>に対応します
動画の要件:
- 形式:MP4 / MOV
- サイズ:≤ 200MB
- 長さ:3~30秒
- 寸法:幅・高さともに720px~2160px
- フレームレート:24fps~60fps
- 動画URLはサーバーから直接アクセスできる必要があります
1 element["https://example.com/original.mp4"]
参照画像URLの配列(スタイルの参照)
制約: 最大10枚
注意: 画像URLはサーバーから直接アクセスできるか、アクセス時に直接ダウンロードされる必要があります
10["https://example.com/style_ref.jpg"]
出力動画の長さ(秒)。デフォルトはauto
指定値:
- 整数:
3~30秒 auto:元の動画と同じ長さ
3 <= x <= 30"auto"
解像度レベル
オプション:
720p: 標準 720P1080p: 高画質 1080P
720p, 1080p "720p"
タスク完了時のHTTPSコールバックURL
コールバックタイミング:
- タスクが完了、失敗、またはキャンセルされた時にトリガー
- 課金確認後に送信
セキュリティ制限:
- 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"
レスポンス
動画生成タスクが正常に作成されました
タスク作成タイムスタンプ
1757169743
タスクID
"task-unified-1757169743-7cvnl5zw"
使用された実際のモデル名
"kling-v4-video-edit"
タスクタイプ
video.generation.task タスク進捗率(0-100)
0 <= x <= 1000
タスクステータス
pending, processing, completed, failed "pending"
動画タスクの詳細
Show child attributes
Show child attributes
タスク出力タイプ
text, image, audio, video "video"
使用量と課金情報
Show child attributes
Show child attributes