This is provided as part of the Kling API from PiAPI. This service allows you access to APIs for the most advanced video generation model - Kuaishou's KlingAI. You can create Text-to-video, Image-to-video, Extend video, Lipsync task and Effects task through this endpoint.
The V1.5/1.6 model through the API currently has all the features and constraints as per klingai.com pricing for 2.1 is the same as 1.6 pricing for 2.0/2.1-master: 2.0-pro-5s: USD0.96/generation, 2.0-pro-10s: USD1.92/generation
For the video lengths (5s vs 10s) of the API-generated-videos for each model (1.0 1.5 1.6 2.0 2.1 and 2.1-master) and modes (std vs pro) combination, please refer to what is allowed on klingai.com; the API currently aligns with the website.
Request
Header Params
Body Params application/json
Example
{"model":"kling","task_type":"video_generation","input":{"prompt":"White egrets fly over the vast paddy fields","negative_prompt":"","cfg_scale":0.5,"duration":5,"aspect_ratio":"1:1","camera_control":{"type":"simple","config":{"horizontal":0,"vertical":0,"pan":-10,"tilt":0,"roll":0,"zoom":0}},"mode":"std"},"config":{"service_mode":"","webhook_config":{"endpoint":"","secret":""}}}