promptstringrequerido
Text prompt for video generation. Required unless multi_prompt is provided.
kwaivgi/kling-video/o3/pro/text-to-videoKling O3 Pro Text to Video by Kuaishou turns a text prompt into a 3-15 second 1080p video with optional native audio.
Probar el modelo
¿Qué le gustaría hacer después?
Seleccione un ejemplo para cargar sus entradas y el resultado en el playground.
{
"prompt": "A mecha lands on the ground to save the city, and says \"I'm here\", in anime style"
}Preferencia humana
Puntuaciones Elo a partir de votos ciegos comparativos, en comparación con otros modelos de imagen y video.
Clasificaciones obtenidas de Artificial Analysis Arena
Arena de texto a video (sin audio): las personas eligen el mejor de dos clips generados a partir del mismo prompt, sin ver los nombres de los modelos; no se evalúa el audio.
Kling O3 Pro text-to-video, the quality-first 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. |
shot_type | customize / intelligent | customize | customize follows your multi_prompt shot list; intelligent lets the model plan the cuts. |
multi_prompt | object[] | — | Optional list of shots, each with its own prompt and duration. |
You pay for output seconds: $0.112 without audio and $0.14 with generate_audio.
| Output | Without audio | With audio |
|---|---|---|
| 3s | $0.336 | $0.42 |
| 5s (default) | $0.56 | $0.70 |
| 10s | $1.12 | $1.40 |
| 15s | $1.68 | $2.10 |
Failed runs are not charged.
multi_prompt with one entry per shot.Other Kling O3 Pro endpoints and tiers: kwaivgi/kling-video/o3/pro/image-to-video, kwaivgi/kling-video/o3/pro/reference-to-video, kwaivgi/kling-video/o3/pro/edit, kwaivgi/kling-video/o3/pro/video-to-video, kwaivgi/kling-video/o3/standard/text-to-video, kwaivgi/kling-video/o3/4k/text-to-video.
Empiece a construir
Envíe este modelo a través de la API de ejecución unificada de SandBase.
# 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/pro/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"Cree una clave de API de SandBase y configúrela en el entorno de su servidor. Todas las solicitudes usan autenticación Bearer.
export SANDBASE_API_KEY="YOUR_API_KEY"Conserve la clave en el servidor. No la exponga en código del navegador ni la confirme en un repositorio.
Haga un POST a /v1/run con este ID de modelo y sus entradas. El ejemplo de solicitud anterior incluye el envío y el sondeo.
Use el ID de ejecución devuelto para sondear hasta que el estado sea completed, failed o timeout. Lea la salida solo después de completed.
curl "https://api.sandbase.ai/v1/run/$RUN_ID" \
-H "Authorization: Bearer $SANDBASE_API_KEY"Proporcione una URL de archivo accesible públicamente en el campo de imagen, video o audio del modelo. Los formatos y límites admitidos se muestran junto a cada entrada de Playground.
Use el control de subir o reemplazar en los campos de imagen admitidos en Playground. Los campos de URL de video aceptan un video de conducción alojado; no implican compatibilidad con la subida de video.
promptstringrequeridoText prompt for video generation. Required unless multi_prompt is provided.
durationintegerVideo duration in seconds (3-15s).
Valor predeterminado: 5
Valores posibles: 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.
Valor predeterminado: "customize"
Valores posibles: "customize", "intelligent"
aspect_ratiostringThe aspect ratio of the generated image.
Valor predeterminado: "16:9"
Valores posibles: "16:9", "9:16", "1:1"
multi_promptarrayList of prompts for multi-shot video generation.
generate_audiobooleanWhether to generate native audio for the video.
Valor predeterminado: false
{
"model": "kwaivgi/kling-video/o3/pro/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
}Una ejecución completada expone su resultado en la salida. Lo siguiente es el ejemplo guardado del modelo, no una nueva generación.
[
{
"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/bc3450c4-d1db-4ec3-9ebb-3e05d5092c95/output/123f51f6-c974-4393-b299-6b4ba375297c.mp4"
}
]