# Kling Video O3 API Complete API reference for Kling Video O3 models by Kuaishou. ## Model Variants This API supports eight model variants: | Model | ID | Tier | Description | |-------|-----|------|-------------| | **Kling Video O3 Std Text to Video** | `kling-video-o3-std-text-to-video` | Standard | Text-to-video generation | | **Kling Video O3 Std Image to Video** | `kling-video-o3-std-image-to-video` | Standard | Image-to-video animation | | **Kling Video O3 Std Reference to Video** | `kling-video-o3-std-reference-to-video` | Standard | Reference-guided video generation | | **Kling Video O3 Std Video Edit** | `kling-video-o3-std-video-edit` | Standard | Video editing with text instructions | | **Kling Video O3 Pro Text to Video** | `kling-video-o3-pro-text-to-video` | Pro | High-quality text-to-video | | **Kling Video O3 Pro Image to Video** | `kling-video-o3-pro-image-to-video` | Pro | High-quality image-to-video | | **Kling Video O3 Pro Reference to Video** | `kling-video-o3-pro-reference-to-video` | Pro | High-quality reference-guided video | | **Kling Video O3 Pro Video Edit** | `kling-video-o3-pro-video-edit` | Pro | High-quality video editing | ## Quick Comparison | Feature | Std | Pro | |---------|-----|-----| | Quality | Standard | Highest | | Processing Speed | Faster | Slower | | Aspect Ratios | 16:9, 9:16, 1:1 | 16:9, 9:16, 1:1 | | Duration Range | 3-15 seconds | 3-15 seconds | ### Supported Aspect Ratios `16:9`, `9:16`, `1:1` ## Kling Video O3 Text to Video (Std & Pro) ### Endpoint ``` POST /api/v1/video/task ``` ### Request Parameters #### Required | Parameter | Type | Description | |-----------|------|-------------| | `model_name` | string | `"kling-video-o3-std-text-to-video"` or `"kling-video-o3-pro-text-to-video"` | | `prompt` | string | Video generation prompt | | `duration` | number | Video duration in seconds (3-15) | | `aspect_ratio` | string | Video aspect ratio: `"16:9"`, `"9:16"`, or `"1:1"` | #### Optional | Parameter | Type | Description | |-----------|------|-------------| | `sound` | boolean | Generate ambient sound for the video | | `multi_prompt` | object[] | Optional segmented prompts, each item uses `{ prompt: string, duration: number }` | ### Example Request ```javascript const response = await fetch('https://api.flaq.ai/api/v1/video/task', { method: 'POST', headers: { 'Authorization': 'Bearer YOUR_API_KEY', 'Content-Type': 'application/json' }, body: JSON.stringify({ model_name: 'kling-video-o3-std-text-to-video', prompt: 'A drone flying over a mountain range at sunrise', duration: 5, aspect_ratio: '16:9' }) }); const { data } = await response.json(); const taskId = data.task_id; ``` ## Kling Video O3 Image to Video (Std & Pro) ### Request Parameters #### Required | Parameter | Type | Description | |-----------|------|-------------| | `model_name` | string | `"kling-video-o3-std-image-to-video"` or `"kling-video-o3-pro-image-to-video"` | | `prompt` | string | Video generation prompt | | `duration` | number | Video duration in seconds (3-15) | | `image_url` | string | The first frame of the video | #### Optional | Parameter | Type | Description | |-----------|------|-------------| | `sound` | boolean | Generate ambient sound for the video | | `image_end_url` | string | Optional ending frame image URL | | `multi_prompt` | object[] | Optional segmented prompts, each item uses `{ prompt: string, duration: number }` | ### Example Request ```javascript { model_name: 'kling-video-o3-pro-image-to-video', image_url: 'https://example.com/image.jpg', prompt: 'Camera slowly pulls back revealing the landscape', duration: 5, image_end_url: 'https://example.com/end-frame.jpg' } ``` ## Kling Video O3 Reference to Video (Std & Pro) ### Request Parameters #### Required | Parameter | Type | Description | |-----------|------|-------------| | `model_name` | string | `"kling-video-o3-std-reference-to-video"` or `"kling-video-o3-pro-reference-to-video"` | | `prompt` | string | Video generation prompt. Write a standard prompt without placeholders, or optionally use the @ (AT) reference feature with `<<>>` and `<<>>` to explicitly reference the corresponding media inputs | | `duration` | number | Video duration in seconds (3-15) | | `aspect_ratio` | string | Video aspect ratio: `"16:9"`, `"9:16"`, or `"1:1"` | #### Optional | Parameter | Type | Description | |-----------|------|-------------| | `images` | string[] | Reference image URL array for style or character guidance | | `video_url` | string | Optional reference video URL | | `keep_original_sound` | boolean | Preserve the original sound when a reference video is provided | | `sound` | boolean | Generate ambient sound for the video | | `multi_prompt` | object[] | Optional segmented prompts, each item uses `{ prompt: string, duration: number }` | #### @ (AT) Reference Placeholders The @ (AT) reference feature links reference media to the prompt through numbered `<<<...>>>` placeholders. Image numbering starts at `1` and follows the order of the `images` array. Because this model accepts one reference video URL, `<<>>` refers to `video_url`. | Placeholder | Referenced value | |-------------|------------------| | `<<>>` | `images[0]` | | `<<>>` | `images[1]` | | `<<>>` | `video_url` | ### Example Request ```javascript { model_name: 'kling-video-o3-std-reference-to-video', video_url: 'https://example.com/source.mp4', images: ['https://example.com/reference-a.jpg', 'https://example.com/reference-b.jpg'], prompt: 'Character walking through a forest', duration: 8, aspect_ratio: '16:9', keep_original_sound: true } ``` ### @ (AT) Reference-to-Video Request Example ```javascript { model_name: 'kling-video-o3-std-reference-to-video', video_url: 'https://example.com/motion-reference.mp4', images: [ 'https://example.com/athlete-reference.jpg', 'https://example.com/uniform-reference.jpg' ], prompt: 'Make the athlete from <<>> follow the motion in <<>> while preserving the uniform details from <<>>', duration: 8, aspect_ratio: '16:9', keep_original_sound: true } ``` ## Kling Video O3 Video Edit (Std & Pro) ### Request Parameters #### Required | Parameter | Type | Description | |-----------|------|-------------| | `model_name` | string | `"kling-video-o3-std-video-edit"` or `"kling-video-o3-pro-video-edit"` | | `prompt` | string | Description of desired edits | | `video_url` | string | URL of the source video to edit | | `duration` | number | Video duration in seconds (3-10) | #### Optional | Parameter | Type | Description | |-----------|------|-------------| | `images` | string[] | Reference image URL array for edit guidance | | `keep_original_sound` | boolean | Preserve the original sound from the source video | ### Example Request ```javascript { model_name: 'kling-video-o3-pro-video-edit', video_url: 'https://example.com/source.mp4', duration: 5, images: ['https://example.com/ref.jpg'], prompt: 'Add falling snow throughout the scene', keep_original_sound: true } ``` ## Response Format ### Initial Response ```json { "code": 0, "message": "success", "data": { "task_id": "{task_id}", "response_url": "https://api.flaq.ai/api/v1/video/{task_id}", "task_status": "submitted" } } ``` ### Polling Response Poll `GET /api/v1/video/{taskId}` to check status: ```json { "code": 0, "message": "success", "data": { "task_id": "{task_id}", "response_url": "https://api.flaq.ai/api/v1/video/{task_id}", "task_status": "succeed", "task_status_msg": null, "task_result": { "credit": 0.2, "videos": [ { "url": "https://example.com/generated-video.mp4" } ] } } } ``` ### Status Values - `submitted`: Task accepted and waiting to be processed - `processing`: Video generation in progress - `succeed`: Video generation completed - `failed`: Video generation failed ## Processing Time - **Standard**: 2-5 minutes - **Pro**: 3-8 minutes ## Best Practices 1. **Tier Selection**: Use Std for iteration, Pro for final output 2. **Motion Description**: Include specific camera and subject movement details 3. **Reference Inputs**: Use clear, high-quality reference images or reference videos for better character consistency 4. **Video Edit Prompts**: Be specific about what to change while preserving the original content