Module: RunApi::Kling::Types
- Defined in:
- lib/runapi/kling/types.rb
Overview
Type definitions and constants for Kling video generation.
Defined Under Namespace
Classes: AiAvatarResponse, AsyncTaskResponse, CompletedAiAvatarResponse, CompletedImageToVideoResponse, CompletedMotionControlResponse, CompletedTextToVideoResponse, ImageToVideoResponse, MotionControlResponse, TextToVideoResponse, Video
Constant Summary collapse
- TEXT_TO_VIDEO_MODELS =
Text-to-video model variants. kling-3.0 supports multi-shot, sound, and elements; V2.x models support negative prompts and cfg_scale.
%w[ kling-3.0 kling-v2.5-turbo-text-to-video-pro kling-v2.1-master-text-to-video ].freeze
- AI_AVATAR_MODELS =
AI avatar lip-sync quality tiers, from highest to fastest.
%w[ kling-ai-avatar-pro kling-ai-avatar-standard kling-ai-avatar-v1-pro kling-v1-avatar-standard ].freeze
- IMAGE_TO_VIDEO_MODELS =
Image-to-video model variants. V2.5 turbo and V2.1 pro support last-frame image control.
%w[ kling-v2.5-turbo-image-to-video-pro kling-v2.1-pro kling-v2.1-standard kling-v2.1-master-image-to-video ].freeze
- TEXT_TO_VIDEO_OUTPUT_RESOLUTIONS =
Output resolution options. 4k is highest quality but slowest.
%w[720p 1080p 4k].freeze
- MOTION_CONTROL_MODELS =
%w[kling-3.0].freeze
- MOTION_CONTROL_OUTPUT_RESOLUTIONS =
%w[720p 1080p].freeze
- MOTION_CONTROL_CHARACTER_ORIENTATIONS =
Whether the character faces the direction from the video or the image.
%w[video image].freeze
- MOTION_CONTROL_BACKGROUND_SOURCES =
Whether the background comes from the reference video or the subject image.
%w[video image].freeze
- ASPECT_RATIOS =
%w[16:9 9:16 1:1].freeze
- DURATION_RANGE =
Duration range for kling-3.0 (seconds).
(3..15)
- MULTI_PROMPT_DURATION_RANGE =
Per-shot duration range in multi-shot mode (seconds).
(1..12)
- FIXED_DURATIONS =
Fixed duration options for V2.x models (seconds).
[5, 10].freeze
- MULTI_PROMPT_MAX_LENGTH =
Maximum character length for each multi-shot prompt segment.
500