画像拡張
CometAPI 経由で Kling Image Expansion API を使用し、元の境界を超えて画像を拡張します。文脈を維持しながら、動画向けアセット用に制御可能な補完を行えます。
ソースコンテンツの周囲により広いキャンバスが必要な場合は、このエンドポイントを使用して画像を元の境界の外側までアウトペイントします。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.
拡張比率の仕組み
- 各比率は元の幅または高さを基準に測定されます
- 拡張後のキャンバス全体は、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.