This is an asynchronous API; only the task_id will be returned. You should use the task_id to request the Task Result API to retrieve the video generation results.
Request Headers
Supports:
application/json
Bearer authentication format, for example: Bearer {{API Key}}.
Request Body
The mode of the video generation.Supports:
Standard
: fast creation, lower cost, and generate 720p video.Professional
: high quality, higher cost, generate 1080p video, and allow set an end frame.
Standard
.The URL of the start frame image to be used for video generation.
The URL of the end frame image to be used for video generation.
Only available when
mode
is Professional
.Prompt text required to guide the generation.Range:
1 <= x <= 2000
.Negative prompts instruct the model on what elements to avoid generating.Range:
0 <= x <= 2000
.The length of the generated video in seconds. Default:
Optional values:
5
.Optional values:
5
, 10
Guidance scale parameter controls how closely the generated content follows the prompt.Range:
0 <= x <= 1
. Default: 0.5
.Response
Use the task_id to request the Task Result API to retrieve the generated outputs.
Example
Here is an example of how to use the KLING V1.6 Image to Video API.- Generate a task_id by sending a POST request to the KLING V1.6 Image to Video API.
Request:
Response:
- Use
task_id
to get output videos.
videos
of response.
Request:
Response:
Video files: