テキストから動画
CometAPI 経由で Kling のテキストから動画への生成を POST /kling/v1/videos/text2video で実行し、その後 task ID でタスク状態を追跡して結果を取得します。
このエンドポイントは、プロンプト(Prompt)から Kling のテキストから動画タスクを作成するために使用します。完成済みの動画をすぐに返すのではなく、非同期ジョブを開始します。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.
最初に動作確認するリクエスト
- まずは短いプロンプト(Prompt)を送信します
- 基本的なフローが動作してから
aspect_ratio、duration、modeを追加してください - 純粋なポーリングではなくプッシュ配信を使いたい場合は
callback_urlを設定してください
タスクの流れ
タスク状態をポーリング
承認
Bearer token authentication. Use your CometAPI key.
ヘッダー
Must be application/json.
ボディ
Text prompt describing the video to generate. Maximum 500 characters.
Elements to exclude from the video. Maximum 200 characters.
Output aspect ratio (width:height). Options: 16:9, 9:16, 1:1, 4:3, 3:4, 3:2, 2:3.
Webhook URL to receive task status updates when the task completes.
Kling model variant to use. See the Models page for current options.
Prompt adherence strength. Higher values follow the prompt more closely. Range: 0–1.
Generation mode. std for standard (faster), pro for professional (higher quality).
std, pro Output video length in seconds. Options: 5, 10.
Camera motion preset or manual configuration. Omit for automatic camera movement.
Custom task id for your own tracking. Does not replace the system-generated task id but can be used to query tasks. Must be unique per user.