Title: Next-Gen AI Video & AI Image Generator URL Source: https://app.klingai.com/global/dev/document-api/apiReference/model/textToVideo Markdown Content: Kling AI: Next-Gen AI Video & AI Image Generator =============== The Kling 3.0 series models API is now fully available Learn More - Getting Started - Product Introduction - Video Effects Center NEW - Quick Start - API Reference - Update Announcement - General Information - Rate Limits - API Calls - Capability Map - Omni Video (O1) - Text to Video - Image to Video - Multi-Image to Video - Motion Control - Multi-Elements - Video Extension - Avatar - Lip-Sync - Video Effects - Text to Audio - Video to Audio - TTS - Image Generation - Omni Image (O1) - Multi-Image to Image - Image Expansion - AI Multi-Shot - Image Recognize - Element - Virtual Try-On - Custom Voices - Callback Protocol - Account Information Inquiry - 【API】Billing - Billing - Prepaid Resource Packs - Related Protocols - Privacy Policy of API Service - Terms of API Service - API Service Level Agreement Text to Video ============= - * * Create Task ----------- POST/v1/videos/text2video cURL cURL Copy Collapse curl --request POST \ --url https://api-singapore.klingai.com/v1/videos/text2video \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data '{ "model_name": "kling-v2-6", "prompt": "A cute little rabbit wearing glasses, sitting at a table, reading a newspaper, with a cup of cappuccino on the table", "negative_prompt": "", "duration": "5", "mode": "pro", "sound": "on", "aspect_ratio": "1:1", "callback_url": "", "external_task_id": "" }' 200 Copy Collapse { "code": 0, // Error codes; Specific definitions can be found in "Error Code" "message": "string", // Error information "request_id": "string", // Request ID, generated by the system "data": { "task_id": "string", // Task ID, generated by the system "task_info": { // Task creation parameters "external_task_id": "string" // Customer-defined task ID }, "task_status": "string", // Task status, Enum values: submitted, processing, succeed, failed "created_at": 1722769557708, // Task creation time, Unix timestamp, unit ms "updated_at": 1722769557708 // Task update time, Unix timestamp, unit ms } } Please note that in order to maintain naming consistency, the original model field has been changed to model_name, so in the future, please use this field to specify the version of the model that needs to be called. At the same time, we keep the behavior forward-compatible. If you continue to use the original model field, it will not have any impact on the interface call, there will not be any exception, which is equivalent to the default behavior when model_name is empty (i.e., call the V1 model). ### Request Header Content-Type string Required Default to application/json Data Exchange Format Authorization string Required Authentication information, refer to API authorization ### Request Body model_name string Optional Default to kling-v1 Model Name Enum values:kling-v1 kling-v1-6 kling-v2-master kling-v2-1-master kling-v2-5-turbo kling-v2-6 prompt string Required Positive text prompt - Cannot exceed 2500 characters negative_prompt string Optional Negative text prompt - Cannot exceed 2500 characters sound string Optional Default to off Is sound generated simultaneously when generating videos Enum values:on off - Only V2.6 and subsequent versions of the model supports this parameter cfg_scale float Optional Default to 0.5 The degree of freedom for generating video; the larger the value, the smaller the degree of freedom of the model - Value range: [0, 1] - kling-v2.x models do not support this parameter mode string Optional Default to std Video generation mode Enum values:std pro - std: Standard mode, basic mode, cost-effective - pro: Expert mode (high quality), high performance mode, better video quality - Support varies by model version and video mode. See Capability Map (https://app.klingai.com/global/dev/document-api/apiReference/model/skillsMap) for details. camera_control object Optional Terms of controlling camera movement (if not specified, the model will intelligently match based on the input text/images) - Support varies by model version and video mode. See Capability Map (https://app.klingai.com/global/dev/document-api/apiReference/model/skillsMap) for details. ▾Hide child attributes type string Optional Predefined camera movements type Enum values:simple down_back forward_up right_turn_forward left_turn_forward - simple: Simple camera movement, you can choose one of six options in "config" - down_back: Camera descends and moves backward ➡️ Pan down and zoom out. The config parameter must be set to "None" under this type. - forward_up: Camera moves forward and tilts up ➡️ Zoom in and pan up. The config parameter must be set to "None" under this type. - right_turn_forward: Rotate right then move forward ➡️ Rotate right and advance. The config parameter must be set to "None" under this type. - left_turn_forward: Rotate left then move forward ➡️ Rotate left and advance. The config parameter must be set to "None" under this type. config object Optional Contains 6 fields, used to specify the camera's movement or change in different directions - Required when type is simple, not required for other types - Choose 1 of the following 6 parameters, only one can be non-zero, others must be 0 ▾Hide child attributes horizontal float Optional Horizontal, controls the camera's movement along the horizontal axis (translation along the x-axis) - Value range: [-10, 10] - Negative value indicates a translation to the left, positive value indicates a translation to the right vertical float Optional Vertical, controls the camera's movement along the vertical axis (translation along the y-axis) - Value range: [-10, 10] - Negative value indicates a downward translation, positive value indicates an upward translation pan float Optional Pan, controls the camera's rotation in the horizontal plane (rotation around the y-axis) - Value range: [-10, 10] - Negative value indicates rotation to the left around y-axis, positive value indicates rotation to the right around y-axis tilt float Optional Tilt, controls the camera's rotation in the vertical plane (rotation around the x-axis) - Value range: [-10, 10] - Negative value indicates rotation down around x-axis, positive value indicates rotation up around x-axis roll float Optional Roll, controls the camera's roll (rotation around the z-axis) - Value range: [-10, 10] - Negative value indicates counterclockwise rotation around z-axis, positive value indicates clockwise rotation around z-axis zoom float Optional Zoom, controls the camera's focal length change, affecting the distance of the field of view - Value range: [-10, 10] - Negative value indicates longer focal length, smaller field of view; positive value indicates shorter focal length, larger field of view aspect_ratio string Optional Default to 16:9 The aspect ratio of the generated video frame (width:height) Enum values:16:9 9:16 1:1 duration string Optional Default to 5 Video Length, unit: s (seconds) Enum values:5 10 watermark_info object Optional Whether to generate watermarked results simultaneously - Defined by the enabled parameter, format: "watermark_info": { "enabled": boolean } - true: generate watermarked result, false: do not generate - Custom watermarks are not currently supported callback_url string Optional Callback notification URL for this task result. If configured, the server will actively notify when the task status changes - For specific message schema, see Callback Protocol (https://app.klingai.com/global/dev/document-api/apiReference/callbackProtocol) external_task_id string Optional Customized Task ID - Users can provide a customized task ID, which will not overwrite the system-generated task ID but can be used for task queries - Must be unique within a single user account cURL cURL Copy Collapse curl --request POST \ --url https://api-singapore.klingai.com/v1/videos/text2video \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data '{ "model_name": "kling-v2-6", "prompt": "A cute little rabbit wearing glasses, sitting at a table, reading a newspaper, with a cup of cappuccino on the table", "negative_prompt": "", "duration": "5", "mode": "pro", "sound": "on", "aspect_ratio": "1:1", "callback_url": "", "external_task_id": "" }' 200 Copy Collapse { "code": 0, // Error codes; Specific definitions can be found in "Error Code" "message": "string", // Error information "request_id": "string", // Request ID, generated by the system "data": { "task_id": "string", // Task ID, generated by the system "task_info": { // Task creation parameters "external_task_id": "string" // Customer-defined task ID }, "task_status": "string", // Task status, Enum values: submitted, processing, succeed, failed "created_at": 1722769557708, // Task creation time, Unix timestamp, unit ms "updated_at": 1722769557708 // Task update time, Unix timestamp, unit ms } } - * * Query Task (Single) ------------------- GET/v1/videos/text2video/{id} cURL cURL Copy Collapse curl --request GET \ --url https://api-singapore.klingai.com/v1/videos/text2video/{task_id} \ --header 'Authorization: Bearer ' 200 Copy Collapse { "code": 0, // Error codes; Specific definitions can be found in "Error Code" "message": "string", // Error information "request_id": "string", // Request ID, generated by the system, is used to track requests and troubleshoot problems "data": { "task_id": "string", // Task ID, generated by the system "task_status": "string", // Task status, Enum values: submitted, processing, succeed, failed "task_status_msg": "string", // Task status information, displaying the failure reason when the task fails (such as triggering the content risk control of the platform, etc.) "final_unit_deduction": "string", // The deduction units of task "watermark_info": { "enabled": boolean }, "task_info": { // Task creation parameters "external_task_id": "string" // Customer-defined task ID }, "task_result": { "videos": [ { "id": "string", // Generated video ID; globally unique "url": "string", // URL for generating videos (To ensure information security, generated images/videos will be cleared after 30 days. Please make sure to save them promptly.) "watermark_url": "string", // Watermarked video download URL, anti-leech format "duration": "string" // Total video duration, unit: s (seconds) } ] }, "created_at": 1722769557708, // Task creation time, Unix timestamp, unit: ms "updated_at": 1722769557708 // Task update time, Unix timestamp, unit: ms } } ### Request Header Content-Type string Required Default to application/json Data Exchange Format Authorization string Required Authentication information, refer to API authentication ### Path Parameters task_id string Optional Task ID for text-to-video. Fill the value directly in the request path. Choose either task_id or external_task_id for querying. external_task_id string Optional Customized Task ID for text-to-video. Fill the value directly in the request path. Choose either task_id or external_task_id for querying. cURL cURL Copy Collapse curl --request GET \ --url https://api-singapore.klingai.com/v1/videos/text2video/{task_id} \ --header 'Authorization: Bearer ' 200 Copy Collapse { "code": 0, // Error codes; Specific definitions can be found in "Error Code" "message": "string", // Error information "request_id": "string", // Request ID, generated by the system, is used to track requests and troubleshoot problems "data": { "task_id": "string", // Task ID, generated by the system "task_status": "string", // Task status, Enum values: submitted, processing, succeed, failed "task_status_msg": "string", // Task status information, displaying the failure reason when the task fails (such as triggering the content risk control of the platform, etc.) "final_unit_deduction": "string", // The deduction units of task "watermark_info": { "enabled": boolean }, "task_info": { // Task creation parameters "external_task_id": "string" // Customer-defined task ID }, "task_result": { "videos": [ { "id": "string", // Generated video ID; globally unique "url": "string", // URL for generating videos (To ensure information security, generated images/videos will be cleared after 30 days. Please make sure to save them promptly.) "watermark_url": "string", // Watermarked video download URL, anti-leech format "duration": "string" // Total video duration, unit: s (seconds) } ] }, "created_at": 1722769557708, // Task creation time, Unix timestamp, unit: ms "updated_at": 1722769557708 // Task update time, Unix timestamp, unit: ms } } - * * Query Task (List) ----------------- GET/v1/videos/text2video cURL cURL Copy Collapse curl --request GET \ --url 'https://api-singapore.klingai.com/v1/videos/text2video?pageNum=1&pageSize=30' \ --header 'Authorization: Bearer ' 200 Copy Collapse { "code": 0, // Error codes; Specific definitions can be found in Error codes "message": "string", // Error information "request_id": "string", // Request ID, generated by the system, to track requests and troubleshoot problems "data": [ { "task_id": "string", // Task ID, generated by the system "task_status": "string", // Task status, Enum values: submitted, processing, succeed, failed "task_status_msg": "string", // Task status information, displaying the failure reason when the task fails (such as triggering the content risk control of the platform, etc.) "final_unit_deduction": "string", // The deduction units of task "watermark_info": { "enabled": boolean }, "task_info": { // Task creation parameters "external_task_id": "string" // Customer-defined task ID }, "task_result": { "videos": [ { "id": "string", // Generated video ID; globally unique "url": "string", // URL for generating videos (To ensure information security, generated images/videos will be cleared after 30 days. Please make sure to save them promptly.) "watermark_url": "string", // Watermarked video download URL, anti-leech format "duration": "string" // Total video duration, unit: s (seconds) } ] }, "created_at": 1722769557708, // Task creation time, Unix timestamp, unit: ms "updated_at": 1722769557708 // Task update time, Unix timestamp, unit: ms } ] } ### Request Header Content-Type string Required Default to application/json Data Exchange Format Authorization string Required Authentication information, refer to API authentication ### Query Parameters pageNum int Optional Default to 1 Page number - Value range: [1, 1000] pageSize int Optional Default to 30 Number of items per page - Value range: [1, 500] cURL cURL Copy Collapse curl --request GET \ --url 'https://api-singapore.klingai.com/v1/videos/text2video?pageNum=1&pageSize=30' \ --header 'Authorization: Bearer ' 200 Copy Collapse { "code": 0, // Error codes; Specific definitions can be found in Error codes "message": "string", // Error information "request_id": "string", // Request ID, generated by the system, to track requests and troubleshoot problems "data": [ { "task_id": "string", // Task ID, generated by the system "task_status": "string", // Task status, Enum values: submitted, processing, succeed, failed "task_status_msg": "string", // Task status information, displaying the failure reason when the task fails (such as triggering the content risk control of the platform, etc.) "final_unit_deduction": "string", // The deduction units of task "watermark_info": { "enabled": boolean }, "task_info": { // Task creation parameters "external_task_id": "string" // Customer-defined task ID }, "task_result": { "videos": [ { "id": "string", // Generated video ID; globally unique "url": "string", // URL for generating videos (To ensure information security, generated images/videos will be cleared after 30 days. Please make sure to save them promptly.) "watermark_url": "string", // Watermarked video download URL, anti-leech format "duration": "string" // Total video duration, unit: s (seconds) } ] }, "created_at": 1722769557708, // Task creation time, Unix timestamp, unit: ms "updated_at": 1722769557708 // Task update time, Unix timestamp, unit: ms } ] } Previous chapter:Omni Video (O1) Next chapter:Image to Video Create Task Query Task (Single) Query Task (List) The Kling 3.0 Series Models API is Now Fully Available – All in One, One for All! Models Available in This Release Kling Video 3.0, Kling Video 3.0 Omni, Kling Image 3.0, Kling Image 3.0 Omni Refer to (https://docs.qingque.cn/d/home/eZQDkLsWj1-DlmBV0EQIOm9vu?identityId=2CFp2MveJ7c#section=h.f13f61edvoid) - Key Highlights of the Models 3.0 All-in-One: A unified model for multi-modal input and output. - Most powerful consistency across the universe: Subject consistency (supports cameo, subject with voice control, i2v + subject) and text consistency. - Narrative control at your fingertips: More freedom, precision, and control—up to 15 seconds long, video scene cuts, ultra-high-definition storyboards/images, custom seconds. - Upgraded native audio-visual output: Supports multiple speakers and languages (with accents). - Kling Video 3.0 Compared to 2.6, expected improvements: - Supports subject upload in I2V scenarios for enhanced consistency - Significant improvement in multi-character referencing, especially for three-person scenarios - Supports Japanese, Korean, and Spanish in addition to Chinese and English - Capable of generating certain dialects and accents - Better distinction and control over different types of audio (speech, sound effects, BGM) - Improved text retention in I2V scenarios - Supports scene transitions, with up to 6 shots and customizable storyboarding User Guide -> (https://app.klingai.com/global/quickstart/klingai-video-3-model-user-guide) - Kling Video 3.0 Omni Compared to O1, expected improvements: - Native audio-visual synchronization - Supports video subject creation - Further improved consistency in reference-based tasks, especially for characters and products - Combined capabilities of reference + storyboarding + audio-visual sync significantly enhance usability - Supports scene transitions, with up to 6 shots - Extended generation duration up to 15 seconds User Guide -> (https://app.klingai.com/global/quickstart/klingai-video-3-omni-model-user-guide) - Kling Image 3.0 - Highly consistent feature retention - Precise response to detail modifications - Accurate control over style and tone - Rich imaginative capabilities User Guide -> (https://app.klingai.com/global/quickstart/klingai-image-3-model-user-guide) - Kling Image 3.0 Omni - Enhanced narrative sense - New storyboard image set generation, retaining reference image features with scene relevance - Direct output of 2K/4K ultra-high-definition images - Further improved detail consistency User Guide -> (https://app.klingai.com/global/quickstart/klingai-image-3-omni-user-guide) Quick Notice: Kling 3.0 Motion Control is expected to be available after Chinese Spring Festival Holiday. Please stay tuned! Key capabilities will be upgraded: ✓ Significantly improved facial consistency for characters ✓ Ensured continuity and stability of lip-sync and facial expressions even in complex movements, multiple angles, or long-duration expression changes ✓ Further expanded the boundaries in film compositing, motion capture, and diverse entertainment scenarios Thank you for your support and understanding! I Got It - cURL - cURL - cURL