
Text to Image
Create AI images from text prompts
Turn written ideas into videos with Kuaishou's Kling 4.0 API on Best Image AI. Create product stories, campaign visuals, and social content from text prompts.
Kuaishou Kling 4.0 Text-to-Video API brings prompt-based video generation to developers and creative teams on Best Image AI. Turn written scene descriptions into video clips with direction for subjects, action, environments, and camera movement. Flexible resolution, duration, and aspect ratio controls support marketing videos, social content, product storytelling, and automated video production through one Kling API integration.
Prompt-to-Video Generation: Create video from natural-language descriptions of the subject, setting, action, and visual style without preparing image or video inputs.
Scene and Motion Direction: Describe how a scene should develop, including subject movement, camera intent, lighting, and atmosphere, through the generation prompt.
Selectable Output Resolution: Choose 720p or 1080p output to match the delivery requirements of previews, social posts, and campaign assets.
Flexible Video Duration: Specify the clip length for each request so the generated video fits the pacing and scope of the creative brief.
Multiple Aspect Ratios: Create landscape, portrait, square, or widescreen video for different publishing contexts through the same Kling API integration.
Developer-Friendly Integration: Add prompt-based video creation to applications, creative tools, and automated content pipelines through Best Image AI.
Input: A natural-language prompt describing the scene, subjects, actions, visual treatment, and desired camera direction.
Output: A generated video clip based on the prompt and selected video settings.
Resolution: Select a supported output resolution with every request to suit the intended delivery.
Aspect Ratios: Choose from multiple supported formats for horizontal, vertical, square, and cinematic compositions.
Duration: Explicitly specify a video length from 3 to 30 seconds for each generation request.
Pricing: Per-second billing based on the selected output resolution and generated video duration.
Capabilities: Text-to-video creation with prompt-based visual direction, selectable resolution, flexible clip length, and multiple aspect ratios.
Marketing Campaigns: Turn written briefs into promotional clips, campaign scenes, and video variations for advertising and brand storytelling.
Social Media Content: Generate clips for vertical feeds, horizontal posts, and square placements using prompts tailored to the intended audience.
E-commerce & Product Promotion: Create product-focused scenes, lifestyle videos, and launch content from prompts describing the product, setting, and intended action.
Creative Previsualization: Test scene descriptions, camera ideas, and action sequences while developing an advertisement, presentation, or visual story.
Automated Content Workflows: Integrate prompt-based video generation into applications and production pipelines that reuse briefs and output settings across projects.
Note Please ensure prompts comply with Kuaishou and Best Image AI content safety requirements. If an error occurs, review the prompt and generation settings before trying again.
Kling 4.0 vs. Runway Gen-4.5
Runway Gen-4.5 supports text-to-video and image-to-video
generation. Kling 4.0 Text-to-Video provides a dedicated prompt-only workflow on Best Image AI with selectable resolution,
clip duration, and multiple aspect ratios.
Kling 4.0 vs. Veo 3.1
Google Veo 3.1 supports video generation with native audio. Kling
4.0 Text-to-Video offers a different integration path centered on written scene direction and explicit resolution,
duration, and framing choices.
Kling 4.0 Text-to-Video vs. Kling 4.0 Image-to-Video
Image-to-Video requires an opening image and can use additional frame guidance. Text-to-Video is suitable when the
starting point is a written brief and no specific source image needs to define the opening composition.
Kling 4.0 Text-to-Video vs. Kling 4.0 Reference-to-Video
Reference-to-Video accepts optional image, video, and audio references. Text-to-Video keeps the request focused on the
written prompt when a project does not need reference media.
Kling 4.0 Text-to-Video vs. Kling 4.0 Video Extend
Video Extend adds footage to an existing clip. Text-to-Video creates a new clip from a description, making it the
relevant choice when there is no source video to continue.
Explore several AI creation tools for quick image and video workflows in your browser, then scale successful ideas with Best Image AI's production-ready model APIs. Best Image AI provides a unified API layer for all models, making it easy to use and scale your workflows.

Create AI images from text prompts

Create AI images from images and text prompts

Create AI videos from text prompts

Animate images into AI videos

Create AI images and videos in one unified workspace

Create consistent videos from reference media

Build visual AI image and video workflows on an infinite canvas
// Step 1: Submit generation request
const response = await fetch('https://api.flaq.ai/api/v1/video/task', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer YOUR_API_KEY'
},
body: JSON.stringify({
model_name: 'kling-v4.0-text-to-video',
prompt: 'A drone flying over a mountain range at sunrise, smooth forward camera movement',
resolution: '720p',
duration: 5,
aspect_ratio: '16:9'
})
});
const { data } = await response.json();
const taskId = data.task_id;
// Step 2: Poll for results
const taskId = data.task_id;
const pollResult = async (taskId) => {
const res = await fetch(`https://api.flaq.ai/api/v1/video/${taskId}`, {
headers: { 'Authorization': 'Bearer YOUR_API_KEY' }
});
return res.json();
};
while (true) {
const pollResultData = await pollResult(taskId);
const status = pollResultData.data.task_status;
if (status === 'succeed') {
console.log(pollResultData.data.task_result.videos[0].url);
;
}
(status === ) {
.(pollResultData..);
;
}
( (resolve, ));
}
# Step 1: Submit generation request
import requests
response = requests.post(
'https://api.flaq.ai/api/v1/video/task',
headers={
'Content-Type': 'application/json',
'Authorization': 'Bearer YOUR_API_KEY'
},
json={
'model_name': 'kling-v4.0-text-to-video',
'prompt': 'A drone flying over a mountain range at sunrise, smooth forward camera movement',
'resolution': '720p',
'duration': 5,
'aspect_ratio': '16:9'
}
)
result = response.json()
task_id = result['data']['task_id']
# Step 1: Submit generation request
curl -X POST https://api.flaq.ai/api/v1/video/task \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"model_name": "kling-v4.0-text-to-video",
"prompt": "A drone flying over a mountain range at sunrise, smooth forward camera movement",
"resolution": "720p",
"duration": 5,
"aspect_ratio": "16:9"
}'
# Step 2: Poll for results
# Replace {task_id} with the task_id returned from the submit response
curl -X GET "https://api.flaq.ai/api/v1/video/{task_id}" \
-H "Authorization: Bearer YOUR_API_KEY"
# Step 2: Poll for results
task_id = response.json()['data']['task_id']
poll_url = f"https://api.flaq.ai/api/v1/video/{task_id}"
while True:
poll_result = requests.get(poll_url, headers={'Authorization': 'Bearer YOUR_API_KEY'}).json()
status = poll_result['data']['task_status']
if status == 'succeed':
print(poll_result['data']['task_result']['videos'][0]['url'])
break
if status == 'failed':
print(poll_result['data']['task_status_msg'])
break
time.sleep(10)