Kling AI provider configuration options
The Kling AI provider instance accepts these optional settings: apiKey (string, defaults to KLINGAI_API_KEY environment variable), accessKey (string, defaults to KLINGAI_ACCESS_KEY, legacy), secretKey (string, defaults to KLINGAI_SECRET_KEY, legacy), baseURL (string, defaults to https://api-singapore.klingai.com), headers (Record<string,string>), and fetch ((input: RequestInfo, init?: RequestInit) => Promise<Response>).
Kling AI common video provider options
Common video provider options for Kling AI: mode ('std' | 'pro', video generation mode with 'std' being cost-effective and 'pro' producing higher quality), pollIntervalMs (number, polling interval in milliseconds for checking task status, defaults to 5000), pollTimeoutMs (number, maximum wait time in milliseconds for video generation, defaults to 600000), watermarkEnabled (boolean, whether to generate watermarked results simultaneously).
Kling AI text-to-video and image-to-video provider options
Text-to-video and image-to-video options for Kling AI: negativePrompt (string, max 2500 characters, description of what to avoid), sound ('on' | 'off', whether to generate audio, only V2.6+ models, requires mode: 'pro'), cfgScale (number, flexibility in video generation with higher values meaning stronger prompt adherence, range [0, 1], not supported by V2.x), cameraControl (object with type preset 'simple'|'down_back'|'forward_up'|'right_turn_forward'|'left_turn_forward' and optional config with horizontal, vertical, pan, tilt, roll, zoom values in range [-10, 10]), multiShot (boolean, enable multi-shot video generation for Kling v3.0+), shotType ('customize' | 'intelligence', storyboard method required when multiShot is true), multiPrompt (Array<{index, prompt, duration}>, per-shot details where prompt is max 512 characters and durations sum to total duration, required when multiShot is true and shotType is 'customize'), voiceList (Array<{voice_id: string}>, voice references for voice control v3.0+, up to 2 voices, requires sound: 'on', cannot coexist with elementList on I2V endpoint).
Kling AI image-to-video only provider options
Image-to-video only options for Kling AI: imageTail (string, end frame image for start+end frame control, accepts image URL or raw base64-encoded data, requires mode: 'pro' for most models), staticMask (string, static brush mask image for motion brush, accepts image URL or base64), dynamicMasks (Array, dynamic brush configurations for motion brush with up to 6 groups, each with mask and trajectories array of {x, y} coordinates).
Kling AI image-to-video and motion control provider options
Image-to-video and motion control options for Kling AI: elementList (Array<{element_id: number}>, reference elements for element control v3.0+, supports video character elements and multi-image elements, up to 3 elements for I2V cannot coexist with voiceList, up to 1 element for motion control).
Kling AI motion control only provider options
Motion control only options for Kling AI: videoUrl (string, required, URL of reference motion video, supports .mp4/.mov, max 100MB, duration 3–30 seconds), characterOrientation ('image' | 'video', required, orientation of characters in generated video, 'image' matches reference image orientation max 10s video, 'video' matches reference video orientation max 30s video), keepOriginalSound ('yes' | 'no', whether to keep original sound from reference video, defaults to 'yes').