curl --request POST \
--url https://api.evolink.ai/v1/videos/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "kling-v4-image-to-video",
"prompt": "The person in the image slowly turns their head and smiles",
"image_start": "https://example.com/portrait.jpg",
"duration": 5,
"quality": "720p"
}
'{
"created": 1757169743,
"id": "task-unified-1757169743-7cvnl5zw",
"model": "kling-v4-image-to-video",
"object": "video.generation.task",
"progress": 0,
"status": "pending",
"task_info": {
"can_cancel": true,
"estimated_time": 300,
"video_duration": 5
},
"type": "video",
"usage": {
"billing_rule": "per_second",
"credits_reserved": 53.38,
"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-image-to-video",
"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 画像から動画へ
- Kling-4.0 Image to Video(kling-v4-image-to-video)は画像から動画を生成します
- 最初と最後のフレーム、およびその間の中間フレームに対応しています
- アスペクト比は最初のフレーム画像によって決まり、
aspect_ratioは受け付けません - 非同期処理モード、返されたタスクIDを使用してステータスを照会してください
- 生成された動画リンクは24時間有効です。速やかに保存してください
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": "kling-v4-image-to-video",
"prompt": "The person in the image slowly turns their head and smiles",
"image_start": "https://example.com/portrait.jpg",
"duration": 5,
"quality": "720p"
}
'{
"created": 1757169743,
"id": "task-unified-1757169743-7cvnl5zw",
"model": "kling-v4-image-to-video",
"object": "video.generation.task",
"progress": 0,
"status": "pending",
"task_info": {
"can_cancel": true,
"estimated_time": 300,
"video_duration": 5
},
"type": "video",
"usage": {
"billing_rule": "per_second",
"credits_reserved": 53.38,
"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-image-to-video",
"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
動画生成モデル名
利用可能なオプション:
kling-v4-image-to-video 例:
"kling-v4-image-to-video"
画像から動画生成用の最初のフレーム画像URL(必須)
注意:
- 画像サイズ: 最大
10MB - サポートされるフォーマット:
.jpg、.jpeg、.png - 画像寸法: 幅と高さ >=
300px、アスペクト比は1:2.5から2.5:1の間 - 画像URLはサーバーから直接アクセスできる必要があります。アクセス時に直接ダウンロードされるURLでも構いません
例:
"https://example.com/portrait.jpg"
生成したい動画を記述するテキストプロンプト
注意:
- 最大
2500文字
Maximum string length:
2500例:
"The person in the image slowly turns their head and smiles"
最後のフレーム画像URL
注意:
- 最後のフレームを使用する場合、
image_start(最初のフレーム)を同時に指定する必要があります - サポートされるフォーマット:
.jpg、.jpeg、.png - 画像サイズ: 最大
10MB - 画像URLはサーバーから直接アクセスできる必要があります。アクセス時に直接ダウンロードされるURLでも構いません
例:
"https://example.com/night.jpg"
中間フレーム画像のリスト。最初と最後のフレームの間に、指定順で均等に配置されます
注意:
- 枚数:
1~8枚 - 最初・中間・最後のフレームの合計は、
10枚以下かつduration+ 1以下です(例:3秒では最大4枚、5秒では最大6枚) - 最後のフレームは省略できます。省略した場合、終了画面はモデルが生成します
- 画像サイズ: 最大
10MB - サポートされるフォーマット:
.jpg、.jpeg、.png - 画像寸法: 幅と高さ >=
300px、アスペクト比は1:2.5から2.5:1の間 - 画像URLはサーバーから直接アクセスできる必要があります。アクセス時に直接ダウンロードされるURLでも構いません
Maximum array length:
8Show child attributes
Show child attributes
例:
[
{
"image_url": "https://example.com/half-open.jpg"
},
{
"image_url": "https://example.com/open.jpg"
}
]
動画の長さ(秒)。デフォルトは5秒
範囲:
3~30の整数
必須範囲:
3 <= x <= 30例:
5
解像度レベル
オプション:
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-image-to-video"
タスクタイプ
利用可能なオプション:
video.generation.task タスク進捗率(0-100)
必須範囲:
0 <= x <= 100例:
0
タスクステータス
利用可能なオプション:
pending, processing, completed, failed 例:
"pending"
動画タスクの詳細
Show child attributes
Show child attributes
タスク出力タイプ
利用可能なオプション:
text, image, audio, video 例:
"video"
使用量と課金情報
Show child attributes
Show child attributes