feat: expand novel IP and production workflows
This commit is contained in:
@@ -0,0 +1,213 @@
|
||||
UPDATE `provider_configs`
|
||||
SET
|
||||
`display_name` = CASE
|
||||
WHEN `provider_code` = 'kling-v3-omni-native-audio-720p-video' THEN '可灵 v3 Omni 原生音频 720P 视频'
|
||||
ELSE '可灵 v3 Omni 原生音频 1080P 视频'
|
||||
END,
|
||||
`config_json` = JSON_REMOVE(
|
||||
JSON_SET(
|
||||
COALESCE(`config_json`, JSON_OBJECT()),
|
||||
'$.driver', 'kling_omni_video',
|
||||
'$.auth_type', 'bearer',
|
||||
'$.api_key_env', 'KLING_API_KEY',
|
||||
'$.base_url', 'https://api-singapore.klingai.com',
|
||||
'$.timeout_ms', 600000,
|
||||
'$.create_endpoint', '/v1/videos/omni-video',
|
||||
'$.task_endpoint_template', '/v1/videos/omni-video/{task_id}',
|
||||
'$.poll_interval_ms', 10000,
|
||||
'$.max_poll_attempts', 120,
|
||||
'$.model_field', 'model_name',
|
||||
'$.prompt_field', 'prompt',
|
||||
'$.duration_field', 'duration',
|
||||
'$.aspect_ratio_field', 'aspect_ratio',
|
||||
'$.mode_field', 'mode',
|
||||
'$.aspect_ratio', '9:16',
|
||||
'$.mode', CASE
|
||||
WHEN `provider_code` = 'kling-v3-omni-native-audio-720p-video' THEN 'std'
|
||||
ELSE 'pro'
|
||||
END,
|
||||
'$.resolution', CASE
|
||||
WHEN `provider_code` = 'kling-v3-omni-native-audio-720p-video' THEN '720p'
|
||||
ELSE '1080p'
|
||||
END,
|
||||
'$.duration', 5,
|
||||
'$.allowed_modes', JSON_ARRAY('std', 'pro', '4k'),
|
||||
'$.allowed_resolutions', JSON_ARRAY('720p', '1080p', '4k'),
|
||||
'$.allowed_durations', JSON_ARRAY(3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15),
|
||||
'$.max_prompt_length', 2500,
|
||||
'$.max_multi_prompt_length', 512,
|
||||
'$.max_multi_shots', 6,
|
||||
'$.max_image_inputs', 7,
|
||||
'$.web_max_image_inputs', 7,
|
||||
'$.max_reference_images', 6,
|
||||
'$.reference_image_limit', 6,
|
||||
'$.max_image_inputs_without_video', 7,
|
||||
'$.max_image_inputs_with_video', 4,
|
||||
'$.max_video_inputs', 1,
|
||||
'$.max_elements_with_start_end_frames', 3,
|
||||
'$.input_image_formats', JSON_ARRAY('jpg', 'jpeg', 'png'),
|
||||
'$.input_image_mime_types', JSON_ARRAY('image/jpeg', 'image/png'),
|
||||
'$.input_image_max_mb', 10,
|
||||
'$.input_image_min_dimension', 300,
|
||||
'$.input_image_min_aspect_ratio', 0.4,
|
||||
'$.input_image_max_aspect_ratio', 2.5,
|
||||
'$.video_input_formats', JSON_ARRAY('mp4', 'mov'),
|
||||
'$.video_input_min_seconds', 3,
|
||||
'$.video_input_max_seconds', 15.5,
|
||||
'$.video_input_max_mb', 200,
|
||||
'$.video_input_min_fps', 24,
|
||||
'$.video_input_max_fps', 60,
|
||||
'$.video_input_min_dimension', 700,
|
||||
'$.video_input_max_dimension', 4553,
|
||||
'$.video_input_max_area', 8294400,
|
||||
'$.video_modes', JSON_ARRAY('text_to_video', 'first_frame', 'start_end_frame', 'multi_image_reference', 'video_reference'),
|
||||
'$.extra_body_json', JSON_OBJECT('sound', 'on', 'watermark_info', JSON_OBJECT('enabled', false)),
|
||||
'$.supports_4k', true,
|
||||
'$.supports_reference_image', true,
|
||||
'$.supports_start_end_frame', true,
|
||||
'$.supports_multi_image_reference', true,
|
||||
'$.supports_reference_video', true,
|
||||
'$.supports_multi_shot', true,
|
||||
'$.supports_audio', true,
|
||||
'$.supports_lipsync', true,
|
||||
'$.supports_character_reference', true,
|
||||
'$.supports_multi_character', true,
|
||||
'$.supports_style_reference', true,
|
||||
'$.note', 'Kling 3.0 Omni 官方新接口:支持原生 4K、最多 7 个图片与元素参考、单个参考视频、多镜头及原生音频。'
|
||||
),
|
||||
'$.access_key_env',
|
||||
'$.secret_key_env',
|
||||
'$.jwt_ttl_seconds',
|
||||
'$.jwt_nbf_skew_seconds',
|
||||
'$.image_field',
|
||||
'$.reference_images_field',
|
||||
'$.resolution_field'
|
||||
),
|
||||
`cost_rule_json` = JSON_SET(
|
||||
COALESCE(`cost_rule_json`, JSON_OBJECT()),
|
||||
'$.unit', 'video_seconds',
|
||||
'$.currency', 'USD',
|
||||
'$.price_per_second', CASE
|
||||
WHEN `provider_code` = 'kling-v3-omni-native-audio-720p-video' THEN 0.112
|
||||
ELSE 0.14
|
||||
END,
|
||||
'$.cny_fx_rate', 6.79,
|
||||
'$.max_cost_per_call', CASE
|
||||
WHEN `provider_code` = 'kling-v3-omni-native-audio-720p-video' THEN 2
|
||||
ELSE 3
|
||||
END,
|
||||
'$.daily_cost_limit', CASE
|
||||
WHEN `provider_code` = 'kling-v3-omni-native-audio-720p-video' THEN 30
|
||||
ELSE 50
|
||||
END,
|
||||
'$.estimated_seconds', 10,
|
||||
'$.note', CASE
|
||||
WHEN `provider_code` = 'kling-v3-omni-native-audio-720p-video'
|
||||
THEN 'Kling v3 Omni 原生音频 720P:$0.112/s,10s 约 $1.12 / ¥7.61;最终以 Kling 账单为准。'
|
||||
ELSE 'Kling v3 Omni 原生音频 1080P:$0.14/s,10s 约 $1.40 / ¥9.51;最终以 Kling 账单为准。'
|
||||
END
|
||||
),
|
||||
`updated_at` = NOW(3)
|
||||
WHERE `provider_type` = 'VideoProvider'
|
||||
AND `provider_code` IN (
|
||||
'kling-v3-omni-native-audio-720p-video',
|
||||
'kling-v3-omni-native-audio-1080p-video'
|
||||
);
|
||||
|
||||
INSERT INTO `provider_configs`
|
||||
(`provider_type`, `provider_code`, `display_name`, `mode`, `model_name`, `config_json`, `is_enabled`, `priority`, `rate_limit_json`, `cost_rule_json`, `created_at`, `updated_at`)
|
||||
VALUES
|
||||
(
|
||||
'VideoProvider',
|
||||
'kling-v3-omni-native-audio-4k-video',
|
||||
'可灵 v3 Omni 原生音频 4K 视频',
|
||||
'real',
|
||||
'kling-v3-omni',
|
||||
JSON_OBJECT(
|
||||
'driver', 'kling_omni_video',
|
||||
'auth_type', 'bearer',
|
||||
'api_key_env', 'KLING_API_KEY',
|
||||
'base_url', 'https://api-singapore.klingai.com',
|
||||
'timeout_ms', 600000,
|
||||
'create_endpoint', '/v1/videos/omni-video',
|
||||
'task_endpoint_template', '/v1/videos/omni-video/{task_id}',
|
||||
'poll_interval_ms', 10000,
|
||||
'max_poll_attempts', 120,
|
||||
'model_field', 'model_name',
|
||||
'prompt_field', 'prompt',
|
||||
'duration_field', 'duration',
|
||||
'aspect_ratio_field', 'aspect_ratio',
|
||||
'mode_field', 'mode',
|
||||
'aspect_ratio', '9:16',
|
||||
'mode', '4k',
|
||||
'resolution', '4k',
|
||||
'duration', 5,
|
||||
'allowed_modes', JSON_ARRAY('std', 'pro', '4k'),
|
||||
'allowed_resolutions', JSON_ARRAY('720p', '1080p', '4k'),
|
||||
'allowed_durations', JSON_ARRAY(3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15),
|
||||
'max_prompt_length', 2500,
|
||||
'max_multi_prompt_length', 512,
|
||||
'max_multi_shots', 6,
|
||||
'max_image_inputs', 7,
|
||||
'web_max_image_inputs', 7,
|
||||
'max_reference_images', 6,
|
||||
'reference_image_limit', 6,
|
||||
'max_image_inputs_without_video', 7,
|
||||
'max_image_inputs_with_video', 4,
|
||||
'max_video_inputs', 1,
|
||||
'max_elements_with_start_end_frames', 3,
|
||||
'input_image_formats', JSON_ARRAY('jpg', 'jpeg', 'png'),
|
||||
'input_image_mime_types', JSON_ARRAY('image/jpeg', 'image/png'),
|
||||
'input_image_max_mb', 10,
|
||||
'input_image_min_dimension', 300,
|
||||
'input_image_min_aspect_ratio', 0.4,
|
||||
'input_image_max_aspect_ratio', 2.5,
|
||||
'video_input_formats', JSON_ARRAY('mp4', 'mov'),
|
||||
'video_input_min_seconds', 3,
|
||||
'video_input_max_seconds', 15.5,
|
||||
'video_input_max_mb', 200,
|
||||
'video_input_min_fps', 24,
|
||||
'video_input_max_fps', 60,
|
||||
'video_input_min_dimension', 700,
|
||||
'video_input_max_dimension', 4553,
|
||||
'video_input_max_area', 8294400,
|
||||
'video_modes', JSON_ARRAY('text_to_video', 'first_frame', 'start_end_frame', 'multi_image_reference', 'video_reference'),
|
||||
'extra_body_json', JSON_OBJECT('sound', 'on', 'watermark_info', JSON_OBJECT('enabled', false)),
|
||||
'supports_4k', true,
|
||||
'supports_reference_image', true,
|
||||
'supports_start_end_frame', true,
|
||||
'supports_multi_image_reference', true,
|
||||
'supports_reference_video', true,
|
||||
'supports_multi_shot', true,
|
||||
'supports_audio', true,
|
||||
'supports_lipsync', true,
|
||||
'supports_character_reference', true,
|
||||
'supports_multi_character', true,
|
||||
'supports_style_reference', true,
|
||||
'note', '默认禁用。Kling 3.0 Omni 官方原生 4K 模式,支持最多 7 个图片与元素参考;4K 成本较高,正式批量前需单镜头验证。'
|
||||
),
|
||||
false,
|
||||
41,
|
||||
JSON_OBJECT('rpm', 5, 'concurrency', 1),
|
||||
JSON_OBJECT(
|
||||
'flat_cost', 0,
|
||||
'unit', 'video_seconds',
|
||||
'price_per_second', 0.42,
|
||||
'currency', 'USD',
|
||||
'cny_fx_rate', 6.79,
|
||||
'max_cost_per_call', 7,
|
||||
'daily_cost_limit', 100,
|
||||
'estimated_seconds', 10,
|
||||
'note', 'Kling v3 Omni 原生音频 4K:$0.42/s,10s 约 $4.20 / ¥28.52;最终以 Kling 账单为准。'
|
||||
),
|
||||
NOW(3),
|
||||
NOW(3)
|
||||
)
|
||||
ON DUPLICATE KEY UPDATE
|
||||
`display_name` = VALUES(`display_name`),
|
||||
`mode` = VALUES(`mode`),
|
||||
`model_name` = VALUES(`model_name`),
|
||||
`priority` = VALUES(`priority`),
|
||||
`rate_limit_json` = VALUES(`rate_limit_json`),
|
||||
`cost_rule_json` = VALUES(`cost_rule_json`),
|
||||
`updated_at` = NOW(3);
|
||||
Reference in New Issue
Block a user