4Z API

Vincent Video

Endpoint: POST https://4zapi.com/kling/v1/videos/text2video

Generate videos based on text prompt words. The native camelCase request body can be used; task_id is returned after submission, and the task status needs to be polled.

Request body (application/json)

  • duration (required): Video duration (seconds), required. Non-kling-v3: only 5 or 10; kling-v3: 3~15. Supports string or integer, gateway normalizes to string.
  • model_name (string, required): Model name. When not transmitted, gateway accounting defaults to kling-v1, and it is recommended to fill it in explicitly. It must be kling-v3 when multi_shot=true; it must be kling-v3 when mode=4k. ["kling-v1", "kling-v1-6", "kling-v2-master", "kling-v2-1-master", "kling-v2-5-turbo", "kling-v2-6", "kling-v3"]
  • aspect_ratio (string): Aspect ratio (width:height). Upstream constraints: commonly used 16:9 / 9:16 / 1:1, the gateway does not preflight enumeration. ["16:9", "9:16", "1:1"]
  • callback_url (string): Task completion callback address. POST notification after the upstream task is completed, the public network must be reachable, and the gateway transparently transmits the information as it is.
  • camera_control (object): Lens motion control. If it is not transmitted, the model will intelligently match it; the gateway transparently transmits it and does not pre-check the specific value range.
  • cfg_scale (number): Generate degrees of freedom (CFG). The larger the value, the stronger the correlation between the generated results and prompt; the gateway does not pre-check the range, and the upstream constraints are usually 0~1.
  • external_task_id (string): The caller's external task ID, used for idempotent association and business reconciliation; non-response body data.task_id.
  • mode (string): Generate schema. The billing side defaults to std when not transmitted. 4k only kling-v3; kling-v2-6 requires pro to open sound. ["std", "pro", "4k"]
  • multi_prompt (array<object>): Customized storyboard list. Required when shot_type=customize, up to 6 shots. Each mirror prompt≤512, duration≥1; the sum of the durations of each mirror must be equal to the top-level duration (error ≤0.1).
  • multi_shot (boolean): Whether there are multiple lenses. When true, only kling-v3 supports it, and prompt is invalid; when false, shot_type / multi_prompt cannot be passed.
  • negative_prompt (string): Negative cue words. Describe the unwanted content and transparently transmit it through the gateway.
  • prompt (string): Positive cue words. Required when multi_shot=false (default); invalid when multi_shot=true, 400 will be sent. Upstream constraint ≤2500 characters.
  • shot_type (string): Storyboarding method. Required when multi_shot=true; cannot be passed when multi_shot=false. customize must be used with multi_prompt; intelligence is automatically removed from the upstream. ["customize", "intelligence"]
  • sound (string): Audible switch. The gateway only performs model/schema verification on non-null values; triggers audible billing when on is passed. Only supported by kling-v2-6 / kling-v3; v2-6 requires mode=pro. ["on", "off"]
  • voice_list (array<object>): Custom sound list. The field can be transparently transmitted; the current text2video billing path does not identify voice_list separately (unlike image2video, it does not affect the hasVoiceId multiplier).

Request example

{
  "aspect_ratio": "16:9",
  "duration": "5",
  "mode": "std",
  "model_name": "kling-v1",
  "prompt": "A drone shot of a beautiful coastline at golden hour sunset"
}