Kling AI
Available Kling AI Models in HyprLab: A Detailed List and Pricing Guide.
Base-Path:
https://api.hyprlab.io/v1
Video Path:
https://api.hyprlab.io/v1/video/generations
👉🏻 Request Body Documentation
prompt
(string, required)
Description: The main text input that guides the video generation.
Validation:
Must be a non-empty string.
duration
(integer, optional)
Description: Specifies the length of the video in seconds.
Validation:
Must be either
5
or10
.Defaults to
5
if not provided.
cfg_scale
(number, optional)
Description: Controls flexibility in video generation; a lower value increases flexibility, while a higher value improves adherence to the prompt.
Validation:
Must be a number between
0
and1
.Defaults to
0.5
.
start_image
(string, required)
Description: The first frame of the video.
Validation:
Must be a valid URI.
end_image
(string, optional)
Description: The last frame of the video.
Validation:
Must be a valid URI.
aspect_ratio
(string, optional)
Description: Defines the aspect ratio of the video. Ignored if
start_image
is provided.Validation:
Must be one of:
"16:9"
,"1:1"
, or"9:16"
.Defaults to
"16:9"
if not provided.
negative_prompt
(string, optional)
Description: Specifies what should not appear in the video.
Validation:
Must be a string.
Post Request:
When you send a POST
request to create a new Video Generation, the API will return a response containing a Polling URL that can be used to check the processing status and retrieve the results.
curl https://api.hyprlab.io/v1/video/generations \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $HYPRLAB_API_KEY" \
-d '{
"model": "kling-v1.6-standard",
"prompt": "A playful and adorable cat is surrounded by tall trees and blooming flowers.",
"start_image": "https://site.com/path/of/image.png",
"duration": 5,
"cfg_scale": 0.5
"aspect_ratio": "16:9",
"negative_prompt": "..to not include specific elements.",
}'
// Sample Response:
{
"created": 123,
"id": "abc123",
"data": [
{
"url": "https://api.hyprlab.io/v1/video/result/123-abc123"
}
]
}
Polling for Status:
To check the status and retrieve the result, send a GET request to the polling URL provided in the response.
curl -X GET "https://api.hyprlab.io/v1/video/result/123-abc123" \
-H "Authorization: Bearer $HYPRLAB_API_KEY" \
-H "Accept: application/json"
NOTE: Video Generation took 3-4 Minutes before it finish.
{
"created": 123,
"data": [
{
"url": "https://pub-abc123.r2.dev/123-abc123.mp4"
}
]
}
{
"status": "processing",
"message": "Video is still being processed.."
}
{
"error": {
"message": "Video processing failed.",
"type": "processing_error",
"param": null,
"code": "processing_failed"
}
}
🎥 Kling Models
Last updated