Elastyczne parametry
Skonfiguruj 11 udokumentowanych parametrów, w tym aspect_ratio, duration_seconds, enable_sound, first_frame_image_url, last_frame_image_url.
Wszechstronne generowanie wideo sterowane referencjami obrazu i wideo
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": "Create a 10-second video of a person walking through an autumn forest, leaves falling, cinematic camera pan."
}'
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: "Create a 10-second video of a person walking through an autumn forest, leaves falling, cinematic camera pan.",
});
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":"Create a 10-second video of a person walking through an autumn forest, leaves falling, cinematic camera pan."}
)
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' => 'Create a 10-second video of a person walking through an autumn forest, leaves falling, cinematic camera pan.',
])
]);
$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":"Create a 10-second video of a person walking through an autumn forest, leaves falling, cinematic camera pan."});
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: "Create a 10-second video of a person walking through an autumn forest, leaves falling, cinematic camera pan."
)
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":"Create a 10-second video of a person walking through an autumn forest, leaves falling, cinematic camera pan."})
if err != nil { log.Fatal(err) }
task.Wait()
$ runapi generate \
--model kling-o1 \
--endpoint image_to_video \
--wait
18 dostępnych wariantów
Wybierz dowolny model i generuj w kilka sekund.
Wybierz dowolny model i generuj w kilka sekund.
| Dostawca | Kuaishou |
| ID modelu | kling-o1 |
| Modalność | Video |
| Typy zadań | Asynchronous |
| Endpoint API | /api/v1/kling/text_to_video, /api/v1/kling/image_to_video |
| Jednostka rozliczeniowa | second |
| Parametry wejściowe | 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 |
| Maksymalny czas | 5s |
| Proporcje obrazu | 16:9, 9:16, 1:1 |
| Status katalogu | Operacyjny |
Zarejestruj się bezpłatnie i utwórz klucz API dla kling-o1 w panelu.
Wyślij żądanie POST do /api/v1/kling/image_to_video z identyfikatorem modelu kling-o1 i parametrami.
Odpytywać zadanie lub skorzystaj z callbacku, aby pobrać ukończony wynik kling-o1.
Skonfiguruj 11 udokumentowanych parametrów, w tym aspect_ratio, duration_seconds, enable_sound, first_frame_image_url, last_frame_image_url.
Udostępnia 2 publiczny(-e) endpoint(-y): text_to_video, image_to_video.
Zadania asynchroniczne akceptują callback URL do powiadomień o zakończeniu.
Rozliczane według second bez wymogu subskrypcji.
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.
Generuj materiały promujące premiery produktów i krótkie reklamy na podstawie briefu tekstowego, skracając produkcję z tygodni do godzin.
Przekształcaj scenariusze lekcji w animowane filmy edukacyjne na dużą skalę, bez kamery i ekipy.
Twórz wiralowe treści short-form na platformy społecznościowe bezpośrednio z promptu.
Przekaż identyfikator modelu wyświetlony w quickstarcie.
Limity na klucz skalują się wraz z poziomem wykorzystania. Aktualne limity znajdziesz na stronie cennika.
Tak — wariant to flaga. Zmieniasz go, aktualizując parametr model.
Tam, gdzie streaming jest dostępny, RunAPI streamuje end-to-end.
Otwórz issue w publicznym repo na GitHubie albo napisz do supportu.
Pomożemy w konfiguracji dla firm, integracjach i kwestiach technicznych.
Skontaktuj się