靈活的參數
可設定 8 個已記錄的參數,包括 aspect_ratio, cfg_scale, duration_seconds, enable_sound, mode。
curl -X POST https://runapi.ai/api/v1/kling/text_to_video \
-H "Authorization: Bearer $RUNAPI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "kling-v2.5-turbo-text-to-video-pro",
"prompt": "製作一段 10 秒影片:一個人走過秋天的森林,樹葉飄落,電影感橫移鏡頭。"
}'
import { KlingClient } from "@runapi.ai/kling";
const client = new KlingClient();
const result = await client.textToVideo.run({
model: "kling-v2.5-turbo-text-to-video-pro",
prompt: "製作一段 10 秒影片:一個人走過秋天的森林,樹葉飄落,電影感橫移鏡頭。",
});
import os
import requests
response = requests.post(
"https://runapi.ai/api/v1/kling/text_to_video",
headers={"Authorization": f"Bearer {os.environ['RUNAPI_API_KEY']}"},
json={"model":"kling-v2.5-turbo-text-to-video-pro","prompt":"製作一段 10 秒影片:一個人走過秋天的森林,樹葉飄落,電影感橫移鏡頭。"}
)
response.raise_for_status()
<?php
$client = curl_init("https://runapi.ai/api/v1/kling/text_to_video");
curl_setopt_array($client, [
CURLOPT_HTTPHEADER => ["Authorization: Bearer " . getenv("RUNAPI_API_KEY"), "Content-Type: application/json"],
CURLOPT_POSTFIELDS => json_encode([
'model' => 'kling-v2.5-turbo-text-to-video-pro',
'prompt' => '製作一段 10 秒影片:一個人走過秋天的森林,樹葉飄落,電影感橫移鏡頭。',
])
]);
$response = curl_exec($client);
RunApi client = new RunApi(System.getenv("RUNAPI_API_KEY"));
Task task = client.textToVideo().run({"model":"kling-v2.5-turbo-text-to-video-pro","prompt":"製作一段 10 秒影片:一個人走過秋天的森林,樹葉飄落,電影感橫移鏡頭。"});
task.waitForResult();
require "runapi/kling"
client = RunApi::Kling::Client.new
result = client.text_to_video.run(
model: "kling-v2.5-turbo-text-to-video-pro",
prompt: "製作一段 10 秒影片:一個人走過秋天的森林,樹葉飄落,電影感橫移鏡頭。"
)
client := runapi.NewClient(os.Getenv("RUNAPI_API_KEY"))
task, err := client.textToVideo.Run({"model":"kling-v2.5-turbo-text-to-video-pro","prompt":"製作一段 10 秒影片:一個人走過秋天的森林,樹葉飄落,電影感橫移鏡頭。"})
if err != nil { log.Fatal(err) }
task.Wait()
$ runapi generate \
--model kling-v2.5-turbo-text-to-video-pro \
--endpoint text_to_video \
--wait
18 個版本可用
選擇任意模型,數秒內即可開始生成。
| 提供者 | Kuaishou |
| 模型 ID | kling-v2.5-turbo-text-to-video-pro |
| 模態 | 影片 |
| 任務類型 | Asynchronous |
| API 端點 | /api/v1/kling/text_to_video, /api/v1/kling/extend_video |
| 計費單位 | 秒, 次請求 |
| 輸入參數 | aspect_ratio, callback_url, cfg_scale, duration_seconds, enable_sound, mode, model, negative_prompt, prompt, source_task_id |
| 最大時長 | 5s, 10s |
| 長寬比 | 16:9, 9:16, 1:1 |
| 目錄狀態 | 可正常運作 |
免費註冊後,在控制台建立 kling-v2.5-turbo-text-to-video-pro 的 API 金鑰。
向 /api/v1/kling/text_to_video 發送 POST 請求,並傳入 kling-v2.5-turbo-text-to-video-pro 模型 ID 和參數。
輪詢工作或按照回呼取得已完成的 kling-v2.5-turbo-text-to-video-pro 結果。
可設定 8 個已記錄的參數,包括 aspect_ratio, cfg_scale, duration_seconds, enable_sound, mode。
開放 2 個公開 endpoint:text_to_video, extend_video。
非同步任務接受回調 URL,用於接收完成通知。
按 秒, 次請求 計量,無需訂閱。
promptVideo description.
cfg_scaleGuidance scale (0-1).
aspect_ratioOutput aspect ratio. (16:9, 9:16, 1:1)
callback_urlWebhook URL for async notifications.
enable_soundEnable sound generation.
negative_promptNegative prompt.
duration_secondsDuration in seconds. (5, 10)
由文字 brief 生成產品發佈短片同短版廣告,將製作時間由幾星期縮短到幾個鐘。
無需攝影機或團隊,都可以大規模將課程腳本轉成動畫解說影片。
直接由 prompt 為社交平台製作易爆紅的短內容。
傳入 quickstart 顯示嘅 model ID。
每個 key 的 rate limit 會按使用層級而定。請查看定價頁了解最新限制。
可以——variant 只係一個旗標。只要更改 model 參數就可以切換。
在可用 streaming 的情況下,RunAPI 會端到端串流。
可以在公開 GitHub repo 開 issue,或者電郵支援團隊。
不需要。你的 RunAPI API key 足以存取此 variant 及目錄中的所有其他模型,無需底層供應商帳戶。