kling-v4 API
Generate, edit, and extend videos with stereo audio using kling-v4 on APISea.
kling-v4تسعير API لنموذج kling-v4
جميع الأسعار بالدولار الأمريكي (USD). مقارنة أسعار APISea بالسعر الرسمي المعلن للوحدة نفسها.
| الخيار | APISea | رسمي | وفّر |
|---|---|---|---|
| افتراضيافتراضي | $0.154 | $0.14 | — |
| 1080P | $0.231 | $0.21 | — |
| 1080P · مع فيديو مُدخل | $0.1386 | $0.126 | — |
| 720P | $0.154 | $0.14 | — |
| 720P · مع فيديو مُدخل | $0.0924 | $0.084 | — |
الأسعار لكل ثانية.
ما هو kling-v4؟
kling-v4 is Kuaishou’s Kling-family video model for text-to-video, image-to-video, reference-based generation, video editing, and extension. It generates 3–30 seconds at 720p or 1080p, always with stereo audio. Developers can supply first and last frames, intermediate frames, or reference images, videos, and audio. Duration, resolution, and aspect-ratio controls support different output formats, while editing and extension use an existing video as input.
On APISea, call the model through the video generation endpoint using your APISea API key. Requests run asynchronously: submit a task, then poll its status and result. Pay-as-you-go billing applies only to successful requests. APISea Default and 720P pricing is $0.154 per second; 1080P is $0.231 per second. With input video, 720P is $0.0924 per second and 1080P is $0.1386 per second. These rates slightly exceed the listed provider prices; no savings are claimed.
أبرز مزايا kling-v4
Five Video Workflows
Use the same model ID for text-to-video, image-to-video, reference-based generation, editing, and extension. Supplied assets and omni_reference_task_type select the workflow.
Stereo Audio Output
Generated videos always include stereo audio. Reference-based generation accepts up to three reference audio clips, each 5–30 seconds long.
Frame Guidance Controls
Guide image-to-video with a first frame, an optional last frame, and up to eight intermediate frames. The combined frame input must not exceed ten images.
Duration And Resolution
Generate 3–30 seconds at 720p or 1080p. Supported aspect ratios include 16:9, 9:16, 1:1, and 21:9, with mode-specific defaults and restrictions.
كيفية استدعاء API الخاص بـ kling-v4 في 4 خطوات
- 01
احصل على API key
سجّل الدخول إلى APISea، واشحن رصيدك بدءًا من $50، وأنشئ مفتاح sk-sea من وحدة التحكم.
- 02
اضبط عنوان URL الأساسي
استخدم https://api.apisea.ai/v1 عنوانًا أساسيًا في SDK أو عميل HTTP.
- 03
أرسل الطلب
استدعِ POST /v1/videos/generations مع "model": "kling-v4" والمعلمات أدناه.
- 04
تعامل مع الاستجابة
تتضمن الاستجابة task_id. أرسل طلبات GET /v1/tasks/{task_id} دوريًا حتى تصبح الحالة completed، ثم نزّل روابط النتائج.
أمثلة على الطلبات
الوثائق: Kling V4 Video Generationcurl --request POST \
--url https://api.apisea.ai/v1/videos/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "kling-v4",
"prompt": "A paper boat drifts along a gutter on a rainy night, with the gentle sound of rain",
"duration": 5,
"resolution": "720p",
"aspect_ratio": "9:16"
}'المعلمات
| المعلمة | النوع | مطلوب | افتراضي | الوصف |
|---|---|---|---|---|
model | string | مطلوب | — | Must be `kling-v4`. |
nsfw_check | boolean | اختياري | false | Whether to run content moderation before submitting the video task. |
prompt | string | اختياري | — | Describe the content to generate or edit. Optional for image-to-video; required for all other modes. |
duration | integer | اختياري | — | Generated duration in seconds, from `3` to `30`; default: `5`. |
resolution | string | اختياري | 720p | Output resolution: `720p` or `1080p`. Use this field to select the resolution; V4 does not support `mode`. |
aspect_ratio | string | اختياري | — | Supports `16:9`, `9:16`, `1:1`, and `21:9`. Reference-based generation also supports `auto`. |
image_urls | string[] | اختياري | — | Image URL list, interpreted according to the mode: |
image_with_roles | object[] | اختياري | — | Image list with roles. Each item contains `url` and `role`. |
first_frame_image | string | اختياري | — | First-frame image URL for image-to-video. It can also be supplied as `first_frame` in `image_with_roles`, or as the first image in `image_urls`. |
last_frame_image | string | اختياري | — | Last-frame image URL for image-to-video, or target last-frame image URL for extension. |
video_urls | string[] | اختياري | — | Reference videos for reference-based generation: up to 5 clips, using no more than 30 seconds in total. |
video_url | string | اختياري | — | Input video URL for editing or extension. Requires `omni_reference_task_type: "edit"` or `"extend"`. |
audio_urls | string[] | اختياري | — | Reference audio for reference-based generation: up to 3 clips, each 5–30 seconds long. |
omni_reference_task_type | string | اختياري | auto | Supports `auto`, `reference`, `edit`, and `extend`. |
audio_setting | string | اختياري | — | Supports `origin` (preserve input video audio) and `auto` (generate new audio). Only for video editing or reference-based generation with reference videos. |
ما الذي يمكنك إنشاؤه باستخدام kling-v4
Prompt-Based Clip Creation
Build a tool that turns written scene descriptions into short videos with stereo audio, letting users choose duration and resolution.
Storyboard Animation
Turn a first-frame image into a video, adding intermediate frames and a target last frame to guide the sequence.
Reference-Driven Production
Create a workflow where teams supply image, video, and audio references and identify them in prompts with @Image1, @Video1, and @Audio1.
Editing And Extension Tools
Let users submit an existing video for prompt-directed editing or generate a new segment that is returned together with the original video.
نصائح للحصول على نتائج أفضل
- 01
Select The Workflow Explicitly
For editing or extension, supply video_url and set omni_reference_task_type to edit or extend. For generation using only reference images, explicitly set it to reference.
- 02
Choose Resolution And Duration
Use resolution, not mode, to choose 720p or 1080p. Set duration explicitly when appropriate: generation defaults to 5 seconds, while editing follows the input duration when omitted.
- 03
Label Reference Assets
Refer to reference assets as @Image1, @Video1, and @Audio1 in your prompt, numbering each asset array from 1. A prompt is required for every workflow except image-to-video.
- 04
Poll For Completion
Submit to POST /v1/videos/generations, then use the returned task_id with GET /v1/videos/generations/{task_id}. Ensure supplied asset URLs are publicly accessible.
القيود ومعلومات مهمة
Reference videos are limited to five clips totaling no more than 30 seconds.
V4 does not support mode; select output resolution with resolution.
Video extension preserves the original aspect ratio and does not support aspect_ratio.
الأسئلة الشائعة حول API الخاص بـ kling-v4
How much does kling-v4 cost on APISea?
APISea Default and 720P cost $0.154 per second, while 1080P costs $0.231 per second. With input video, 720P costs $0.0924 per second and 1080P costs $0.1386 per second. Billing is pay-as-you-go for successful requests only; these rates slightly exceed provider list prices.
How do I call kling-v4 through the API?
Send an authenticated POST request to https://api.apisea.ai/v1/videos/generations with model set to kling-v4 and your workflow’s parameters. Use your APISea API key for Bearer authentication, then poll GET /v1/videos/generations/{task_id} for status and results.
What durations, resolutions, and aspect ratios does kling-v4 support?
Generated duration is 3–30 seconds, with a default of 5 seconds, and resolution is 720p or 1080p. Aspect ratios include 16:9, 9:16, 1:1, and 21:9; reference-based generation also supports auto. Extension preserves the original aspect ratio, and its duration specifies the new segment.
Can kling-v4 edit or extend an existing video?
Yes: supply video_url and set omni_reference_task_type to edit or extend. Supplying video_url without either setting returns HTTP 400; use video_urls instead when the video is a reference asset.
What are the reference input limits?
Reference-based generation supports up to ten reference images and up to five reference video clips totaling no more than 30 seconds. It also accepts up to three reference audio clips, each 5–30 seconds long. Asset URLs must be publicly accessible.
Can I use kling-v4 output commercially?
Commercial use is subject to the provider's terms. Review Kuaishou’s applicable terms and confirm you have the necessary rights to supplied images, video, and audio before using outputs commercially.
نماذج ذات صلة
kling-3.0-turbo
kling-v2-6
kling-v2-6-motion-control
kling-v3
kling-v3-motion-control
kling-v3-omni
kling-v4-flash
kling-video-o1
ابدأ التطوير باستخدام kling-v4
مفتاح واحد، وادفع حسب الاستخدام بدءًا من $50؛ ولا تُحتسب الرسوم إلا على الطلبات الناجحة.