Kling MCP
Generate, expand, and control Kling video motion in the AI Agent through MCP.
Kling AI video generation service with text and image input.
This is only a basic call example. See the full docs for more parameters and advanced usage.
View DocsCreate videos from text or reference images, and choose a model to suit your project.
Choose an available model and describe the scene, action, and camera shots.
Prepare reference materials and corresponding parameters for your chosen model.
Save the task_id after submission and retrieve the video file when complete.
Get a Key, copy the request, and view the corresponding JSON response below.
export ACEDATACLOUD_API_KEY="YOUR_API_KEY"
curl --request POST "https://api.acedata.cloud/kling/videos" \
--header "Authorization: Bearer $ACEDATACLOUD_API_KEY" \
--header "Content-Type: application/json" \
--data '{
"action": "text2video",
"model": "kling-v3",
"mode": "std",
"duration": 5,
"prompt": "A small sailboat crossing a calm lake at sunrise.",
"async": true
}'Below is an excerpt of key fields from the current API response. The task ID, usage, and generated content depend on the values returned by your request.
{
"task_id": "20068983-0cc9-4c6a-aeb6-9c6a3c668be0"
}Use the task ID returned upon submission to check progress and retrieve the final result.
curl --request POST "https://api.acedata.cloud/kling/tasks" \
--header "Authorization: Bearer $ACEDATACLOUD_API_KEY" \
--header "Content-Type: application/json" \
--data '{"action": "retrieve", "id": "20068983-0cc9-4c6a-aeb6-9c6a3c668be0"}'The following illustrates the fields for a task in progress. Continue querying the same ID until completion.
{
"id": "20068983-0cc9-4c6a-aeb6-9c6a3c668be0",
"type": "videos",
"finished_at": null
}The following is an excerpt of key fields from the existing API response. Refer to the values returned by your request for the task ID, usage, and generated content.
{
"id": "20068983-0cc9-4c6a-aeb6-9c6a3c668be0",
"type": "videos",
"started_at": 1740969535.393,
"finished_at": 1740969852.463,
"elapsed": 317.07,
"response": {
"success": true,
"task_id": "20068983-0cc9-4c6a-aeb6-9c6a3c668be0",
"video_url": "https://cdn.acedata.cloud/assets/examples/gemini/04a043bd-6b23-4b4e-945c-ce48158c3eee-3a89912507c7.mp4",
"state": "succeed"
}
}Support for image input, sound, and multiple shots depends on the selected model. Prepare your assets according to the relevant parameter descriptions.
Read the video or audio track URL returned in response. If the task fails, read the error message and end the query process.
Refer to the current API and pricing page for request parameters, available models, and costs. If you encounter authentication, balance, or quota errors, check the Key's associated application, validity period, and usage restrictions. Retain the trace_id when troubleshooting requests.
Continue to the complete guide for parameters, result fields, and error handling.
The official motion control feature of Kling, for specific usage methods, refer to the official documentation: https://app.klingai.com/cn/dev/document-api/apiReference/model/motionControl
This API can be used to query Kling's video generation tasks.
This API can generate videos by inputting prompt words and the first and last frame images.
Kling lip-sync API — sync a character's mouth in a video to audio or text.
Kling talking-photo API — make a still portrait speak from audio or text.
Kling Goods Studio generation with asynchronous task delivery.
Kling Video Commerce generation with asynchronous task delivery.
We offer various credit packages. The more you purchase, the higher the discount you receive.
up to46% OFFNo Pricing Information
Generate, expand, and control Kling video motion in the AI Agent through MCP.
Configuration Method
Connect the current service in Claude Code:
mcpServers service entry below into .mcp.json in the project root directory, retaining the existing configuration.ACEDATACLOUD_API_TOKEN in the terminal: use export ACEDATACLOUD_API_TOKEN='YOUR_API_TOKEN' on macOS/Linux, and $env:ACEDATACLOUD_API_TOKEN = 'YOUR_API_TOKEN' in Windows PowerShell; replace YOUR_API_TOKEN with your Ace Data Cloud API Token.claude in the same terminal where this variable has been set; new terminals or desktop-launched clients must also be able to read this variable./mcp to confirm that the service is connected and the tools have been loaded; when using the project configuration for the first time, check and approve the service as prompted.export ACEDATACLOUD_API_TOKEN='YOUR_API_TOKEN'
claude mcp add --scope user --transport http 'kling-mcp' 'https://kling.mcp.acedata.cloud/mcp' --header 'Authorization: Bearer ${ACEDATACLOUD_API_TOKEN}'
Provide parameter descriptions and task processing guidelines for AI Agent regarding Kling video generation, extension, and motion control.
Install the current Skill to Claude Code. Project-level configurations are shared across the repository, while user-level configurations apply to all projects on this machine.
npx skills add acedatacloud/skills --skill 'kling-video' -a 'claude-code' --yes