Mở rộng hình ảnh
Sử dụng API Kling Image Expansion qua CometAPI để mở rộng hình ảnh vượt ra ngoài các đường viền gốc, giữ nguyên ngữ cảnh với phần điền có thể kiểm soát cho các tài nguyên sẵn sàng cho video.
Sử dụng endpoint này để outpaint một hình ảnh vượt ra ngoài các đường viền gốc khi bạn cần thêm vùng canvas xung quanh nội dung nguồn.Documentation Index
Fetch the complete documentation index at: https://apidoc.cometapi.com/llms.txt
Use this file to discover all available pages before exploring further.
Cách hoạt động của tỷ lệ mở rộng
- Mỗi tỷ lệ được tính dựa trên chiều rộng hoặc chiều cao gốc
- Tổng vùng canvas sau khi mở rộng vẫn phải nằm trong giới hạn diện tích được Kling ghi nhận trong tài liệu
- Hãy bắt đầu với các giá trị nhỏ như
0.1cho mỗi phía trước khi thử các mức mở rộng lớn hơn
Tình trạng khả dụng hiện tại
- Route được ghi trong tài liệu là
POST /kling/v1/images/editing/expand - Endpoint này trả về phản hồi 404
Ủy quyền
Bearer token authentication. Use your CometAPI key.
Tiêu đề
Optional content type header.
Nội dung
Source image to expand. Accepts an image URL or raw Base64 string (no data: prefix). Supported formats: JPG, JPEG, PNG. Max 10 MB, minimum 300×300 px, aspect ratio between 1:2.5 and 2.5:1.
Upward expansion as a multiple of the original image height. Range: 0–2. The resulting image area must not exceed 3× the original.
Rightward expansion as a multiple of the original image width. Range: 0–2. The resulting image area must not exceed 3× the original.
Leftward expansion as a multiple of the original image width. Range: 0–2. The resulting image area must not exceed 3× the original.
Downward expansion as a multiple of the original image height. Range: 0–2. The resulting image area must not exceed 3× the original.
Optional text prompt to guide the expanded area content. Max 2500 characters.
Number of expanded images to generate.
Webhook URL for task status notifications. The server sends a callback when the task status changes.
Optional user-defined task ID for your own tracking. Does not replace the system-generated task ID. Must be unique per account.