Kling v2 Image to Video
Model Information
Input
Configure model parameters
Output
View generated results
Result
Preview, share or download your results with a single click.
Prerequisites
- Create an API Key from the Eachlabs Console
- Install the required dependencies for your chosen language (e.g., requests for Python)
API Integration Steps
1. Create a Prediction
Send a POST request to create a new prediction. This will return a prediction ID that you'll use to check the result. The request should include your model inputs and API key.
import requestsimport timeAPI_KEY = "YOUR_API_KEY" # Replace with your API keyHEADERS = {"X-API-Key": API_KEY,"Content-Type": "application/json"}def create_prediction():response = requests.post("https://api.eachlabs.ai/v1/prediction/",headers=HEADERS,json={"model": "kling-v2-image-to-video","version": "0.0.1","input": {"cfg_scale": 0.5,"negative_prompt": "your negative prompt here","aspect_ratio": "16:9","duration": "5","image_url": "your image url here","prompt": "your prompt here"},"webhook_url": ""})prediction = response.json()if prediction["status"] != "success":raise Exception(f"Prediction failed: {prediction}")return prediction["predictionID"]
2. Get Prediction Result
Poll the prediction endpoint with the prediction ID until the result is ready. The API uses long-polling, so you'll need to repeatedly check until you receive a success status.
def get_prediction(prediction_id):while True:result = requests.get(f"https://api.eachlabs.ai/v1/prediction/{prediction_id}",headers=HEADERS).json()if result["status"] == "success":return resultelif result["status"] == "error":raise Exception(f"Prediction failed: {result}")time.sleep(1) # Wait before polling again
3. Complete Example
Here's a complete example that puts it all together, including error handling and result processing. This shows how to create a prediction and wait for the result in a production environment.
try:# Create predictionprediction_id = create_prediction()print(f"Prediction created: {prediction_id}")# Get resultresult = get_prediction(prediction_id)print(f"Output URL: {result['output']}")print(f"Processing time: {result['metrics']['predict_time']}s")except Exception as e:print(f"Error: {e}")
Additional Information
- The API uses a two-step process: create prediction and poll for results
- Response time: ~200 seconds
- Rate limit: 60 requests/minute
- Concurrent requests: 10 maximum
- Use long-polling to check prediction status until completion
Overview
Kling v2 Image to Video generates short, high-quality videos from a single image combined with a descriptive text prompt. It allows users to animate static visuals, giving life to still frames through motion driven by natural language descriptions. Kling v2 Image to Video blends image conditioning with text-driven motion generation, producing visually coherent and contextually consistent animations.
Technical Specifications
Use clear, descriptive text prompts to guide the motion and style of the video output.
Input images should be visually clean and of decent resolution for better animation fidelity.
Always check aspect ratio and duration values to match the intended video platform or context.
Excessively abstract or conflicting prompts may reduce result consistency.
Kling v2 Image to Video performs best when both image and text prompt contextually align.
Key Considerations
Input images significantly affect video quality; avoid low-resolution, blurry, or heavily compressed images.
Unrealistic or contradictory prompts can cause incoherent or unstable motion sequences.
Shorter durations (5 seconds) are more stable for complex prompts, while 10 seconds work well for simpler, continuous animations.
Aspect ratio selection should depend on where the video will be displayed to avoid cropping or distortion.
CFG Scale controls the strictness of prompt adherence. Extreme values can overfit or underfit the visual result.
Legal Information for Kling v2 Image to Video
By using this Kling v2 Image to Video, you agree to:
- Kling Privacy
- Kling SERVICE AGREEMENT
Tips & Tricks
prompt:
Write clear, descriptive sentences. Example: "A serene mountain landscape with gentle clouds drifting."
Avoid conflicting or ambiguous words within the same prompt.
image_url:
Use high-quality, sharp images. Ideal image size is at least 512x512px. Avoid cluttered backgrounds.
duration:
Recommended values are 5 and 10 seconds.
- Use 5 seconds for detailed or fast-moving descriptions.
- Use 10 seconds for slower, continuous, or evolving motion.
aspect_ratio:
- 16:9 for landscape, widescreen displays.
- 9:16 for vertical formats like stories or reels.
- 1:1 for square social media posts.
negative_prompt:
Use to exclude unwanted elements. Example: "no text, no logo, no blurry faces" improves result clarity.
cfg_scale:
Controls how closely the video follows the prompt.
- Recommended range: 0.5 - 0.8
- Lower values (0.5) allow more creative freedom.
- Higher values (0.8) enforce stricter adherence to the prompt details.
Capabilities
Animate a static image into a seamless, short video loop.
Generate motion based on natural language prompts.
Support aspect ratios for both vertical and horizontal formats.
Control video duration and prompt adherence intensity.
Exclude unwanted elements with negative prompts.
What can I use for?
Transforming product or concept images into animated teasers.
Creating visual storytelling pieces from static artwork.
Generating dynamic content for social media posts.
Enhancing presentations with short, animated visual clips.
Developing personalized animated greetings or covers.
Things to be aware of
Experiment with natural landscape prompts for soothing motion sequences.
Use object-focused prompts (e.g., "A futuristic car driving on a neon-lit road") for dynamic, object-centric videos.
Adjust cfg_scale for different creative outcomes — lower for imaginative interpretations, higher for strict visual control.
Test different aspect ratios to tailor videos for specific display contexts.
Combine negative prompts like "no text, no watermark, no distortions" to refine visual quality.
Limitations
Cannot generate videos longer than 10 seconds.
May struggle with abstract, surreal, or highly complex prompt combinations.
Extremely low-quality or busy images can reduce motion clarity.
Motion may appear artificial for highly detailed human facial features or fast camera movements.
Output Format: MP4