Page cover

KLING 2.1

Base-Path:

https://api.hyprlab.io/v1

Video Path:

https://api.hyprlab.io/v1/video/generations
chevron-right 📌 Request Body Documentationhashtag

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 or 10.

    • Defaults to 5 if not provided.

start_image (string, required)

  • Description: The first frame of the video.

  • Validation:

    • Must be a string (URL, Data URI, or base64 string).

negative_prompt (string, optional)

  • Description: Specifies what should not appear in the video.

  • Validation:

    • Must be a string.


Post Request:

circle-info

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-v2.1-pro",
    "prompt": "A cute cat playing outside.",
    "duration": 5,
    "start_image": "https://site.com/path/of/image.png",
    "negative_prompt": "..to not include specific elements.",
  }'

Polling for Status:

circle-info

To check the status and retrieve the result, send a GET request to the polling URL provided in the response.

circle-info

NOTE: Video Generation took 3-4 Minutes before it finish.

Pricing Details

Model Name:
  • kling-v2.1-pro

Discount:
  • 30% off

Price:
  • 5 Seconds: $0.315 / Video

  • 10 Seconds: $0.63 / Video

Model Name:
  • kling-v2.1-standard

Discount:
  • 30% off

Price:
  • 5 Seconds: $0.175 / Video

  • 10 Seconds: $0.35 / Video

Last updated