柔軟なパラメータ
aspect_ratio, duration_seconds, enable_sound, first_frame_image_url, last_frame_image_url を含む 11 個のドキュメント済みパラメータを設定できます。
curl -X POST https://runapi.ai/api/v1/kling/image_to_video \
-H "Authorization: Bearer $RUNAPI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "kling-o1",
"image_url": "https://cdn.runapi.ai/public/samples/image.jpg",
"prompt": "秋の森を歩く人物の10秒間の動画を生成してください。落ちる葉、シネマチックなカメラパンで。"
}'
import { KlingClient } from "@runapi.ai/kling";
const client = new KlingClient();
const result = await client.imageToVideo.run({
model: "kling-o1",
image_url: "https://cdn.runapi.ai/public/samples/image.jpg",
prompt: "秋の森を歩く人物の10秒間の動画を生成してください。落ちる葉、シネマチックなカメラパンで。",
});
import os
import requests
response = requests.post(
"https://runapi.ai/api/v1/kling/image_to_video",
headers={"Authorization": f"Bearer {os.environ['RUNAPI_API_KEY']}"},
json={"model":"kling-o1","image_url":"https://cdn.runapi.ai/public/samples/image.jpg","prompt":"秋の森を歩く人物の10秒間の動画を生成してください。落ちる葉、シネマチックなカメラパンで。"}
)
response.raise_for_status()
<?php
$client = curl_init("https://runapi.ai/api/v1/kling/image_to_video");
curl_setopt_array($client, [
CURLOPT_HTTPHEADER => ["Authorization: Bearer " . getenv("RUNAPI_API_KEY"), "Content-Type: application/json"],
CURLOPT_POSTFIELDS => json_encode([
'model' => 'kling-o1',
'image_url' => 'https://cdn.runapi.ai/public/samples/image.jpg',
'prompt' => '秋の森を歩く人物の10秒間の動画を生成してください。落ちる葉、シネマチックなカメラパンで。',
])
]);
$response = curl_exec($client);
RunApi client = new RunApi(System.getenv("RUNAPI_API_KEY"));
Task task = client.imageToVideo().run({"model":"kling-o1","image_url":"https://cdn.runapi.ai/public/samples/image.jpg","prompt":"秋の森を歩く人物の10秒間の動画を生成してください。落ちる葉、シネマチックなカメラパンで。"});
task.waitForResult();
require "runapi/kling"
client = RunApi::Kling::Client.new
result = client.image_to_video.run(
model: "kling-o1",
image_url: "https://cdn.runapi.ai/public/samples/image.jpg",
prompt: "秋の森を歩く人物の10秒間の動画を生成してください。落ちる葉、シネマチックなカメラパンで。"
)
client := runapi.NewClient(os.Getenv("RUNAPI_API_KEY"))
task, err := client.imageToVideo.Run({"model":"kling-o1","image_url":"https://cdn.runapi.ai/public/samples/image.jpg","prompt":"秋の森を歩く人物の10秒間の動画を生成してください。落ちる葉、シネマチックなカメラパンで。"})
if err != nil { log.Fatal(err) }
task.Wait()
$ runapi generate \
--model kling-o1 \
--endpoint image_to_video \
--wait
18 個のバージョンを利用可能
モデルを選んで、数秒で生成できます。
モデルを選んで、数秒で生成できます。
| プロバイダー | Kuaishou |
| モデル ID | kling-o1 |
| モダリティ | Video |
| タスク種別 | Asynchronous |
| API エンドポイント | /api/v1/kling/text_to_video, /api/v1/kling/image_to_video |
| 請求単位 | second |
| 入力パラメータ | aspect_ratio, callback_url, duration_seconds, enable_sound, first_frame_image_url, last_frame_image_url, mode, model, preserve_reference_video_audio, prompt, reference_image_urls, reference_video_type, reference_video_url |
| 最大時間 | 5s |
| アスペクト比 | 16:9, 9:16, 1:1 |
| カタログ状態 | 稼働中 |
無料で登録し、ダッシュボードから kling-o1 用の API キーを作成します。
/api/v1/kling/image_to_video に kling-o1 のモデル ID とパラメータを指定して POST リクエストを送信します。
タスクをポーリングするかコールバックに従って、完了した kling-o1 の結果を取得します。
aspect_ratio, duration_seconds, enable_sound, first_frame_image_url, last_frame_image_url を含む 11 個のドキュメント済みパラメータを設定できます。
2 個の公開 endpoint を提供しています: text_to_video, image_to_video。
非同期タスクはコールバック URL を受け付け、完了通知を送信します。
second に基づいて計量課金されます。サブスクリプション不要。
modeGeneration mode. (std, pro)
promptVideo description; reference media with matching numbered markers.
aspect_ratioOutput aspect ratio. (16:9, 9:16, 1:1)
callback_urlWebhook URL for async notifications.
enable_soundSound generation must remain disabled.
duration_secondsDuration in seconds. (5)
reference_video_urlPublic HTTP(S) MP4 or MOV reference video URL; cannot be combined with last_frame_image_url.
last_frame_image_urlPublic HTTP(S) JPG, JPEG, or PNG final-frame image URL; cannot be combined with reference_image_urls or reference_video_url.
reference_image_urlsOrdered public HTTP(S) JPG, JPEG, or PNG reference image URLs; cannot be combined with last_frame_image_url.
reference_video_typeUse the video as a base edit or feature reference. (base, feature)
first_frame_image_urlPublic HTTP(S) JPG, JPEG, or PNG first-frame image URL.
preserve_reference_video_audioPreserve the reference video's original audio.
prompt から本番向けの短尺クリップを生成します。
複数の方向性を素早く試します。
開発ツールにモデルコンテキストを渡して動画アセットを作成します。
quickstart に表示されるモデル ID を渡してください。
はい。呼び出しまたは単位ごとの従量課金です。