跳轉到主要內容
POST
/
kling
/
videos
Kling Videos
curl --request POST \
  --url https://api.acedata.cloud/kling/videos \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "action": "text2video",
  "mode": "std",
  "model": "kling-v1",
  "prompt": "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.",
  "duration": 5,
  "video_id": "<string>",
  "cfg_scale": "<string>",
  "aspect_ratio": "16:9",
  "callback_url": "<string>",
  "end_image_url": "<string>",
  "camera_control": "<string>",
  "element_list": "<array>",
  "video_list": "<array>",
  "negative_prompt": "<string>",
  "start_image_url": "<string>"
}
'
{
  "data": [
    {
      "id": "75d8e08f-b25f-450e-9496-7b52e393098b",
      "lyric": "[Verse]\nSleigh bells ringin', choirs singin'\nSnowflakes fallin', presents glistenin' (glistenin')\nIn the air, there's a feeling of joy\nSpreadin' love to every girl and boy\n[Verse 2]\nCandles glowin', fire cracklin'\nStockings hangin', children wrappin'\nWith a smile, they unwrap their surprise\nIn their hearts, the magic never dies\n[Chorus]\nJingle all the way (jingle all the way)\nIn the winter wonderland, we play (oh-oh)\nHear the carols echo through the night (echo through the night)\nMerry Christmas, oh what a delight (oh-oh-oh)",
      "model": "chirp-v3",
      "style": "pop upbeat",
      "title": "Jingle All the Way",
      "prompt": "a christmas song",
      "audio_url": "https://audiopipe.suno.ai/?item_id=75d8e08f-b25f-450e-9496-7b52e393098b",
      "image_url": "https://cdn1.suno.ai/image_75d8e08f-b25f-450e-9496-7b52e393098b.png",
      "video_url": "",
      "created_at": "2024-04-03T11:54:30.424Z"
    },
    {
      "id": "e639fefd-bbd3-4858-b16d-45e7d4aa9313",
      "lyric": "[Verse]\nSleigh bells ringin', choirs singin'\nSnowflakes fallin', presents glistenin' (glistenin')\nIn the air, there's a feeling of joy\nSpreadin' love to every girl and boy\n[Verse 2]\nCandles glowin', fire cracklin'\nStockings hangin', children wrappin'\nWith a smile, they unwrap their surprise\nIn their hearts, the magic never dies\n[Chorus]\nJingle all the way (jingle all the way)\nIn the winter wonderland, we play (oh-oh)\nHear the carols echo through the night (echo through the night)\nMerry Christmas, oh what a delight (oh-oh-oh)",
      "model": "chirp-v3",
      "style": "pop upbeat",
      "title": "Jingle All the Way",
      "prompt": "a christmas song",
      "audio_url": "https://audiopipe.suno.ai/?item_id=e639fefd-bbd3-4858-b16d-45e7d4aa9313",
      "image_url": "https://cdn1.suno.ai/image_e639fefd-bbd3-4858-b16d-45e7d4aa9313.png",
      "video_url": "",
      "created_at": "2024-04-03T11:54:30.424Z"
    }
  ],
  "success": true
}

授權

Authorization
string
header
必填

標頭

accept
enum<string>

Specifies the format of the response from the server, should be application/json.

可用選項:
application/json

主體

application/json
action
enum<string>
必填

The action to generate the video. If text2video, the video will be generated from the prompt.

可用選項:
text2video,
image2video,
extend
mode
enum<string>

Mode of generating video, optional, enumeration value: std (High performance) or pro (High performance). Default value is std.

可用選項:
std,
pro
model
enum<string>

The model used to generate the videos, default value is kling-v1

可用選項:
kling-v1,
kling-v1-6,
kling-v2-master,
kling-v2-1-master,
kling-v2-5-turbo,
kling-video-o1
prompt
string

The prompt which used to generate the video.

範例:

"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."

duration
enum<number>

Video generation duration, in seconds, optional, enumeration value: 5,10 (Requests that include endframes only support 5 seconds).

可用選項:
5,
10
video_id
string

When the action is extend, you can specify video_id to extend the video.

cfg_scale
string

Degree of freedom to generate video, optional. The greater the value, the stronger the correlation. Value range: [0,1].

aspect_ratio
enum<string>

The aspect ratio of the video, optional, enumeration value: 16:9, 9:16, 1:1. Default value is 16:9.

可用選項:
16:9,
9:16,
1:1
callback_url
string

The callback URL which will be called when the video is generated

end_image_url
string

You can specify the end frame to generate video, when the action is image2video.

camera_control
string

Contains 6 Fields, used to specify the camera's movement or change in different directions. camera_control.type should be one of 'simple', 'down_back', 'forward_up', 'left_turn_forward', 'right_turn_forward'. camera_control.config is an optional object, contains 6 optional fields - camera_control.config.horizontal, camera_control.config.vertical, camera_control.config.pan, camera_control.config.tilt, camera_control.config.roll, camera_control.config.zoom. The value of each field is a number, and the value range is [-1,1].

element_list
array

This parameter is used to specify a list of reference subjects when generating content, configured in the element_list array using element_id (the ID from the subject library). The number of reference subjects must be counted together with the number of reference images under the following limits: if there is a reference video, reference subjects + reference images ≤ 4; if there is no reference video, reference subjects + reference images ≤ 7.

video_list
array

This parameter is used to upload a reference video via video_url (MP4/MOV format, duration between 3–10 seconds, resolution between 720px and 2160px, frame rate between 24–60fps, file size ≤200MB, and only 1 video allowed). You can set the refer_type to feature (feature reference video) or base (video to be edited, default); videos set as base cannot define start or end frames. You can use keep_original_sound to choose whether to retain the original audio (yes to keep, no to remove, applicable to both types). The video_url must not be empty.

negative_prompt
string

The value is optional and contains a maximum of 200 characters.

start_image_url
string

You can specify the first frame to generate video, when the action is image2video.

回應

OK, the request is successful.

data
object

The output music items generated from the prompt

success
boolean

The flag indicates the request is successful or not