Expand an image with Kling
Headers
Must be application/json.
Request body
Source image to expand. Image URL or raw Base64 string without a data: prefix. Supported formats: JPG, JPEG, PNG. Maximum 10 MB, minimum 300x300 px, aspect ratio between 1:2.5 and 2.5:1.
Upward expansion ratio as a multiple of the original image dimension. Range: 0-2. Send 0 for sides you do not want to expand.
Downward expansion ratio as a multiple of the original image dimension. Range: 0-2. Send 0 for sides you do not want to expand.
Leftward expansion ratio as a multiple of the original image dimension. Range: 0-2. Send 0 for sides you do not want to expand.
Rightward expansion ratio as a multiple of the original image dimension. Range: 0-2. Send 0 for sides you do not want to expand.
Optional text prompt to guide the expanded area content. Maximum 2500 characters.
Number of expanded images to generate. Range: 1-9.
Webhook URL for task status notifications.
Optional user-defined task ID for your own tracking. Must be unique per account.
Response
Task request accepted or an error response returned by the API.
Response message.
Request identifier returned when present.