توسيع الصور
استخدم Kling Image Expansion API عبر CometAPI لتوسيع الصور خارج الحدود الأصلية، مع الحفاظ على السياق وتوفير تعبئة قابلة للتحكم للأصول الجاهزة للفيديو.
كيف تعمل نسب التوسيع
- تُقاس كل نسبة مقارنةً بالعرض أو الارتفاع الأصليين
- يجب أن تظل مساحة اللوحة الموسعة المجمعة ضمن حدود المساحة الموثقة في Kling
- ابدأ بقيم صغيرة مثل
0.1على كل جانب قبل محاولة التوسعات الأكبر
التوفر الحالي
- المسار الموثق هو
POST /kling/v1/images/editing/expand - تُرجع هذه النقطة النهائية استجابة 404
التفويضات
Bearer token authentication. Use your CometAPI key.
الترويسات
Optional content type header.
الجسم
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.