promptstringrequired
Text prompt for video generation. Either prompt or multi_prompt must be provided, but not both.
kwaivgi/kling-video/v3/4k/text-to-videoKling V3 4K Text to Video by Kuaishou turns a text prompt into a 3-15 second native 4K video with optional native audio.
Try the model
Customize your input with more control.
What would you like to do next?
Select an example to load its inputs and result into the playground.
{
"prompt": "Close-up of glowing fireflies dancing in a dark forest at twilight. Soft bioluminescent particles float through the air. Shallow depth of field, bokeh lights in background. Magical atmosphere, gentle movement."
}Kling V3 4K text-to-video: write a scene and get back a 3–15 second clip, with native audio and multi-shot control. Output is native 4K.
| 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 | true | 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 $0.42 per output second, with or without audio.
| Output | Price |
|---|---|
| 3s | $1.26 |
| 5s (default) | $2.10 |
| 10s | $4.20 |
| 15s | $6.30 |
Failed runs are not charged.
multi_prompt with one entry per shot.Other Kling V3 4K endpoints and tiers: kwaivgi/kling-video/v3/4k/image-to-video, kwaivgi/kling-video/v3/standard/text-to-video, kwaivgi/kling-video/v3/pro/text-to-video.
Start building
Submit this model through the 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/v3/4k/text-to-video",
"prompt": "Close-up of glowing fireflies dancing in a dark forest at twilight. Soft bioluminescent particles float through the air. Shallow depth of field, bokeh lights in background. Magical atmosphere, gentle movement.",
"duration": 5,
"shot_type": "customize",
"aspect_ratio": "16:9",
"generate_audio": true
}
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"Create a SandBase API key and set it in your server environment. All requests use Bearer authentication.
export SANDBASE_API_KEY="YOUR_API_KEY"Keep the key on your server. Do not expose it in browser code or commit it to a repository.
POST to /v1/run with this model ID and its inputs. The request example above includes submission and polling.
Use the returned run ID to poll until the status is completed, failed or timeout. Read output only after completed.
curl "https://api.sandbase.ai/v1/run/$RUN_ID" \
-H "Authorization: Bearer $SANDBASE_API_KEY"Pass a publicly accessible file URL in the model’s image, video or audio field. Supported formats and limits are shown beside each Playground input.
Use the upload or replace control on supported image fields in the Playground. Video URL fields accept a hosted driving video; they do not imply video-upload support.
promptstringrequiredText prompt for video generation. Either prompt or multi_prompt must be provided, but not both.
durationintegerThe duration of the generated video in seconds
Default: 5
Possible values: 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.
Default: "customize"
Possible values: "customize", "intelligent"
aspect_ratiostringThe aspect ratio of the generated image.
Default: "16:9"
Possible values: "16:9", "9:16", "1:1"
multi_promptarrayList of prompts for multi-shot video generation. If provided, overrides the single prompt and divides the video into multiple shots with specified prompts and durations.
generate_audiobooleanWhether to generate native audio for the video. Supports Chinese and English voice output. Other languages are automatically translated to English. For English speech, use lowercase letters; for acronyms or proper nouns, use uppercase.
Default: true
{
"model": "kwaivgi/kling-video/v3/4k/text-to-video",
"prompt": "Close-up of glowing fireflies dancing in a dark forest at twilight. Soft bioluminescent particles float through the air. Shallow depth of field, bokeh lights in background. Magical atmosphere, gentle movement.",
"duration": 5,
"shot_type": "customize",
"aspect_ratio": "16:9",
"generate_audio": true
}A completed run exposes its result in output. The following is the model’s saved example, not a new generation.
[
{
"poster": "https://static.sandbase.ai/examples/posters/b58a784a894237addece.jpg",
"source": "Kling AI official schema mirror",
"source_url": "https://kling.ai/document-api/guides/get-started/overview",
"url": "https://static.sandbase.ai/examples/a320ac54-733b-4c48-9e1c-e34183e1f2a5/output/9b7ab3bc-23c2-492c-aafe-34840d1a31a1.mp4"
}
]