v1-pro/image-to-video
Model Overview
This model transforms static images into dynamic video clips. Offers more advanced camera controls than v1 Standard model, including options for tilt, pan, zoom, and roll movements. Results in richer details and more stable camera movements, enhancing the overall visual quality of the generated videos. Produces significantly sharper and more detailed videos. Enhanced animations make elements like water flow and character movements appear more natural and engaging.
Setup your API Key
If you don’t have an API key for the AI/ML API yet, feel free to use our Quickstart guide.
How to Make a Call
API Schemas
Create a video generation task and send it to the server
The ratio/aspect_ratio parameter is deprecated. The aspect ratio of the generated video is solely determined by the aspect ratio of the input reference image.
URL of the image to be used for the end of the video
URL of the image for Static Brush Application Area (Mask image created by users using the motion brush)
The text prompt to guide video generation
The duration of the generated video in seconds. Possible values: 5, 10
The description of elements to avoid in the generated video
The CFG (Classifier Free Guidance) scale is a measure of how close you want the model to stick to your prompt
POST /v2/generate/video/kling/generation HTTP/1.1
Host: api.aimlapi.com
Authorization: Bearer <YOUR_AIMLAPI_KEY>
Content-Type: application/json
Accept: */*
Content-Length: 310
{
"model": "kling-video/v1/pro/image-to-video",
"tail_image_url": "https://example.com",
"static_mask_url": "https://example.com",
"dynamic_masks": [
{
"mask_url": "https://example.com",
"trajectories": [
{
"x": 1,
"y": 1
}
]
}
],
"image_url": "https://example.com",
"prompt": "text",
"duration": 5,
"negative_prompt": "text",
"cfg_scale": 1
}
No content
Retrieve the generated video from the server
After sending a request for video generation, this task is added to the queue. Based on the service's load, the generation can be completed in seconds or take a bit more.
GET /v2/generate/video/kling/generation HTTP/1.1
Host: api.aimlapi.com
Authorization: Bearer <YOUR_AIMLAPI_KEY>
Accept: */*
No content
Last updated
Was this helpful?