Generate AI videos through AceDataCloud's Kuaishou Kling API.
clawhub install @acedatacloud/kling. Check that the ClawHub publisher is @acedatacloud.Bearer ; a platform-... management token is not a service API key./kling/videos and /kling/tasks. Advanced workflows below may call additional routes.ACEDATACLOUD_API_TOKEN=your_api_key_here in ~/.openclaw/.env, then restart the Gateway and start a new session. For a direct terminal test, run export ACEDATACLOUD_API_TOKEN="your_api_key_here" in that shell. Never put the key in a prompt or commit an .env file.Illustrated key setup, first run, and troubleshooting · Token details
bash
curl -X POST https://api.acedata.cloud/kling/videos \
-H "Authorization: Bearer $ACEDATACLOUD_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{"action": "text2video", "prompt": "a cat playing piano on a rooftop at sunset", "model": "kling-v3", "mode": "std", "duration": 5}'
Async: See async task polling. Poll via
POST /kling/taskswith{"id": "..."}.
ModelQualityBest Forkling-v3-turboFast720p/1080p, integer 3–15 seconds, included native audio with no off switchkling-v3LatestBest quality, flexible 3–15s duration, optional audio generationkling-v3-omniLatestV3 Omni model with audio plus image/video references, flexible 3–15s durationkling-v2-6HighHigh-quality output with optional audio (pro mode)kling-v2-5-turboHigh + FastBest speed/quality trade-offkling-v2-masterHighHigh-quality outputkling-v2-1-masterHighImproved v2kling-v1-6ImprovedBetter quality than v1kling-v1StandardBasic generation, lowest costkling-o1PremiumIndependent O1 model with image/video references, 5s only
ModeSpeedCostUse Forstd (Standard)SlowerLowerDraft/previewpro (Professional)FasterHigherFinal output4k (Native 4K)—PremiumNative 4K output — only kling-v3 and kling-v3-omni; incompatible with camera_control
json
POST /kling/videos
{
"action": "text2video",
"prompt": "a futuristic city with flying cars",
"model": "kling-v3",
"mode": "std",
"duration": 5,
"aspect_ratio": "16:9"
}
Animate a still image. Optionally specify an ending frame.
json
POST /kling/videos
{
"action": "image2video",
"prompt": "the scene slowly comes alive with movement",
"start_image_url": "https://example.com/scene.jpg",
"end_image_url": "https://example.com/end-scene.jpg",
"model": "kling-v3",
"mode": "pro"
}
Use kling-o1 or kling-v3-omni with reference images and/or one reference video. Cite each item in the prompt using its one-based token.
json
POST /kling/videos
{
"action": "text2video",
"prompt": "turn <<<video_1>>> into hand-painted animation while preserving its motion",
"model": "kling-o1",
"mode": "std",
"duration": 5,
"video_list": [
{
"video_url": "https://example.com/source.mp4",
"refer_type": "base",
"keep_original_sound": "no"
}
]
}
Use refer_type: "feature" to reference style, motion, or a neighboring shot. Use refer_type: "base" to edit the supplied video. A base video cannot be combined with first/end frames.
Continue an existing video with additional seconds.
json
POST /kling/videos
{
"action": "extend",
"video_id": "existing-video-id",
"prompt": "the camera pulls back to reveal the full landscape",
"model": "kling-v2-5-turbo"
}
Apply precise camera/motion control from an image + reference video.
json
POST /kling/motion
{
"image_url": "https://example.com/subject.jpg",
"video_url": "https://example.com/motion-reference.mp4",
"mode": "std",
"character_orientation": "image"
}
Create a lip-synced video from a source video plus either an audio track or input text.
json
POST /kling/lip-sync
{
"video_url": "https://example.com/source.mp4",
"mode": "audio2video",
"audio_url": "https://example.com/voiceover.mp3"
}
Animate a still portrait from an image plus an audio track.
json
POST /kling/talking-photo
{
"image_url": "https://example.com/portrait.jpg",
"audio_url": "https://example.com/voiceover.mp3",
"model": "kling-v2-1-master",
"duration": 5,
"mode": "pro"
}
ParameterValuesDescriptionaction``"text2video", "image2video", "extend"Generation modemodelSee models tableModel to usepromptstringRequired generation or continuation instructionsmode``"std", "pro", "4k"Quality mode ( 4k only for kling-v3 / kling-v3-omni, incompatible with camera_control)durationO1: 5; v3/v3-omni/v3-turbo: integer 3– 15; others: 5, 10Duration in secondsstart_image_urlURLRequired first frame for action=image2video``end_image_urlURLOptional end frame for image2video; requires start_image_url``video_idstringExisting Kling video ID required by action=extend``generate_audio``true, falseOptional audio for v3, v3-omni and v2-6 pro. Turbo always includes audio: omit this field or use true``aspect_ratio``"16:9", "9:16", "1:1"Video aspect ratiocfg_scale0–1Prompt relevance strengthnegative_promptstringWhat to avoid in the videocamera_controlobjectCamera movement parametersimage_listarrayOmni reference images for kling-o1 / kling-v3-omni; each item has image_url and optional type ( first_frame / end_frame). Up to 7 images without a reference video, or 4 with one, including first/end framesvideo_listarrayOne MP4/MOV Omni reference video for kling-o1 / kling-v3-omni (3–10s, 720–2160px, 24–60fps, ≤200MB); item has video_url, refer_type ( feature / base), and keep_original_sound ( yes / no)callback_urlstringAsync callback URLmode ( /kling/lip-sync)"audio2video", "text2video"Lip-sync modevideo_url ( /kling/lip-sync)URLSource video URL for lip-syncvideo_id ( /kling/lip-sync)stringExisting Kling video ID for lip-syncaudio_url ( /kling/lip-sync)URLAudio source URL (for audio2video)audio_type ( /kling/lip-sync)"url", "file"Audio input type (default url)audio_file ( /kling/lip-sync)stringAudio file payload when audio_type=file``text ( /kling/lip-sync)stringInput text to synthesize speech (for text2video)voice_id ( /kling/lip-sync)stringVoice preset ID used in text2video``voice_language ( /kling/lip-sync)"zh", "en"TTS language for text2video (default zh)voice_speed ( /kling/lip-sync)numberTTS speaking speed (default 1.0)mode ( /kling/motion)"std", "pro"Motion generation quality modecharacter_orientation ( /kling/motion)"image", "video"Character orientation sourceimage_url ( /kling/talking-photo)URLSource portrait imageaudio_url ( /kling/talking-photo)URLDriving audio trackmodel ( /kling/talking-photo)"kling-v1", "kling-v1-6", "kling-v2-master", "kling-v2-1-master", "kling-v2-5-turbo", "kling-v2-6"Talking-photo modelduration ( /kling/talking-photo)5, 10Talking-photo durationmode ( /kling/talking-photo)"std", "pro"Talking-photo quality mode
kling-o1 supports duration=5 only; kling-v3 and kling-v3-omni support flexible 3– 15 seconds; most other models support 5 or 10mode=4k is only available for kling-v3 and kling-v3-omni and is incompatible with camera_controlgenerate_audio enables optional synchronized audio for kling-v3, kling-v3-omni, and kling-v2-6 pro. Turbo includes audio and rejects false.end_image_url is only for image2video action — it defines the last framekling-o1 and kling-v3-omni; cite them as <<<image_N>>> / <<<video_1>>>negative_prompt, cfg_scale, camera_control, or mode=4kvideo_list, generate_audio must be false; a base video cannot be combined with first/end frameselement_list accepts existing platform-owned or verified preset IDs; raw external IDs are rejected. Standalone management is not published./kling/motion) is a separate endpoint from video generation/kling/lip-sync) and requires mode; use audio_url for audio2video or text + voice fields for text2video/kling/talking-photo) and requires both image_url and audio_url"succeed" (not "succeeded") — check for this value when pollingnegative_prompt helps avoid unwanted elements (e.g., "blurry, low quality, text")Turbo accepts text or a first frame. Omit generate_audio or set it to true; false is unsupported. It omits tail frames, camera_control, cfg_scale, separate negative_prompt and Omni references. Use kling_generate_turbo_video in the companion MCP or kling turbo --request-file request.json in the CLI.
V3/V3 Omni accept multi_shot=true. Automatic shot_type="intelligence" uses the global prompt. Customized shots use multi_prompt (1–6 entries) with consecutive index values, prompts of at most 512 characters and integer durations summing to the total. Companion tools: kling_generate_storyboard / kling storyboard.
Commercial capabilities use /kling/goods-studio and /kling/video-commerce. Pass structured contents/settings and poll task IDs through /kling/tasks. Apparel, virtual try-on and standalone asset management are not currently published.
Use element_list and voice_list only with already valid platform references and the supported model combinations in the current backend guide. Standalone asset creation and management are not published.