Passer au contenu principal
POST
/
kling
/
motion
Kling Motion
curl --request POST \
  --url https://api.acedata.cloud/kling/motion \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "image_url": "https://cdn.acedata.cloud/4hfydw.jpg",
  "video_url": "https://cdn.acedata.cloud/634d760216.mp4",
  "character_orientation": "image",
  "mode": "std"
}
'
import requests

url = "https://api.acedata.cloud/kling/motion"

payload = {
"image_url": "https://cdn.acedata.cloud/4hfydw.jpg",
"video_url": "https://cdn.acedata.cloud/634d760216.mp4",
"character_orientation": "image",
"mode": "std"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
image_url: 'https://cdn.acedata.cloud/4hfydw.jpg',
video_url: 'https://cdn.acedata.cloud/634d760216.mp4',
character_orientation: 'image',
mode: 'std'
})
};

fetch('https://api.acedata.cloud/kling/motion', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
{
  "success": true,
  "video_id": "842566592663294013",
  "video_url": "https://platform2.cdn.acedata.cloud/kling/6c68c267-065b-4423-b66b-a0e4c59ee0d5.mp4",
  "duration": "5.066",
  "state": "succeed",
  "task_id": "307c3359-f68a-44e1-bd3b-c5d5a2a2ca0a"
}
{
"error": {
"code": "token_mismatched",
"message": "The specified token is not matched with API."
},
"trace_id": "2efa9340-b21b-4e26-9e14-4aac95f343ab"
}
{
"error": {
"code": "invalid_token",
"message": "The specified token is invalid or wrong."
},
"trace_id": "2efa9340-b21b-4e26-9e14-4aac95f343ab"
}
{
"error": {
"code": "used_up",
"message": "Your balance is not sufficient for current request, please buy more in Ace Data Cloud."
},
"trace_id": "2efa9340-b21b-4e26-9e14-4aac95f343ab"
}
{
"error": {
"code": "no_api",
"message": "API does not exist, please make sure url is correct."
},
"trace_id": "2efa9340-b21b-4e26-9e14-4aac95f343ab"
}
{
"error": {
"code": "too_many_requests",
"message": "You have exceeded the rate limit."
},
"trace_id": "2efa9340-b21b-4e26-9e14-4aac95f343ab"
}
{
"error": {
"code": "api_error",
"message": "Internal server error."
},
"trace_id": "2efa9340-b21b-4e26-9e14-4aac95f343ab"
}

Autorisations

Authorization
string
header
requis

En-têtes

accept
enum<string>

Kling Motion Param Accept

Options disponibles:
application/json

Corps

application/json
mode
enum<string>
requis

Kling Motion Mode

Options disponibles:
std,
pro
image_url
string
requis

Kling Motion Image Url

video_url
string
requis

Kling Motion Video Url

character_orientation
enum<string>
requis

Kling Motion Character Orientation

Options disponibles:
image,
video
model_name
enum<string>

Kling Motion Model Name

Options disponibles:
kling-v2-6,
kling-v3
keep_original_sound
enum<string>

Kling Motion Keep Original Sound

Options disponibles:
yes,
no
watermark_info
object

Kling Motion Watermark Info

prompt
string

Kling Motion Prompt

Exemple:

"White ceramic coffee mug on glossy marble countertop with morning window light. Camera slowly rotates 360 degrees around the mug, pausing briefly at the handle."

callback_url
string

Kling Motion Callback Url

async
boolean

Kling Motion Async

Réponse

Kling Motion Response 200

data
object

Kling Motion Response 200 Data

success
boolean

Kling Motion Response 200 Success