promptstringобязательно
Text prompt for video generation. Required unless multi_prompt is provided.
kwaivgi/kling-video/o3/standard/text-to-videoKling O3 Standard Text to Video by Kuaishou turns a text prompt into a 3-15 second 720p video with optional native audio.
Попробовать модель
Что вы хотите сделать дальше?
Выберите пример, чтобы загрузить его входные данные и результат в playground.
{
"prompt": "A mecha lands on the ground to save the city, and says \"I'm here\", in anime style"
}Kling O3 Standard text-to-video, the cost-efficient O3 tier. Write a scene, optionally split into shots with multi_prompt, and get back a 3–15 second clip.
| Field | Type | Default | Notes |
|---|---|---|---|
prompt | string, required | — | Up to 2,500 characters. |
aspect_ratio | 16:9 / 9:16 / 1:1 | 16:9 | Output frame shape. |
duration | 3–15 | 5 | Output length in seconds. |
generate_audio | boolean | false | Generate native audio with the clip. |
multi_prompt | object[] | — | Optional list of shots, each with its own prompt and duration. |
shot_type | customize / intelligent | customize | customize follows your multi_prompt shot list; intelligent lets the model plan the cuts. |
You pay for output seconds: $0.084 without audio and $0.112 with generate_audio.
| Output | Without audio | With audio |
|---|---|---|
| 3s | $0.252 | $0.336 |
| 5s (default) | $0.42 | $0.56 |
| 10s | $0.84 | $1.12 |
| 15s | $1.26 | $1.68 |
Failed runs are not charged.
multi_prompt with one entry per shot.Other Kling O3 Standard endpoints and tiers: kwaivgi/kling-video/o3/standard/image-to-video, kwaivgi/kling-video/o3/standard/reference-to-video, kwaivgi/kling-video/o3/standard/edit, kwaivgi/kling-video/o3/standard/video-to-video, kwaivgi/kling-video/o3/pro/text-to-video, kwaivgi/kling-video/o3/4k/text-to-video.
Начните разработку
Отправьте эту модель через SandBase Unified Run API.
# The quoted heredoc keeps Unicode and shell metacharacters unchanged.
result=$(curl --fail-with-body --silent \
-X POST "https://api.sandbase.ai/v1/run" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
--data-binary @- <<'SANDBASE_JSON'
{
"model": "kwaivgi/kling-video/o3/standard/text-to-video",
"prompt": "A mecha lands on the ground to save the city, and says \"I'm here\", in anime style",
"duration": 5,
"shot_type": "customize",
"aspect_ratio": "16:9",
"generate_audio": false
}
SANDBASE_JSON
)
run_id=$(printf '%s' "$result" | jq -r .id)
for attempt in $(seq 1 120); do
status=$(printf '%s' "$result" | jq -r .status)
case "$status" in completed|failed|timeout) break ;; esac
sleep 2
result=$(curl --fail-with-body --silent \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
"https://api.sandbase.ai/v1/run/$run_id")
done
status=$(printf '%s' "$result" | jq -r .status)
[ "$status" = completed ] || { echo "Generation ended: $status" >&2; exit 1; }
printf '%s\n' "$result"Создайте ключ SandBase API и задайте его в окружении сервера. Все запросы используют аутентификацию Bearer.
export SANDBASE_API_KEY="YOUR_API_KEY"Храните ключ на сервере. Не раскрывайте его в коде браузера и не коммитьте в репозиторий.
Отправьте POST на /v1/run с этим ID модели и её входными данными. Пример запроса выше включает отправку и опрос.
Используйте возвращённый ID запуска, чтобы опрашивать статус до завершения, ошибки или таймаута. Читайте вывод только после завершения.
curl "https://api.sandbase.ai/v1/run/$RUN_ID" \
-H "Authorization: Bearer $SANDBASE_API_KEY"Передайте публично доступный URL файла в поле image, video или audio модели. Поддерживаемые форматы и лимиты показаны рядом с каждым полем Playground.
Используйте управление загрузкой или заменой в поддерживаемых полях изображений в Playground. Поля URL видео принимают размещённое видео для вождения; это не означает поддержку загрузки видео.
promptstringобязательноText prompt for video generation. Required unless multi_prompt is provided.
durationintegerVideo duration in seconds (3-15s).
По умолчанию: 5
Возможные значения: 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15
shot_typestringThe type of multi-shot video generation. 'intelligent' lets the model automatically determine shot structure.
По умолчанию: "customize"
Возможные значения: "customize", "intelligent"
aspect_ratiostringThe aspect ratio of the generated image.
По умолчанию: "16:9"
Возможные значения: "16:9", "9:16", "1:1"
multi_promptarrayList of prompts for multi-shot video generation.
generate_audiobooleanWhether to generate native audio for the video.
По умолчанию: false
{
"model": "kwaivgi/kling-video/o3/standard/text-to-video",
"prompt": "A mecha lands on the ground to save the city, and says \"I'm here\", in anime style",
"duration": 5,
"shot_type": "customize",
"aspect_ratio": "16:9",
"generate_audio": false
}В завершённом запуске результат доступен в output. Ниже приведён сохранённый пример модели, а не новая генерация.
[
{
"poster": "https://static.sandbase.ai/examples/posters/07e592c54be05ebaf28e.jpg",
"source": "Kling AI official schema mirror",
"source_url": "https://kling.ai/document-api/guides/get-started/overview",
"url": "https://static.sandbase.ai/examples/5530a7b1-f8e7-40ff-9d6d-4fe6c3d1edb6/output/2691a793-e197-4ee5-bf27-f09b403931ff.mp4"
}
]